Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEODE-10134: Add JDK 17 proxy classes to serialization accept list #7480

Conversation

demery-pivotal
Copy link
Contributor

Jar deployment serializes proxies. JDK 17 creates proxy classes in
dynamically created packages with names like jdk.proxy2 and
jdk.proxy3.

Jar deployment serializes proxies. JDK 17 creates proxy classes in
dynamically created packages with names like `jdk.proxy2` and
`jdk.proxy3`.
@demery-pivotal demery-pivotal added windows add this label to get Windows JDK11 PR checks too jdk17 add this label to get Linux JDK17 PR checks too labels Mar 23, 2022
@demery-pivotal
Copy link
Contributor Author

NOTE: This fixes all of the deployment-related distributed tests on JDK 17.

All other JDK 17 test failures are expected for now, and will be fixed later PRs.

@demery-pivotal demery-pivotal marked this pull request as ready for review March 23, 2022 22:37
@@ -98,6 +98,7 @@ private static StringJoiner dependenciesPattern() {

// jar deployment
.add("com.sun.proxy.$Proxy*")
.add("jdk.proxy*")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will jdk.proxy*.$Proxy* work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, no. The filter matcher pattern is not a regular expression. See the rules for the filter pattern here: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/ObjectInputFilter.Config.html#createFilter(java.lang.String)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Seems like the number in the class name could be up to jdk.proxy6. Adding jdk.proxy* is good.

@demery-pivotal demery-pivotal merged commit ae25733 into apache:develop Mar 24, 2022
@demery-pivotal demery-pivotal deleted the geode-10134/serializables-filter-proxy-pattern branch March 24, 2022 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jdk17 add this label to get Linux JDK17 PR checks too windows add this label to get Windows JDK11 PR checks too
Projects
None yet
2 participants