openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r984980 - in /openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint: ImageConstraint.java ImageContent.java
Date Thu, 12 Aug 2010 21:16:45 GMT
Author: jrbauer
Date: Thu Aug 12 21:16:42 2010
New Revision: 984980

URL: http://svn.apache.org/viewvc?rev=984980&view=rev
Log:
OPENJPA-1681 Work around quirky Java 1.5 compiler issue that occurs when enum values are specified
within default array values in an annotation definition.

Modified:
    openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageConstraint.java
    openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageContent.java

Modified: openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageConstraint.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageConstraint.java?rev=984980&r1=984979&r2=984980&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageConstraint.java
(original)
+++ openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageConstraint.java
Thu Aug 12 21:16:42 2010
@@ -28,6 +28,8 @@ import javax.validation.Constraint;
 import javax.validation.Payload;
 
 import org.apache.openjpa.example.gallery.ImageType;
+import static org.apache.openjpa.example.gallery.ImageType.GIF;
+import static org.apache.openjpa.example.gallery.ImageType.JPEG;
 
 /**
  * Type-level annotation used to specify an image constraint.  Uses 
@@ -41,5 +43,5 @@ public @interface ImageConstraint {
     String message() default "Image data is not a supported format.";
     Class<?>[] groups() default {};
     Class<? extends Payload>[] payload() default {};
-    ImageType[] value() default { ImageType.GIF, ImageType.JPEG };
+    ImageType[] value() default { GIF, JPEG };
 }

Modified: openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageContent.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageContent.java?rev=984980&r1=984979&r2=984980&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageContent.java
(original)
+++ openjpa/trunk/openjpa-examples/image-gallery/src/main/java/org/apache/openjpa/example/gallery/constraint/ImageContent.java
Thu Aug 12 21:16:42 2010
@@ -29,6 +29,8 @@ import javax.validation.Constraint;
 import javax.validation.Payload;
 
 import org.apache.openjpa.example.gallery.ImageType;
+import static org.apache.openjpa.example.gallery.ImageType.GIF;
+import static org.apache.openjpa.example.gallery.ImageType.JPEG;
 
 /**
  * Attribute-level annotation used to specify an image content constraint.  Uses 
@@ -42,5 +44,5 @@ public @interface ImageContent {
     String message() default "Image data is not a supported format.";
     Class<?>[] groups() default {};
     Class<? extends Payload>[] payload() default {};
-    ImageType[] value() default { ImageType.GIF, ImageType.JPEG };
+    ImageType[] value() default { GIF, JPEG };
 }



Mime
View raw message