remove obsolete (because of backward compatibility) TODO; use AnnotationLiteral


Project: http://git-wip-us.apache.org/repos/asf/bval/repo
Commit: http://git-wip-us.apache.org/repos/asf/bval/commit/4b651bbb
Tree: http://git-wip-us.apache.org/repos/asf/bval/tree/4b651bbb
Diff: http://git-wip-us.apache.org/repos/asf/bval/diff/4b651bbb

Branch: refs/heads/master
Commit: 4b651bbb04323dd2478c0bea74d6cef5e0fef7da
Parents: 890c2cc
Author: Matt Benson <[email protected]>
Authored: Thu Oct 20 21:27:25 2016 +0000
Committer: Matt Benson <[email protected]>
Committed: Thu Oct 20 21:27:25 2016 +0000

----------------------------------------------------------------------
 .../bval/jsr/xml/AnnotationProxyBuilder.java    | 21 ++++++++------------
 1 file changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bval/blob/4b651bbb/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
----------------------------------------------------------------------
diff --git 
a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java 
b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
index 8fa6e9e..564b92f 100644
--- a/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
+++ b/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
@@ -31,6 +31,8 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+
+import javax.enterprise.util.AnnotationLiteral;
 import javax.validation.Payload;
 import javax.validation.Valid;
 import javax.validation.ValidationException;
@@ -40,7 +42,6 @@ import javax.validation.groups.ConvertGroup;
  * Description: Holds the information and creates an annotation proxy during 
xml
  * parsing of validation mapping constraints. <br/>
  */
-// TODO move this guy up to org.apache.bval.jsr or org.apache.bval.jsr.model
 @Privilizing(@CallTo(Reflection.class))
 public final class AnnotationProxyBuilder<A extends Annotation> {
     private static final ConcurrentMap<Class<?>, Method[]> METHODS_CACHE = new 
ConcurrentHashMap<Class<?>, Method[]>();
@@ -216,16 +217,15 @@ public final class AnnotationProxyBuilder<A extends 
Annotation> {
         }
     }
 
-    public static final class ValidAnnotation implements Valid {
-        public static final ValidAnnotation INSTANCE = new ValidAnnotation();
+    public static final class ValidAnnotation extends AnnotationLiteral<Valid> 
implements Valid {
+        private static final long serialVersionUID = 1L;
 
-        @Override
-        public Class<? extends Annotation> annotationType() {
-            return Valid.class;
-        }
+        public static final ValidAnnotation INSTANCE = new ValidAnnotation();
     }
 
-    public static final class ConvertGroupAnnotation implements ConvertGroup {
+    public static final class ConvertGroupAnnotation extends 
AnnotationLiteral<ConvertGroup> implements ConvertGroup {
+        private static final long serialVersionUID = 1L;
+
         private final Class<?> from;
         private final Class<?> to;
 
@@ -235,11 +235,6 @@ public final class AnnotationProxyBuilder<A extends 
Annotation> {
         }
 
         @Override
-        public Class<? extends Annotation> annotationType() {
-            return ConvertGroup.class;
-        }
-
-        @Override
         public Class<?> from() {
             return from;
         }

Reply via email to