From c155c65a8fe58ab8dece2975b469fd505ab68c92 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 10 Nov 2019 11:23:25 +0000 Subject: [PATCH] Remove modifier reflection Fixes #2484 --- .../intellectualsites/plotsquared/plot/config/Config.java | 6 +----- .../intellectualsites/plotsquared/plot/config/Settings.java | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Config.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Config.java index 7234743cf..f7bd5118e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Config.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Config.java @@ -365,12 +365,8 @@ public class Config { * @throws NoSuchFieldException * @throws IllegalAccessException */ - private static void setAccessible(Field field) - throws NoSuchFieldException, IllegalAccessException { + private static void setAccessible(Field field) { field.setAccessible(true); - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); } /** diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java index b1e239c78..8dd1be8a8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Settings.java @@ -16,10 +16,10 @@ public class Settings extends Config { @Comment("These first 7 aren't configurable") // This is a comment @Final // Indicates that this value isn't configurable - public static final String ISSUES = "https://github.com/IntellectualSites/PlotSquared/issues"; - @Final public static final String SUGGESTION = + public static String ISSUES = "https://github.com/IntellectualSites/PlotSquared/issues"; + @Final public static String SUGGESTION = "https://github.com/IntellectualSites/PlotSquaredSuggestions"; - @Final public static final String WIKI = + @Final public static String WIKI = "https://github.com/IntellectualSites/PlotSquared/wiki"; @Final public static String DATE; // These values are set from P2 before loading @Final public static String BUILD; // These values are set from P2 before loading