Skip to content

Commit

Permalink
Merge pull request #291 from SentryMan/fix-module-import-clash
Browse files Browse the repository at this point in the history
Fix Repeatable Annotation Name Collision
  • Loading branch information
SentryMan authored Nov 20, 2024
1 parent 3102665 commit ecaf94c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ final class Constants {
static final String JSONB = "io.avaje.jsonb.Jsonb";
static final String JSON = "io.avaje.jsonb.Json";
static final String JSON_IMPORT = "io.avaje.jsonb.Json.Import";
static final String JSON_IMPORT_LIST = "io.avaje.jsonb.Json.Import.List";
static final String JSON_IMPORT_LIST = "io.avaje.jsonb.Json.Import.Imports";
static final String JSON_MIXIN = "io.avaje.jsonb.Json.MixIn";
static final String IOEXCEPTION = "java.io.IOException";
static final String METHODHANDLE = "java.lang.invoke.MethodHandle";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private void writeAdaptersForMixInTypes(Set<? extends Element> mixInElements) {

private void writeAdaptersForImportedList(Set<? extends Element> imported) {
imported.stream()
.flatMap(e -> ImportListPrism.getInstanceOn(e).value().stream())
.flatMap(e -> ImportsPrism.getInstanceOn(e).value().stream())
.forEach(this::addImported);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@GeneratePrism(io.avaje.jsonb.CustomAdapter.class)
@GeneratePrism(io.avaje.jsonb.Json.class)
@GeneratePrism(io.avaje.jsonb.Json.Import.class)
@GeneratePrism(value = io.avaje.jsonb.Json.Import.List.class, name = "ImportListPrism")
@GeneratePrism(io.avaje.jsonb.Json.Import.Imports.class)
@GeneratePrism(io.avaje.jsonb.Json.Alias.class)
@GeneratePrism(io.avaje.jsonb.Json.Creator.class)
@GeneratePrism(io.avaje.jsonb.Json.Ignore.class)
Expand Down
6 changes: 3 additions & 3 deletions jsonb/src/main/java/io/avaje/jsonb/Json.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import io.avaje.jsonb.Json.Import.List;
import io.avaje.jsonb.Json.Import.Imports;

/**
* Marks a type for JSON support.
Expand Down Expand Up @@ -73,7 +73,7 @@
* }</pre>
*/
@Retention(SOURCE)
@Repeatable(List.class)
@Repeatable(Imports.class)
@Target({TYPE, PACKAGE, MODULE})
@interface Import {

Expand All @@ -96,7 +96,7 @@
*/
@Retention(SOURCE)
@Target({TYPE, PACKAGE, MODULE})
@interface List {
@interface Imports {

Import[] value();
}
Expand Down

0 comments on commit ecaf94c

Please sign in to comment.