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: [email protected]

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

Reply via email to