Skip to content

use java 17 features - #747

Merged
cowtowncoder merged 1 commit into
FasterXML:3.xfrom
pjfanning:java17
Aug 14, 2026
Merged

use java 17 features#747
cowtowncoder merged 1 commit into
FasterXML:3.xfrom
pjfanning:java17

Conversation

@pjfanning

Copy link
Copy Markdown
Member

Dead JDK detection removed (Smile)

  • SmileParser.java — Removed JDK11_OR_LATER reflection check and two dead else branches in _decodeShortAsciiName and _decodeShortAsciiValue (-53 lines)

Collections/Arrays → List.of()/Set.of()/Map.of()

  • AvroAnnotationIntrospector.java — Collections.singletonList → List.of
  • AvroSchemaHelper.java — new HashSet<>(Arrays.asList(...)) → Set.of(...), Arrays.asList → List.of
  • EnumLookup.java — Collections.emptySet → Set.of, Collections.singletonList → List.of, Arrays.asList → List.of
  • TypeResolver.java — Collections.emptyMap → Map.of
  • ProtobufSchemaPreprocessor.java — new HashSet<>(Arrays.asList(...)) → Set.of(...)

Charset.forName("UTF-8") → StandardCharsets.UTF_8

  • ProtobufGenerator.java
  • ProtobufSchemaLoader.java
  • Proto3LabellessField708Test.java

instanceof pattern matching (Java 16)

  • avro (3 sites) — AvroAnnotationIntrospector, CustomEncodingSerializer, RecordVisitor
  • cbor (3 sites) — CBORParser (2), CBORSimpleValue
  • ion (11 sites) — IonGenerator (2), IonParser, IonValueDeserializer (3), TimestampSerializer, EnumAsIonSymbolSerializer, IonAnnotationTypeDeserializer (2), IonAnnotationTypeSerializer
  • protobuf (9 sites) — TypeResolver (6), NativeProtobufSchema (2), ProtobufField, FieldTypes

@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Coverage Type Coverage Change
📝 Instructions 76.97% 📈 +0.07%
🔀 Branches 68.13% 📈 +0.02%

@cowtowncoder
cowtowncoder merged commit db30d44 into FasterXML:3.x Aug 14, 2026
3 checks passed
@pjfanning
pjfanning deleted the java17 branch August 14, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants