Skip to content

Commit

Permalink
fix JCheckBox save failed
Browse files Browse the repository at this point in the history
  • Loading branch information
956237586 committed Nov 8, 2023
1 parent af32029 commit 9a91444
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ public JComponent createComponent() {

@Override
public boolean isModified() {
return !(Objects.equals(generateCurrentMethodName.isSelected(), propertiesComponent.getBoolean(GENERATE_CURRENT_METHOD_NAME_ENABLED, GENERATE_CURRENT_METHOD_NAME_ENABLED_DEFAULT)) &&
return !(Objects.equals(String.valueOf(generateCurrentMethodName.isSelected()), String.valueOf(propertiesComponent.getBoolean(GENERATE_CURRENT_METHOD_NAME_ENABLED, GENERATE_CURRENT_METHOD_NAME_ENABLED_DEFAULT))) &&
Objects.equals(logVariableName.getText(), propertiesComponent.getValue(GENERATE_LOG_VARIABLE_NAME, GENERATE_LOG_VARIABLE_NAME_DEFAULT))
);
}

@Override
public void apply() throws ConfigurationException {
propertiesComponent.setValue(GENERATE_CURRENT_METHOD_NAME_ENABLED, generateCurrentMethodName.isSelected());
propertiesComponent.setValue(GENERATE_CURRENT_METHOD_NAME_ENABLED, String.valueOf(generateCurrentMethodName.isSelected()));
propertiesComponent.setValue(GENERATE_LOG_VARIABLE_NAME, logVariableName.getText());
}
}

0 comments on commit 9a91444

Please sign in to comment.