]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix NPE when user inputs empty string 60/1260/1
authorMarko Luukkainen <marko.luukkainen@vtt.fi>
Fri, 24 Nov 2017 09:57:52 +0000 (11:57 +0200)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Fri, 24 Nov 2017 09:57:52 +0000 (11:57 +0200)
fixes #7640

Change-Id: I44edaedd18185594965e2b2ce04b4931f3d6c724

bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java

index 3bb05553dc7456e073d52b44e526688c2beffdc0..aa384ad1d75e5abe61fbe3b0ede5a66218e67d47 100644 (file)
@@ -1858,10 +1858,9 @@ public class NatTableGraphExplorer extends GraphExplorerImplBase implements Grap
                        if (modifier == null)
                                return false;
                        
-                       String err =  modifier.isValid(newValue.toString());
+                       String err =  modifier.isValid(newValue != null ? newValue.toString() : "");
                        if (err == null)
                                return true;
-                       modifier.isValid(newValue.toString());
                        throw new ValidationFailedException(err);
        }
     }