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.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@984980 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeremy Bauer 2010-08-12 21:16:42 +00:00
parent 7e50c0bf6d
commit 3265c84105
2 changed files with 6 additions and 2 deletions

View File

@ -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 };
}

View File

@ -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 };
}