aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/core/TypeLibrary.java3
-rw-r--r--src/core/lombok/eclipse/HandlerLibrary.java5
-rw-r--r--src/core/lombok/javac/HandlerLibrary.java5
3 files changed, 8 insertions, 5 deletions
diff --git a/src/core/lombok/core/TypeLibrary.java b/src/core/lombok/core/TypeLibrary.java
index 8a03b479..0e3f7bf4 100644
--- a/src/core/lombok/core/TypeLibrary.java
+++ b/src/core/lombok/core/TypeLibrary.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2011 The Project Lombok Authors.
+ * Copyright (C) 2009-2012 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -76,6 +76,7 @@ public class TypeLibrary {
if (idx == -1) throw new IllegalArgumentException(
"Only fully qualified types are allowed (and stuff in the default package is not palatable to us either!)");
+ fullyQualifiedTypeName = fullyQualifiedTypeName.replace("$", ".");
final String simpleName = fullyQualifiedTypeName.substring(idx +1);
final String packageName = fullyQualifiedTypeName.substring(0, idx);
diff --git a/src/core/lombok/eclipse/HandlerLibrary.java b/src/core/lombok/eclipse/HandlerLibrary.java
index d341b537..14102ba1 100644
--- a/src/core/lombok/eclipse/HandlerLibrary.java
+++ b/src/core/lombok/eclipse/HandlerLibrary.java
@@ -113,8 +113,9 @@ public class HandlerLibrary {
Class<? extends Annotation> annotationClass =
SpiLoadUtil.findAnnotationClass(handler.getClass(), EclipseAnnotationHandler.class);
AnnotationHandlerContainer<?> container = new AnnotationHandlerContainer(handler, annotationClass);
- if (lib.annotationHandlers.put(container.annotationClass.getName(), container) != null) {
- error(null, "Duplicate handlers for annotation type: " + container.annotationClass.getName(), null);
+ String annotationClassName = container.annotationClass.getName().replace("$", ".");
+ if (lib.annotationHandlers.put(annotationClassName, container) != null) {
+ error(null, "Duplicate handlers for annotation type: " + annotationClassName, null);
}
lib.typeLibrary.addType(container.annotationClass.getName());
} catch (Throwable t) {
diff --git a/src/core/lombok/javac/HandlerLibrary.java b/src/core/lombok/javac/HandlerLibrary.java
index 35abac6f..9666c9d5 100644
--- a/src/core/lombok/javac/HandlerLibrary.java
+++ b/src/core/lombok/javac/HandlerLibrary.java
@@ -108,8 +108,9 @@ public class HandlerLibrary {
Class<? extends Annotation> annotationClass =
SpiLoadUtil.findAnnotationClass(handler.getClass(), JavacAnnotationHandler.class);
AnnotationHandlerContainer<?> container = new AnnotationHandlerContainer(handler, annotationClass);
- if (lib.annotationHandlers.put(container.annotationClass.getName(), container) != null) {
- lib.javacWarning("Duplicate handlers for annotation type: " + container.annotationClass.getName());
+ String annotationClassName = container.annotationClass.getName().replace("$", ".");
+ if (lib.annotationHandlers.put(annotationClassName, container) != null) {
+ lib.javacWarning("Duplicate handlers for annotation type: " + annotationClassName);
}
lib.typeLibrary.addType(container.annotationClass.getName());
}