iemejia opened a new pull request, #3789:
URL: https://github.com/apache/avro/pull/3789

   ## Summary
   
   Raise the minimum Java version to 17 and modernize the Java codebase to use 
Java 17+ language features.
   
   ## Changes
   
   ### Build & CI
   - Set `maven.compiler.source/release` to 17 across all modules
   - Update toolchain checks to require JDK 17, 21, and 25
   - Update enforcer `maxJdkVersion` to 17
   - Replace integration test profiles [11,17,21] with [17,21,25]
   - Update all CI workflows from JDK [8,11,17,21] to [17,21,25]
   - Update Dockerfile to install JDK 17, 21, 25 (default 25)
   - Remove `module-info` `ignoreClasses` workaround from enforcer plugin
   - Re-enable Spotless `removeUnusedImports` validation (works on JDK 17+)
   
   ### Dead code & workaround removal
   - Remove `MapUtil` class (JDK-8161372 workaround, fixed in JDK 9)
   - Remove dead `TestProtocolReflect.error()` test (required JDK <= 11)
   - Remove commented-out `tools.jar` code in `TestSpecificData` (JDK 8 only)
   - Replace deprecated `Class.newInstance()` with 
`getDeclaredConstructor().newInstance()`
   - Move `TestJavaRecords` from `java17-test` module into main `avro` module
   
   ### Bug fix
   - Fix non-static inner class detection in `ReflectData` to use 
`Class.isMemberClass()` instead of relying on synthetic `this$0` field 
visibility (broken on JDK 21+)
   
   ### Java 17 language modernization
   - Pattern matching `instanceof` across core classes (`GenericData`, 
`Schema`, `ReflectData`, `SpecificData`, etc.)
   - `Stream.toList()` instead of `.collect(Collectors.toList())`
   - Collection factories: `List.of()`, `Set.of()`, `Map.of()` replacing 
`Collections.singletonList()`, `Collections.emptyList()`, etc.
   
   ### Documentation cleanup
   - Remove stale Unsafe/Android javadoc in `ReflectionUtil`
   - Remove obsolete "Java 8+" qualifiers in `AbstractAvroMojo` and 
`SpecificCompiler`
   - Update `dependabot.yml` Jetty comment (actual blocker is javax→jakarta, 
not JDK version)
   - Update Getting Started docs compiler example to Java 17
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to