[
https://issues.apache.org/jira/browse/GEODE-10479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jinwoo Hwang updated GEODE-10479:
---------------------------------
Description:
h3. Current State
Following the successful Java 17 migration (GEODE-10465), all deprecation and
removal warnings have been suppressed to ensure build stability during the
transition. The current suppression configuration includes:
*In warnings.gradle:*
tasks.withType(JavaCompile) \{ options.compilerArgs << '-Xlint:-unchecked' <<
"-Werror" << '-Xlint:-deprecation' << '-Xlint:-removal' options.deprecation =
false }
*In geode-java.gradle:*
options.compilerArgs.addAll([ '-Xlint:-removal', '-Xlint:-deprecation' ])
h3. Problem Statement
The current suppression of all deprecation warnings creates technical debt and
prevents the codebase from:
* Leveraging modern Java 17+ APIs and features
* Identifying potentially broken code due to API removals
* Maintaining code quality standards
* Preparing for future Java version upgrades
h3. Proposed Solution
h4. Phase 1: Assessment and Categorization (2-3 weeks)
* *Baseline Analysis*
** Remove warning suppressions temporarily on a test branch
** Generate comprehensive report of all deprecation and removal warnings
** Categorize warnings by:
*** {*}Critical{*}: API removal warnings (will break in future Java versions)
*** {*}High Priority{*}: Security-related deprecated APIs
*** {*}Medium Priority{*}: Performance-impacting deprecated APIs
*** {*}Low Priority{*}: General deprecated APIs with modern alternatives
* *Module-by-Module Impact Assessment*
** Identify modules with highest warning concentration
** Document external dependency deprecations vs. internal code issues
** Create priority matrix for remediation effort
h4. Phase 2: Incremental Warning Re-enablement (4-6 weeks)
* *Start with Removal Warnings* (Week 1-2) Re-enable only removal warnings
first (highest priority): options.compilerArgs << '-Xlint:removal'
** Address API removal issues that will break in future Java versions
** Replace removed APIs with modern alternatives
** Focus on critical functionality first
* *Enable Deprecation Warnings by Module* (Week 3-6) Enable deprecation
warnings module by module: if (project.name in ['geode-core', 'geode-common'])
\{ options.deprecation = true options.compilerArgs << '-Xlint:deprecation' }
** Start with core modules with fewer dependencies
** Gradually expand to more complex modules
h4. Phase 3: API Modernization (6-8 weeks)
* *Security API Updates*
** Replace deprecated security manager APIs
** Update SSL/TLS configuration APIs
** Modernize authentication mechanisms
* *Collections and Concurrency*
** Replace deprecated collection methods
** Update concurrent API usage
** Leverage Java 17 concurrency improvements
* *I/O and Networking*
** Replace deprecated networking APIs
** Update file I/O operations
** Leverage NIO.2 improvements
* *Reflection and Introspection*
** Update reflection API usage for module system compatibility
** Replace deprecated introspection methods
** Add proper module exports where needed
h4. Phase 4: Full Warning Compliance (2 weeks)
* *Remove All Suppressions* Final configuration with all warnings enabled:
tasks.withType(JavaCompile) \{ options.compilerArgs << '-Xlint:unchecked' <<
"-Werror" << '-Xlint:deprecation' << '-Xlint:removal' options.deprecation =
true }
* *Establish Warning Gates*
** Configure CI/CD to fail on new deprecation warnings
** Add checkstyle rules to prevent deprecated API introduction
** Document approved exceptions with justification
h3. Acceptance Criteria
* All '-Xlint:-removal' suppressions removed and underlying issues resolved
* All '-Xlint:-deprecation' suppressions removed and underlying issues
resolved
* 'options.deprecation = false' changed to 'options.deprecation = true'
* Zero deprecation warnings in clean build
* Zero removal warnings in clean build
* CI/CD pipeline fails on new deprecation/removal warnings
* Documentation updated with modern API usage patterns
* Performance benchmarks show no regression from API changes
h3. Implementation Strategy
# *Create Feature Branch*
# {*}Incremental PRs{*}: Submit changes module by module for easier review
# {*}Parallel Development{*}: Allow normal development to continue while
cleanup progresses
# {*}Testing Strategy{*}: Ensure all existing tests pass after each
modernization change
# {*}Rollback Plan{*}: Maintain ability to temporarily suppress warnings if
blocking issues discovered
h3. Estimated Effort
* {*}Total Effort{*}: 12-17 weeks
* {*}Team Size{*}: 2-3 developers
* {*}Risk Level{*}: Medium (phased approach minimizes disruption)
h3. Benefits
* {*}Code Quality{*}: Modern, maintainable codebase using current Java 17 APIs
* {*}Future Compatibility{*}: Preparation for Java 18+ upgrades
* {*}Performance{*}: Potential improvements from modern API usage
* {*}Security{*}: Updated security APIs and practices
* {*}Developer Experience{*}: Cleaner build output and better IDE warnings
h3. Dependencies
* Requires completion of GEODE-10465 (Java 17 migration)
* May require coordination with external dependency updates
* Should align with any planned Gradle or build system upgrades
h3. Success Metrics
* Zero suppressed deprecation warnings
* Build time maintained or improved
* Test suite execution time maintained or improved
* No functional regressions in existing features
* Documentation updated with modern patterns
h2. Apache Geode Java 17 Upgrade - Java API Compatibility Assessment Report
Based on my analysis of the Apache Geode codebase with Java 17 compiler
warnings enabled, here is a focused assessment of *Java standard library API
changes* that need attention during the Java 8 to 17 upgrade:
h3. *Summary Statistics*
* {*}Java 17 removal warnings{*}: 2 distinct issues
* {*}Java 17 deprecation warnings{*}: 4 distinct API changes
* {*}Total estimated effort{*}: 1-2 months for critical path
h3. *1. Java 17 REMOVAL Warnings (Critical Priority)*
These APIs are marked for removal and will break in future Java versions:
h4. *SecurityManager Related (High Impact)*
* {*}Location{*}:
geode-logging/src/main/java/org/apache/geode/logging/internal/OSProcess.java:200
* {*}Issue{*}: System.getSecurityManager() and SecurityManager marked for
removal
* {*}Code{*}: SecurityManager security = System.getSecurityManager();
* {*}Difficulty{*}: *Complex* - Security model redesign required
* {*}Time Estimate{*}: 2-3 weeks
* {*}Impact{*}: Core security functionality needs architectural changes
h4. *Integer Constructor (Medium Impact)*
* {*}Locations{*}:
extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java:197-198
* {*}Issue{*}: new Integer(int) constructor deprecated for removal
* {*}Code{*}: new Integer(oldMaxActiveSessions), new
Integer(this.maxActiveSessions)
* {*}Difficulty{*}: *Simple* - Direct replacement available
* {*}Time Estimate{*}: 1 day
* {*}Fix{*}: Replace with Integer.valueOf(int)
h3. *2. Java 17 DEPRECATION Warnings (Medium Priority)*
h4. *Reflection API Changes*
{*}Location{*}: Multiple files
*
geode-serialization/src/main/java/org/apache/geode/internal/serialization/internal/DSFIDSerializerImpl.java:343
** {*}Issue{*}: AccessibleObject.isAccessible() deprecated
** {*}Code{*}: if (!cons.isAccessible())
* Various modules using Class.newInstance():
**
geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java:137
**
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java:4208
**
extensions/session-testing-war/src/main/java/org/apache/geode/modules/session/CommandServlet.java:89
**
extensions/geode-modules/src/main/java/org/apache/geode/modules/util/RegionHelper.java:146
* {*}Difficulty{*}: *Moderate* - Reflection code needs updating
* {*}Time Estimate{*}: 1-2 weeks
* {*}Fix{*}: Replace with Class.getDeclaredConstructor().newInstance()
h4. *Network API Changes*
* {*}Location{*}: AvailablePort.java
* {*}Issues{*}:
** Line 116: MulticastSocket.setInterface(InetAddress)
** Line 126: MulticastSocket.joinGroup(InetAddress)
* {*}Difficulty{*}: *Moderate* - Network code refactoring
* {*}Time Estimate{*}: 1 week
* {*}Fix{*}: Use newer network interface methods
h4. *Proxy API Changes*
* {*}Location{*}:
geode-deployment/geode-deployment-legacy/src/main/java/org/apache/geode/classloader/internal/LegacyClasspathServiceImpl.java:235
* {*}Issue{*}: Proxy.getProxyClass(ClassLoader, Class<?>...) deprecated
* {*}Code{*}: return Proxy.getProxyClass(classLoader, classObjs);
* {*}Difficulty{*}: *Moderate* - Proxy generation update needed
* {*}Time Estimate{*}: 1 week
h3. *3. Priority Assessment and Effort Estimates*
h4. *Critical (Must Fix) - 3-4 weeks total*
# *SecurityManager removal* - 3 weeks (Complex architectural change)
# *Integer constructor removal* - 1 day (Simple replacement)
h4. *Important (Should Fix) - 3-4 weeks total*
# *Reflection API updates* - 2 weeks (Multiple files, testing needed)
# *Network API deprecations* - 1 week (Moderate complexity)
# *Proxy API updates* - 1 week (Moderate complexity)
h3. *4. Risk Assessment*
h4. *High Risk*
* {*}SecurityManager changes{*}: Affects core security, requires architectural
decisions about security model
* {*}Reflection changes{*}: Could break serialization/deserialization
mechanisms
h4. *Medium Risk*
* {*}Network API changes{*}: Could affect clustering and membership protocols
* {*}Proxy changes{*}: May impact dynamic class loading features
h4. *Low Risk*
* {*}Integer constructor{*}: Direct substitution with no behavioral changes
h3. *5. Recommended Action Plan*
h4. *Phase 1 (Immediate - 1 week)*
# Fix Integer constructor removals (1 day)
# Update Class.newInstance() calls (1 week)
# Set up build with warnings enabled for continuous monitoring
h4. *Phase 2 (Short-term - 1 month)*
# SecurityManager redesign and implementation (3 weeks)
# Network API updates (1 week)
h4. *Phase 3 (Medium-term - 2 weeks)*
# Proxy API updates (1 week)
# Reflection API refinements (1 week)
# Comprehensive testing of all changes
h3. *6. Implementation Notes*
h4. *Quick Wins (1-2 days effort)*
// Replace this:
new Integer(value)
// With this:
Integer.valueOf(value)
// Replace this:
clazz.newInstance()
// With this:
clazz.getDeclaredConstructor().newInstance()
h4. *Complex Changes (2-3 weeks effort)*
* {*}SecurityManager{*}: Need to evaluate if security checks are still needed
or can be removed entirely
* {*}Network APIs{*}: Update to use NetworkInterface and modern multicast
methods
* {*}Reflection{*}: Ensure proper exception handling for new reflection
patterns
h3. *Total Effort Estimate: 1-2 months for complete Java 17 compatibility*
This focused assessment addresses only the Java standard library compatibility
issues that will prevent successful compilation or cause runtime failures when
upgrading from Java 8 to Java 17.
was:
h3. Current State
Following the successful Java 17 migration (GEODE-10465), all deprecation and
removal warnings have been suppressed to ensure build stability during the
transition. The current suppression configuration includes:
*In warnings.gradle:*
tasks.withType(JavaCompile) \{ options.compilerArgs << '-Xlint:-unchecked' <<
"-Werror" << '-Xlint:-deprecation' << '-Xlint:-removal' options.deprecation =
false }
*In geode-java.gradle:*
options.compilerArgs.addAll([ '-Xlint:-removal', '-Xlint:-deprecation' ])
h3. Problem Statement
The current suppression of all deprecation warnings creates technical debt and
prevents the codebase from:
* Leveraging modern Java 17+ APIs and features
* Identifying potentially broken code due to API removals
* Maintaining code quality standards
* Preparing for future Java version upgrades
h3. Proposed Solution
h4. Phase 1: Assessment and Categorization (2-3 weeks)
* *Baseline Analysis*
** Remove warning suppressions temporarily on a test branch
** Generate comprehensive report of all deprecation and removal warnings
** Categorize warnings by:
*** {*}Critical{*}: API removal warnings (will break in future Java versions)
*** {*}High Priority{*}: Security-related deprecated APIs
*** {*}Medium Priority{*}: Performance-impacting deprecated APIs
*** {*}Low Priority{*}: General deprecated APIs with modern alternatives
* *Module-by-Module Impact Assessment*
** Identify modules with highest warning concentration
** Document external dependency deprecations vs. internal code issues
** Create priority matrix for remediation effort
h4. Phase 2: Incremental Warning Re-enablement (4-6 weeks)
* *Start with Removal Warnings* (Week 1-2) Re-enable only removal warnings
first (highest priority): options.compilerArgs << '-Xlint:removal'
** Address API removal issues that will break in future Java versions
** Replace removed APIs with modern alternatives
** Focus on critical functionality first
* *Enable Deprecation Warnings by Module* (Week 3-6) Enable deprecation
warnings module by module: if (project.name in ['geode-core', 'geode-common'])
\{ options.deprecation = true options.compilerArgs << '-Xlint:deprecation' }
** Start with core modules with fewer dependencies
** Gradually expand to more complex modules
h4. Phase 3: API Modernization (6-8 weeks)
* *Security API Updates*
** Replace deprecated security manager APIs
** Update SSL/TLS configuration APIs
** Modernize authentication mechanisms
* *Collections and Concurrency*
** Replace deprecated collection methods
** Update concurrent API usage
** Leverage Java 17 concurrency improvements
* *I/O and Networking*
** Replace deprecated networking APIs
** Update file I/O operations
** Leverage NIO.2 improvements
* *Reflection and Introspection*
** Update reflection API usage for module system compatibility
** Replace deprecated introspection methods
** Add proper module exports where needed
h4. Phase 4: Full Warning Compliance (2 weeks)
* *Remove All Suppressions* Final configuration with all warnings enabled:
tasks.withType(JavaCompile) \{ options.compilerArgs << '-Xlint:unchecked' <<
"-Werror" << '-Xlint:deprecation' << '-Xlint:removal' options.deprecation =
true }
* *Establish Warning Gates*
** Configure CI/CD to fail on new deprecation warnings
** Add checkstyle rules to prevent deprecated API introduction
** Document approved exceptions with justification
h3. Acceptance Criteria
* All '-Xlint:-removal' suppressions removed and underlying issues resolved
* All '-Xlint:-deprecation' suppressions removed and underlying issues
resolved
* 'options.deprecation = false' changed to 'options.deprecation = true'
* Zero deprecation warnings in clean build
* Zero removal warnings in clean build
* CI/CD pipeline fails on new deprecation/removal warnings
* Documentation updated with modern API usage patterns
* Performance benchmarks show no regression from API changes
h3. Implementation Strategy
# *Create Feature Branch*
# {*}Incremental PRs{*}: Submit changes module by module for easier review
# {*}Parallel Development{*}: Allow normal development to continue while
cleanup progresses
# {*}Testing Strategy{*}: Ensure all existing tests pass after each
modernization change
# {*}Rollback Plan{*}: Maintain ability to temporarily suppress warnings if
blocking issues discovered
h3. Estimated Effort
* {*}Total Effort{*}: 12-17 weeks
* {*}Team Size{*}: 2-3 developers
* {*}Risk Level{*}: Medium (phased approach minimizes disruption)
h3. Benefits
* {*}Code Quality{*}: Modern, maintainable codebase using current Java 17 APIs
* {*}Future Compatibility{*}: Preparation for Java 18+ upgrades
* {*}Performance{*}: Potential improvements from modern API usage
* {*}Security{*}: Updated security APIs and practices
* {*}Developer Experience{*}: Cleaner build output and better IDE warnings
h3. Dependencies
* Requires completion of GEODE-10465 (Java 17 migration)
* May require coordination with external dependency updates
* Should align with any planned Gradle or build system upgrades
h3. Success Metrics
* Zero suppressed deprecation warnings
* Build time maintained or improved
* Test suite execution time maintained or improved
* No functional regressions in existing features
* Documentation updated with modern patterns
> Address deprecation and removal warnings in Java 17 migration by
> incrementally re-enabling compiler warnings and modernizing deprecated API
> usage
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-10479
> URL: https://issues.apache.org/jira/browse/GEODE-10479
> Project: Geode
> Issue Type: Task
> Reporter: Jinwoo Hwang
> Priority: Major
>
> h3. Current State
> Following the successful Java 17 migration (GEODE-10465), all deprecation and
> removal warnings have been suppressed to ensure build stability during the
> transition. The current suppression configuration includes:
> *In warnings.gradle:*
> tasks.withType(JavaCompile) \{ options.compilerArgs << '-Xlint:-unchecked' <<
> "-Werror" << '-Xlint:-deprecation' << '-Xlint:-removal' options.deprecation =
> false }
> *In geode-java.gradle:*
> options.compilerArgs.addAll([ '-Xlint:-removal', '-Xlint:-deprecation' ])
> h3. Problem Statement
> The current suppression of all deprecation warnings creates technical debt
> and prevents the codebase from:
> * Leveraging modern Java 17+ APIs and features
> * Identifying potentially broken code due to API removals
> * Maintaining code quality standards
> * Preparing for future Java version upgrades
> h3. Proposed Solution
> h4. Phase 1: Assessment and Categorization (2-3 weeks)
> * *Baseline Analysis*
> ** Remove warning suppressions temporarily on a test branch
> ** Generate comprehensive report of all deprecation and removal warnings
> ** Categorize warnings by:
> *** {*}Critical{*}: API removal warnings (will break in future Java versions)
> *** {*}High Priority{*}: Security-related deprecated APIs
> *** {*}Medium Priority{*}: Performance-impacting deprecated APIs
> *** {*}Low Priority{*}: General deprecated APIs with modern alternatives
> * *Module-by-Module Impact Assessment*
> ** Identify modules with highest warning concentration
> ** Document external dependency deprecations vs. internal code issues
> ** Create priority matrix for remediation effort
> h4. Phase 2: Incremental Warning Re-enablement (4-6 weeks)
> * *Start with Removal Warnings* (Week 1-2) Re-enable only removal warnings
> first (highest priority): options.compilerArgs << '-Xlint:removal'
> ** Address API removal issues that will break in future Java versions
> ** Replace removed APIs with modern alternatives
> ** Focus on critical functionality first
> * *Enable Deprecation Warnings by Module* (Week 3-6) Enable deprecation
> warnings module by module: if (project.name in ['geode-core',
> 'geode-common']) \{ options.deprecation = true options.compilerArgs <<
> '-Xlint:deprecation' }
> ** Start with core modules with fewer dependencies
> ** Gradually expand to more complex modules
> h4. Phase 3: API Modernization (6-8 weeks)
> * *Security API Updates*
> ** Replace deprecated security manager APIs
> ** Update SSL/TLS configuration APIs
> ** Modernize authentication mechanisms
> * *Collections and Concurrency*
> ** Replace deprecated collection methods
> ** Update concurrent API usage
> ** Leverage Java 17 concurrency improvements
> * *I/O and Networking*
> ** Replace deprecated networking APIs
> ** Update file I/O operations
> ** Leverage NIO.2 improvements
> * *Reflection and Introspection*
> ** Update reflection API usage for module system compatibility
> ** Replace deprecated introspection methods
> ** Add proper module exports where needed
> h4. Phase 4: Full Warning Compliance (2 weeks)
> * *Remove All Suppressions* Final configuration with all warnings enabled:
> tasks.withType(JavaCompile) \{ options.compilerArgs << '-Xlint:unchecked' <<
> "-Werror" << '-Xlint:deprecation' << '-Xlint:removal' options.deprecation =
> true }
> * *Establish Warning Gates*
> ** Configure CI/CD to fail on new deprecation warnings
> ** Add checkstyle rules to prevent deprecated API introduction
> ** Document approved exceptions with justification
> h3. Acceptance Criteria
> * All '-Xlint:-removal' suppressions removed and underlying issues resolved
> * All '-Xlint:-deprecation' suppressions removed and underlying issues
> resolved
> * 'options.deprecation = false' changed to 'options.deprecation = true'
> * Zero deprecation warnings in clean build
> * Zero removal warnings in clean build
> * CI/CD pipeline fails on new deprecation/removal warnings
> * Documentation updated with modern API usage patterns
> * Performance benchmarks show no regression from API changes
> h3. Implementation Strategy
> # *Create Feature Branch*
> # {*}Incremental PRs{*}: Submit changes module by module for easier review
> # {*}Parallel Development{*}: Allow normal development to continue while
> cleanup progresses
> # {*}Testing Strategy{*}: Ensure all existing tests pass after each
> modernization change
> # {*}Rollback Plan{*}: Maintain ability to temporarily suppress warnings if
> blocking issues discovered
> h3. Estimated Effort
> * {*}Total Effort{*}: 12-17 weeks
> * {*}Team Size{*}: 2-3 developers
> * {*}Risk Level{*}: Medium (phased approach minimizes disruption)
> h3. Benefits
> * {*}Code Quality{*}: Modern, maintainable codebase using current Java 17
> APIs
> * {*}Future Compatibility{*}: Preparation for Java 18+ upgrades
> * {*}Performance{*}: Potential improvements from modern API usage
> * {*}Security{*}: Updated security APIs and practices
> * {*}Developer Experience{*}: Cleaner build output and better IDE warnings
> h3. Dependencies
> * Requires completion of GEODE-10465 (Java 17 migration)
> * May require coordination with external dependency updates
> * Should align with any planned Gradle or build system upgrades
> h3. Success Metrics
> * Zero suppressed deprecation warnings
> * Build time maintained or improved
> * Test suite execution time maintained or improved
> * No functional regressions in existing features
> * Documentation updated with modern patterns
>
> h2. Apache Geode Java 17 Upgrade - Java API Compatibility Assessment Report
> Based on my analysis of the Apache Geode codebase with Java 17 compiler
> warnings enabled, here is a focused assessment of *Java standard library API
> changes* that need attention during the Java 8 to 17 upgrade:
> h3. *Summary Statistics*
> * {*}Java 17 removal warnings{*}: 2 distinct issues
> * {*}Java 17 deprecation warnings{*}: 4 distinct API changes
> * {*}Total estimated effort{*}: 1-2 months for critical path
> h3. *1. Java 17 REMOVAL Warnings (Critical Priority)*
> These APIs are marked for removal and will break in future Java versions:
> h4. *SecurityManager Related (High Impact)*
> * {*}Location{*}:
> geode-logging/src/main/java/org/apache/geode/logging/internal/OSProcess.java:200
> * {*}Issue{*}: System.getSecurityManager() and SecurityManager marked for
> removal
> * {*}Code{*}: SecurityManager security = System.getSecurityManager();
> * {*}Difficulty{*}: *Complex* - Security model redesign required
> * {*}Time Estimate{*}: 2-3 weeks
> * {*}Impact{*}: Core security functionality needs architectural changes
> h4. *Integer Constructor (Medium Impact)*
> * {*}Locations{*}:
> extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/DeltaSessionManager.java:197-198
> * {*}Issue{*}: new Integer(int) constructor deprecated for removal
> * {*}Code{*}: new Integer(oldMaxActiveSessions), new
> Integer(this.maxActiveSessions)
> * {*}Difficulty{*}: *Simple* - Direct replacement available
> * {*}Time Estimate{*}: 1 day
> * {*}Fix{*}: Replace with Integer.valueOf(int)
> h3. *2. Java 17 DEPRECATION Warnings (Medium Priority)*
> h4. *Reflection API Changes*
> {*}Location{*}: Multiple files
> *
> geode-serialization/src/main/java/org/apache/geode/internal/serialization/internal/DSFIDSerializerImpl.java:343
> ** {*}Issue{*}: AccessibleObject.isAccessible() deprecated
> ** {*}Code{*}: if (!cons.isAccessible())
> * Various modules using Class.newInstance():
> **
> geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java:137
> **
> geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java:4208
> **
> extensions/session-testing-war/src/main/java/org/apache/geode/modules/session/CommandServlet.java:89
> **
> extensions/geode-modules/src/main/java/org/apache/geode/modules/util/RegionHelper.java:146
> * {*}Difficulty{*}: *Moderate* - Reflection code needs updating
> * {*}Time Estimate{*}: 1-2 weeks
> * {*}Fix{*}: Replace with Class.getDeclaredConstructor().newInstance()
> h4. *Network API Changes*
> * {*}Location{*}: AvailablePort.java
> * {*}Issues{*}:
> ** Line 116: MulticastSocket.setInterface(InetAddress)
> ** Line 126: MulticastSocket.joinGroup(InetAddress)
> * {*}Difficulty{*}: *Moderate* - Network code refactoring
> * {*}Time Estimate{*}: 1 week
> * {*}Fix{*}: Use newer network interface methods
> h4. *Proxy API Changes*
> * {*}Location{*}:
> geode-deployment/geode-deployment-legacy/src/main/java/org/apache/geode/classloader/internal/LegacyClasspathServiceImpl.java:235
> * {*}Issue{*}: Proxy.getProxyClass(ClassLoader, Class<?>...) deprecated
> * {*}Code{*}: return Proxy.getProxyClass(classLoader, classObjs);
> * {*}Difficulty{*}: *Moderate* - Proxy generation update needed
> * {*}Time Estimate{*}: 1 week
> h3. *3. Priority Assessment and Effort Estimates*
> h4. *Critical (Must Fix) - 3-4 weeks total*
> # *SecurityManager removal* - 3 weeks (Complex architectural change)
> # *Integer constructor removal* - 1 day (Simple replacement)
> h4. *Important (Should Fix) - 3-4 weeks total*
> # *Reflection API updates* - 2 weeks (Multiple files, testing needed)
> # *Network API deprecations* - 1 week (Moderate complexity)
> # *Proxy API updates* - 1 week (Moderate complexity)
> h3. *4. Risk Assessment*
> h4. *High Risk*
> * {*}SecurityManager changes{*}: Affects core security, requires
> architectural decisions about security model
> * {*}Reflection changes{*}: Could break serialization/deserialization
> mechanisms
> h4. *Medium Risk*
> * {*}Network API changes{*}: Could affect clustering and membership protocols
> * {*}Proxy changes{*}: May impact dynamic class loading features
> h4. *Low Risk*
> * {*}Integer constructor{*}: Direct substitution with no behavioral changes
> h3. *5. Recommended Action Plan*
> h4. *Phase 1 (Immediate - 1 week)*
> # Fix Integer constructor removals (1 day)
> # Update Class.newInstance() calls (1 week)
> # Set up build with warnings enabled for continuous monitoring
> h4. *Phase 2 (Short-term - 1 month)*
> # SecurityManager redesign and implementation (3 weeks)
> # Network API updates (1 week)
> h4. *Phase 3 (Medium-term - 2 weeks)*
> # Proxy API updates (1 week)
> # Reflection API refinements (1 week)
> # Comprehensive testing of all changes
> h3. *6. Implementation Notes*
> h4. *Quick Wins (1-2 days effort)*
>
> // Replace this:
> new Integer(value)
> // With this:
> Integer.valueOf(value)
> // Replace this:
> clazz.newInstance()
> // With this:
> clazz.getDeclaredConstructor().newInstance()
>
> h4. *Complex Changes (2-3 weeks effort)*
> * {*}SecurityManager{*}: Need to evaluate if security checks are still
> needed or can be removed entirely
> * {*}Network APIs{*}: Update to use NetworkInterface and modern multicast
> methods
> * {*}Reflection{*}: Ensure proper exception handling for new reflection
> patterns
> h3. *Total Effort Estimate: 1-2 months for complete Java 17 compatibility*
> This focused assessment addresses only the Java standard library
> compatibility issues that will prevent successful compilation or cause
> runtime failures when upgrading from Java 8 to Java 17.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)