rzo1 opened a new pull request, #161: URL: https://github.com/apache/openjpa/pull/161
`extractSchemaGenObjects` now records which of the four script keys held a `Writer`/`Reader` and strips them from a copy, so the map handed to `fromProperties` is left untouched — see https://issues.apache.org/jira/browse/OPENJPA-2955. The copy is only made when one of the keys is actually an object, so the common all-strings case allocates nothing. Both halves of the report reproduce. `Map.of(...)` really does throw `UnsupportedOperationException`, and there is an in-tree victim of the mutation as well: `DistributedJDBCConfigurationImpl.fromProperties` calls `super.fromProperties(original)` and then keeps using `original` to build every slice, so each slice silently lost its script `Writer`/`Reader`. New `TestSchemaGenObjectProperties` covers capture, caller-map immutability, an unmodifiable input map and the plain string path. Three of its four tests fail against master (2 failures plus the `UnsupportedOperationException`); all four pass here, as do `TestSchemaGenDrop`, `TestSchemaGenAnnotations`, `TestSchemaGenerationScripts` and `TestSchemaGenerationProperties` (34 tests). The test lives in `openjpa-jdbc` rather than `openjpa-kernel` because constructing an `OpenJPAConfigurationImpl` needs a `ProductDerivation` on the classpath, and `openjpa-kernel` has none in its own test scope. -- 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]
