Skip to content

Commit aa70730

Browse files
authored
Merge pull request #191 from SentryMan/remove-deprecated
Remove Deprecated @JsonAlias migrate to @Json.Alias, Remove newBuilder() migrate to builder()
2 parents 6bd82dd + 30567db commit aa70730

File tree

5 files changed

+3
-27
lines changed

5 files changed

+3
-27
lines changed

jsonb-generator/src/main/java/io/avaje/jsonb/generator/FieldReader.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ private void initAliases(Element element) {
7474
var alias =
7575
AliasPrism.getOptionalOn(element)
7676
.map(a -> Util.escapeQuotes(a.value()))
77-
.orElse(
78-
JsonAliasPrism.getOptionalOn(element)
79-
.map(a -> Util.escapeQuotes(a.value()))
80-
.orElse(Collections.emptyList()));
77+
.orElse(Collections.emptyList());
8178

8279
aliases.addAll(alias);
8380
}

jsonb-generator/src/main/java/io/avaje/jsonb/generator/package-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
@GeneratePrism(value = io.avaje.jsonb.Json.Import.List.class, name = "ImportListPrism")
55
@GeneratePrism(io.avaje.jsonb.Json.Alias.class)
66
@GeneratePrism(io.avaje.jsonb.Json.Creator.class)
7-
@GeneratePrism(io.avaje.jsonb.Json.JsonAlias.class)
87
@GeneratePrism(io.avaje.jsonb.Json.Ignore.class)
98
@GeneratePrism(io.avaje.jsonb.Json.Property.class)
109
@GeneratePrism(io.avaje.jsonb.Json.MixIn.class)

jsonb-generator/src/test/java/io/avaje/jsonb/generator/models/valid/Example2Packet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package io.avaje.jsonb.generator.models.valid;
22

3-
import io.avaje.jsonb.Json.JsonAlias;
3+
import io.avaje.jsonb.Json;
44

55
public class Example2Packet extends Packet {
66

77
private final String ids;
8-
@JsonAlias("long-ring-long-land")
8+
@Json.Alias("long-ring-long-land")
99
private Long longy;
1010

1111
public Example2Packet(String ids, Long longy) {

jsonb/src/main/java/io/avaje/jsonb/Json.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,6 @@
139139
String[] value();
140140
}
141141

142-
/**
143-
* Deprecated - migrate to {@link Json.Alias}.
144-
*/
145-
@Deprecated
146-
@Retention(CLASS)
147-
@Target(FIELD)
148-
@interface JsonAlias {
149-
150-
/** One or more secondary names to accept as aliases to the official name. */
151-
String[] value();
152-
}
153-
154142
/**
155143
* Exclude the property from serialization, deserialization or both.
156144
* <p>

jsonb/src/main/java/io/avaje/jsonb/Jsonb.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,6 @@ static Builder builder() {
109109
return DefaultBootstrap.builder();
110110
}
111111

112-
/**
113-
* Migrate to builder().
114-
*/
115-
@Deprecated
116-
static Builder newBuilder() {
117-
return builder();
118-
}
119-
120112
/**
121113
* Return json content for the given object.
122114
* <p>

0 commit comments

Comments
 (0)