Skip to content

Commit

Permalink
fix: reflection bug in onDataChangeEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
Alextopher committed Sep 12, 2024
1 parent 06f0f7d commit f9b73c7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void onDataChangeEvent(DataChangeEvent<?> event) {
propField.setBoolean(currentSettings, (Boolean) newPropValue);
}
} else {
propField.set(newPropValue, newPropValue);
propField.set(currentSettings, newPropValue);
}
logger.trace("Set prop " + propName + " to value " + newPropValue);
} catch (NoSuchFieldException | IllegalAccessException e) {
Expand All @@ -237,8 +237,9 @@ public void onDataChangeEvent(DataChangeEvent<?> event) {
+ " with value "
+ newPropValue
+ " on "
+ currentSettings,
e);
+ currentSettings
+ " | "
+ e.getClass().getSimpleName());
} catch (Exception e) {
logger.error("Unknown exception when setting PSC prop!", e);
}
Expand Down

0 comments on commit f9b73c7

Please sign in to comment.