bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1765886 - /bval/trunk/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
Date Thu, 20 Oct 2016 21:27:25 GMT
Author: mbenson
Date: Thu Oct 20 21:27:25 2016
New Revision: 1765886

URL: http://svn.apache.org/viewvc?rev=1765886&view=rev
Log:
remove obsolete (because of backward compatibility) TODO; use AnnotationLiteral

Modified:
    bval/trunk/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java

Modified: bval/trunk/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
URL: http://svn.apache.org/viewvc/bval/trunk/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java?rev=1765886&r1=1765885&r2=1765886&view=diff
==============================================================================
--- bval/trunk/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
(original)
+++ bval/trunk/bval-jsr/src/main/java/org/apache/bval/jsr/xml/AnnotationProxyBuilder.java
Thu Oct 20 21:27:25 2016
@@ -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.ConvertGr
  * 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 AnnotationProxyBuilde
         }
     }
 
-    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 AnnotationProxyBuilde
         }
 
         @Override
-        public Class<? extends Annotation> annotationType() {
-            return ConvertGroup.class;
-        }
-
-        @Override
         public Class<?> from() {
             return from;
         }



Mime
View raw message