From 32fdff9f1164fa6ef3ea005d9347ac03a15430b3 Mon Sep 17 00:00:00 2001 From: Roland Praml Date: Mon, 22 Aug 2016 10:00:13 +0200 Subject: [PATCH] Used @Repeatable feature from JDK8 for @Indices --- src/main/java/com/avaje/ebean/annotation/Indices.java | 2 +- .../ebeaninternal/server/deploy/parse/AnnotationClass.java | 2 +- .../ebeaninternal/server/deploy/parse/AnnotationFields.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/avaje/ebean/annotation/Indices.java b/src/main/java/com/avaje/ebean/annotation/Indices.java index 2c119da70..0886482ed 100644 --- a/src/main/java/com/avaje/ebean/annotation/Indices.java +++ b/src/main/java/com/avaje/ebean/annotation/Indices.java @@ -16,5 +16,5 @@ public @interface Indices { /** * Array with {@link Index} definitions. */ - Index[] indices() default {}; + Index[] value() default {}; } diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java index ebaed8e5b..3fe8be9a7 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java @@ -121,7 +121,7 @@ public class AnnotationClass extends AnnotationParser { Indices indices = AnnotationBase.findAnnotation(cls, Indices.class); if (indices != null) { - for (Index index: indices.indices()) { + for (Index index: indices.value()) { descriptor.addIndex(new IndexDefinition(index.columnNames(), index.name(), index.unique())); } } diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java index e1328802b..022044ec8 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationFields.java @@ -312,7 +312,7 @@ public class AnnotationFields extends AnnotationParser { Indices indices = get(prop, Indices.class); if (indices != null) { - for (Index index: indices.indices()) { + for (Index index: indices.value()) { addIndex(prop, index); } }