aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/Javac6BasedLombokOptions.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac/Javac6BasedLombokOptions.java')
-rw-r--r--src/core/lombok/javac/Javac6BasedLombokOptions.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lombok/javac/Javac6BasedLombokOptions.java b/src/core/lombok/javac/Javac6BasedLombokOptions.java
index cefb89ff..fc73181c 100644
--- a/src/core/lombok/javac/Javac6BasedLombokOptions.java
+++ b/src/core/lombok/javac/Javac6BasedLombokOptions.java
@@ -25,6 +25,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import lombok.Lombok;
+import lombok.permit.Permit;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.Options;
@@ -36,8 +37,8 @@ public class Javac6BasedLombokOptions extends LombokOptions {
static {
try {
Class<?> optionNameClass = Class.forName("com.sun.tools.javac.main.OptionName");
- optionName_valueOf = optionNameClass.getMethod("valueOf", String.class);
- options_put = Class.forName("com.sun.tools.javac.util.Options").getMethod("put", optionNameClass, String.class);
+ optionName_valueOf = Permit.getMethod(optionNameClass, "valueOf", String.class);
+ options_put = Permit.getMethod(Class.forName("com.sun.tools.javac.util.Options"), "put", optionNameClass, String.class);
} catch (Exception e) {
throw new IllegalArgumentException("Can't initialize Javac6-based lombok options due to reflection issue.", e);
}