Переглянути джерело

Allow null Files to be passed to TextFile again.

We do this for temporary configuration files which are never saved
(e.g. the addon settings). It's a bit of a kludge, but for now we
should maintain it.

Change-Id: I656b924221eded5bbd98dfa4c276ab6d43b682e0
Fixes-Issue: CLIENT-510
Reviewed-on: http://gerrit.dmdirc.com/3507
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/07/3507/2
Chris Smith 10 роки тому
джерело
коміт
a48c210ddd
1 змінених файлів з 1 додано та 1 видалено
  1. 1
    1
      src/com/dmdirc/util/io/TextFile.java

+ 1
- 1
src/com/dmdirc/util/io/TextFile.java Переглянути файл

@@ -103,7 +103,7 @@ public class TextFile {
103 103
      * @since 0.6.3m1
104 104
      */
105 105
     public TextFile(final File file, final Charset charset) {
106
-        this(file.toPath(), charset);
106
+        this(file == null ? null : file.toPath(), charset);
107 107
     }
108 108
 
109 109
     /**

Завантаження…
Відмінити
Зберегти