From: Marko Luukkainen Date: Fri, 24 Nov 2017 09:57:52 +0000 (+0200) Subject: Fix NPE when user inputs empty string X-Git-Tag: v1.31.0~20 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F60%2F1260%2F1;p=simantics%2Fplatform.git Fix NPE when user inputs empty string fixes #7640 Change-Id: I44edaedd18185594965e2b2ce04b4931f3d6c724 --- diff --git a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java index 3bb05553d..aa384ad1d 100644 --- a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java +++ b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java @@ -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); } }