Skip to content

Commit

Permalink
528684: ClassCastException in MissingNatureDetector.propertyChange
Browse files Browse the repository at this point in the history
  • Loading branch information
creckord committed Jan 31, 2018
1 parent a31b6a3 commit fa8677f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ public void earlyStartup() {
public void propertyChange(PropertyChangeEvent event) {
if (ENABLEMENT_PROPERTY.equals(event.getProperty())) {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
if ((Boolean) event.getNewValue()) {
boolean enabled;
if (event.getNewValue() instanceof String) {
enabled = Boolean.parseBoolean((String) event.getNewValue());
} else {
enabled = Boolean.TRUE.equals(event.getNewValue());
}
if (enabled) {
workspace.addResourceChangeListener(this.projectOpenListener);
} else {
workspace.removeResourceChangeListener(this.projectOpenListener);
Expand Down

0 comments on commit fa8677f

Please sign in to comment.