This is an automated email from the ASF dual-hosted git repository. rubenql pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/master by this push: new 2741cc5 Add generic info to Map & Array annotation 2741cc5 is described below commit 2741cc5ab39f148917a2b53f023acd34975bb9a2 Author: tison <wander4...@gmail.com> AuthorDate: Sun May 9 22:31:49 2021 +0800 Add generic info to Map & Array annotation Signed-off-by: tison <wander4...@gmail.com> --- core/src/main/java/org/apache/calcite/adapter/java/Array.java | 7 +++---- core/src/main/java/org/apache/calcite/adapter/java/Map.java | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/adapter/java/Array.java b/core/src/main/java/org/apache/calcite/adapter/java/Array.java index 40b163e..a7e786f 100644 --- a/core/src/main/java/org/apache/calcite/adapter/java/Array.java +++ b/core/src/main/java/org/apache/calcite/adapter/java/Array.java @@ -16,20 +16,19 @@ */ package org.apache.calcite.adapter.java; +import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.FIELD; - /** * Annotation that indicates that a field is an array type. */ -@Target({FIELD }) +@Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Array { /** Component type. */ - Class component(); + Class<?> component(); /** Whether components may be null. */ boolean componentIsNullable() default false; diff --git a/core/src/main/java/org/apache/calcite/adapter/java/Map.java b/core/src/main/java/org/apache/calcite/adapter/java/Map.java index 7aa198b..a3860ca 100644 --- a/core/src/main/java/org/apache/calcite/adapter/java/Map.java +++ b/core/src/main/java/org/apache/calcite/adapter/java/Map.java @@ -16,23 +16,22 @@ */ package org.apache.calcite.adapter.java; +import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.FIELD; - /** * Annotation that indicates that a field is a map type. */ -@Target({FIELD }) +@Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Map { /** Key type. */ - Class key(); + Class<?> key(); /** Value type. */ - Class value(); + Class<?> value(); /** Whether keys may be null. */ boolean keyIsNullable() default true;