...
authorNiki Roo <niki@nikiroo.be>
Thu, 25 Apr 2019 16:39:16 +0000 (18:39 +0200)
committerNiki Roo <niki@nikiroo.be>
Thu, 25 Apr 2019 16:39:16 +0000 (18:39 +0200)
src/be/nikiroo/utils/serial/Importer.java
src/be/nikiroo/utils/test_code/SerialTest.java

index a017fabfd362ea3ad27f72e0a6305856db2e41a1..7a45ddfa0d51b54c43ce597d9fb8085c27bfb73b 100644 (file)
@@ -72,10 +72,10 @@ public class Importer {
                                new NextableInputStreamStep('\n'));
 
                try {
-                       if (in == null || stream.eof()) {
-                               if (in == null) {
-                                       throw new NullPointerException("InputStream is null");
-                               }
+                       if (in == null) {
+                               throw new NullPointerException("InputStream is null");
+                       }
+                       if (stream.eof()) {
                                throw new NullPointerException("InputStream is empty");
                        }
 
index d761195ea8fdf938ed67281623dfe58ce5f497a8..880f175b29889dec87751db0286fb9fdc9a1d826 100644 (file)
@@ -5,7 +5,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.NotSerializableException;
-import java.net.URL;
 import java.util.Arrays;
 
 import be.nikiroo.utils.serial.Exporter;