You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/07/29 11:52:59 UTC
[PR] [MPH-191] Fix help:evaluate failing on Java 18+ due to Hashtable reflection [maven-help-plugin]
elharo opened a new pull request, #402:
URL: https://github.com/apache/maven-help-plugin/pull/402
**Problem:** `help:evaluate` fails on Java 18+ when evaluating expressions that return `Properties` subclasses (e.g. `project.properties` after `effective-pom` replaces them with `SortedProperties`). The custom XStream `PropertiesConverter` used exact class match (`Properties.class == type`), so subclasses fall through to `SerializableConverter`, which tries to reflectively access `java.util.Hashtable.table` — forbidden by the Java module system.
**Fix:** Changed `Properties.class == type` to `Properties.class.isAssignableFrom(type)` in `canConvert()`, so all `Properties` subclasses are handled by the converter that simply copies entries into a `TreeMap`, avoiding reflection on `Hashtable`.
Fixes #166
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MPH-191] Fix help:evaluate failing on Java 18+ due to Hashtable reflection [maven-help-plugin]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on PR #402:
URL: https://github.com/apache/maven-help-plugin/pull/402#issuecomment-5415630201
I'm not sure what you're seeing. I've now merged in the commits from master including #406 and there are test chnanes here, and they seem related to this PR. Wouldn't be the first time I've mis-stacked something but I don't see it here yet.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MPH-191] Fix help:evaluate failing on Java 18+ due to Hashtable reflection [maven-help-plugin]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz merged PR #402:
URL: https://github.com/apache/maven-help-plugin/pull/402
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org