Browse Source

fix null pointer exception

Kajetan Johannes Hammerle 2 years ago
parent
commit
0110356855
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/me/hammerle/snuviscript/config/SnuviConfig.java

+ 1 - 1
src/me/hammerle/snuviscript/config/SnuviConfig.java

@@ -91,7 +91,7 @@ public class SnuviConfig {
         try {
             Path p = Paths.get(file.toURI());
             Files.write(p, conf.entrySet().stream().map(e -> {
-                if(e.getValue().getClass() == String.class) {
+                if(e.getValue() instanceof String) {
                     return String.format("%s=\"%s\"", e.getKey(),
                             e.getValue().toString().replaceAll("\n", "\\n"));
                 }