From 30567dbd48bf41ee1b836d7fb416b0b7d503a185 Mon Sep 17 00:00:00 2001 From: Josiah Noel <32279667+SentryMan@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:03:07 -0500 Subject: [PATCH] remove deprecated stuff --- .../java/io/avaje/jsonb/generator/FieldReader.java | 5 +---- .../java/io/avaje/jsonb/generator/package-info.java | 1 - .../jsonb/generator/models/valid/Example2Packet.java | 4 ++-- jsonb/src/main/java/io/avaje/jsonb/Json.java | 12 ------------ jsonb/src/main/java/io/avaje/jsonb/Jsonb.java | 8 -------- 5 files changed, 3 insertions(+), 27 deletions(-) diff --git a/jsonb-generator/src/main/java/io/avaje/jsonb/generator/FieldReader.java b/jsonb-generator/src/main/java/io/avaje/jsonb/generator/FieldReader.java index c0f9a6f7..bd318aaf 100644 --- a/jsonb-generator/src/main/java/io/avaje/jsonb/generator/FieldReader.java +++ b/jsonb-generator/src/main/java/io/avaje/jsonb/generator/FieldReader.java @@ -74,10 +74,7 @@ private void initAliases(Element element) { var alias = AliasPrism.getOptionalOn(element) .map(a -> Util.escapeQuotes(a.value())) - .orElse( - JsonAliasPrism.getOptionalOn(element) - .map(a -> Util.escapeQuotes(a.value())) - .orElse(Collections.emptyList())); + .orElse(Collections.emptyList()); aliases.addAll(alias); } diff --git a/jsonb-generator/src/main/java/io/avaje/jsonb/generator/package-info.java b/jsonb-generator/src/main/java/io/avaje/jsonb/generator/package-info.java index a594e26e..0e563cbc 100644 --- a/jsonb-generator/src/main/java/io/avaje/jsonb/generator/package-info.java +++ b/jsonb-generator/src/main/java/io/avaje/jsonb/generator/package-info.java @@ -4,7 +4,6 @@ @GeneratePrism(value = io.avaje.jsonb.Json.Import.List.class, name = "ImportListPrism") @GeneratePrism(io.avaje.jsonb.Json.Alias.class) @GeneratePrism(io.avaje.jsonb.Json.Creator.class) -@GeneratePrism(io.avaje.jsonb.Json.JsonAlias.class) @GeneratePrism(io.avaje.jsonb.Json.Ignore.class) @GeneratePrism(io.avaje.jsonb.Json.Property.class) @GeneratePrism(io.avaje.jsonb.Json.MixIn.class) diff --git a/jsonb-generator/src/test/java/io/avaje/jsonb/generator/models/valid/Example2Packet.java b/jsonb-generator/src/test/java/io/avaje/jsonb/generator/models/valid/Example2Packet.java index da5ff250..8cd86fd8 100644 --- a/jsonb-generator/src/test/java/io/avaje/jsonb/generator/models/valid/Example2Packet.java +++ b/jsonb-generator/src/test/java/io/avaje/jsonb/generator/models/valid/Example2Packet.java @@ -1,11 +1,11 @@ package io.avaje.jsonb.generator.models.valid; -import io.avaje.jsonb.Json.JsonAlias; +import io.avaje.jsonb.Json; public class Example2Packet extends Packet { private final String ids; - @JsonAlias("long-ring-long-land") + @Json.Alias("long-ring-long-land") private Long longy; public Example2Packet(String ids, Long longy) { diff --git a/jsonb/src/main/java/io/avaje/jsonb/Json.java b/jsonb/src/main/java/io/avaje/jsonb/Json.java index 756bcb20..0d7db6df 100644 --- a/jsonb/src/main/java/io/avaje/jsonb/Json.java +++ b/jsonb/src/main/java/io/avaje/jsonb/Json.java @@ -139,18 +139,6 @@ String[] value(); } - /** - * Deprecated - migrate to {@link Json.Alias}. - */ - @Deprecated - @Retention(CLASS) - @Target(FIELD) - @interface JsonAlias { - - /** One or more secondary names to accept as aliases to the official name. */ - String[] value(); - } - /** * Exclude the property from serialization, deserialization or both. *
diff --git a/jsonb/src/main/java/io/avaje/jsonb/Jsonb.java b/jsonb/src/main/java/io/avaje/jsonb/Jsonb.java index 70956027..0d83ce14 100644 --- a/jsonb/src/main/java/io/avaje/jsonb/Jsonb.java +++ b/jsonb/src/main/java/io/avaje/jsonb/Jsonb.java @@ -109,14 +109,6 @@ static Builder builder() { return DefaultBootstrap.builder(); } - /** - * Migrate to builder(). - */ - @Deprecated - static Builder newBuilder() { - return builder(); - } - /** * Return json content for the given object. *