]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java
Remove listener calls when property values not updated.
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / PipelineComponent.java
index d3ded1efe7b0fe1217fd706844555ea219b4a8ea..f0621fdd2ce7f76dad1490963b62ba73583065a1 100644 (file)
@@ -4,6 +4,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 
 import javax.vecmath.Quat4d;
 import javax.vecmath.Tuple3d;
@@ -728,12 +729,9 @@ public abstract class PipelineComponent extends GeometryNode {
         * @param error
         */
        public void setError(String error) {
-           if (this.error == null) {
-               if (error == null)
-                   return;
-           } else if (this.error.equals(error))
+           if (Objects.equals(this.error,  error))
                return;
-           this.error = error;         
+           this.error = error;
            firePropertyChanged("error");
        }
 }