diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java index 0d342ac58a..f7cba3f63d 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java @@ -117,7 +117,7 @@ public void propertyChange(Node observedNode, ObservableProperty property, Objec if (property == ObservableProperty.TYPE) { VariableDeclarator vd = VariableDeclarator.this; if (vd.getParentNode().isPresent() && vd.getParentNode().get() instanceof NodeWithVariables) { - NodeWithVariables nodeWithVariables = (NodeWithVariables) vd.getParentNode().get(); + NodeWithVariables nodeWithVariables = (NodeWithVariables) vd.getParentNode().get(); // We calculate the value the property will assume after the change will be completed Optional currentMaxCommonType = nodeWithVariables.getMaximumCommonType(); List types = new LinkedList<>();