vasiliy-mikhailov opened a new pull request, #2948: URL: https://github.com/apache/tika/pull/2948
## Results Scoped PIT (PIT 1.15.2) over module `tika-core`, JDK 17. Scope: `targetClasses = org.apache.tika.metadata.Metadata, org.apache.tika.metadata.Property`; `targetTests = org.apache.tika.metadata.TestMetadata`. | Metric | Before | After | | --- | --- | --- | | Mutation score | 84/203 killed (41%) | 92/203 killed (45%) | | Line coverage | 185/353 (52%) | 194/353 (55%) | The new tests kill 8 additional mutations and cover 9 additional lines at this scope (test strength 76% -> 81%). Measured with a forced clean test recompile (`rm -rf target/test-classes` + `test-compile`) before each of the before/after PIT runs, so the numbers reflect the test change and not stale compiled classes. ## What this adds New unit tests in `TestMetadata` covering `org.apache.tika.metadata.Metadata`: - Reserved-key write guard: a reserved key `X-TIKA:reserved` is dropped on an untrusted `Metadata` (the default) and accepted only after `setTrusted(true)`. - `MetadataWriteLimiter` delegation on `set(String, String)` and `set(Property, String)`: a blocking limiter prevents persistence, a capturing limiter writes through. - Composite property stored under its primary property plus its aliases. - `hashCode` sensitivity to value changes, so equal-by-value maps are not silently collapsed. ## Scope Tests only. No production code is changed. Module `tika-core`, JDK 17. ## Disclosure This PR was generated with an AI-assisted pipeline built around mutation testing (PIT). The pipeline mutates the target class (flipping conditions and changing boundary/edge cases) and runs the existing tests against each mutant; where a mutant survives (the existing tests do not catch that edge case), it writes a focused test for that case and reruns PIT to confirm the new test actually kills that specific mutant. -- 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]
