From a016e623defbb7f920287793ae0f2a770d0994c3 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 19 Jan 2014 07:38:49 +0100 Subject: [configuration] added a service-loader based way to load ConfigurationKeys, so that third party additions can add their own. --- src/core/lombok/javac/HandlerLibrary.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/core/lombok/javac') diff --git a/src/core/lombok/javac/HandlerLibrary.java b/src/core/lombok/javac/HandlerLibrary.java index e28033c9..0905170b 100644 --- a/src/core/lombok/javac/HandlerLibrary.java +++ b/src/core/lombok/javac/HandlerLibrary.java @@ -35,12 +35,12 @@ import java.util.WeakHashMap; import javax.annotation.processing.Messager; import javax.tools.Diagnostic; -import lombok.ConfigurationKeys; import lombok.core.HandlerPriority; import lombok.core.SpiLoadUtil; import lombok.core.TypeLibrary; import lombok.core.TypeResolver; import lombok.core.AnnotationValues.AnnotationValueDecodeFail; +import lombok.core.configuration.ConfigurationKeysLoader; import lombok.javac.handlers.JavacHandlerUtil; import com.sun.tools.javac.tree.JCTree; @@ -54,10 +54,6 @@ import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; * building an AnnotationValues instance. */ public class HandlerLibrary { - static { - ConfigurationKeys.ensureKeysLoaded(); - } - private final TypeLibrary typeLibrary = new TypeLibrary(); private final Map> annotationHandlers = new HashMap>(); private final Collection visitorHandlers = new ArrayList(); @@ -68,6 +64,7 @@ public class HandlerLibrary { * You probably want to use {@link #load(Messager)} instead. */ public HandlerLibrary(Messager messager) { + ConfigurationKeysLoader.LoaderLoader.loadAllConfigurationKeys(); this.messager = messager; } -- cgit