Browse Source

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 years ago
parent
commit
a48c210ddd
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/com/dmdirc/util/io/TextFile.java

+ 1
- 1
src/com/dmdirc/util/io/TextFile.java View File

103
      * @since 0.6.3m1
103
      * @since 0.6.3m1
104
      */
104
      */
105
     public TextFile(final File file, final Charset charset) {
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
     /**

Loading…
Cancel
Save