[
https://issues.apache.org/jira/browse/CONFIGURATION-855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shan Jiang updated CONFIGURATION-855:
-------------------------------------
Description:
Summary
Seven classes implement `Cloneable` with correct `clone()` but do not override
`equals()`/`hashCode()`. `x.clone().equals` always returns `false`.
Affected classes
- `BaseConfiguration`
- `CombinedConfiguration`
- `CompositeConfiguration`
- `BasicBuilderParameters`
- `FileBasedBuilderParametersImpl`
- `CombinedBuilderParametersImpl`
- `MultiFileBuilderParametersImpl`
How this was found
Detected by an automated JDK conformance oracle
(`ObjectOracles.checkCloneEqualsConsistency`).
was:
### Summary
Seven classes implement `Cloneable` with correct `clone()` but do not override
`equals()`/`hashCode()`. `x.clone().equals(x)` always returns `false`.
### Affected classes
- `BaseConfiguration`
- `CombinedConfiguration`
- `CompositeConfiguration`
- `BasicBuilderParameters`
- `FileBasedBuilderParametersImpl`
- `CombinedBuilderParametersImpl`
- `MultiFileBuilderParametersImpl`
### How this was found
Detected by an automated JDK conformance oracle
(`ObjectOracles.checkCloneEqualsConsistency`).
> apache/commons-configuration — 7 Cloneable classes missing equals()/hashCode()
> ------------------------------------------------------------------------------
>
> Key: CONFIGURATION-855
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-855
> Project: Commons Configuration
> Issue Type: Bug
> Reporter: Shan Jiang
> Priority: Major
>
> Summary
> Seven classes implement `Cloneable` with correct `clone()` but do not override
> `equals()`/`hashCode()`. `x.clone().equals` always returns `false`.
>
> Affected classes
> - `BaseConfiguration`
> - `CombinedConfiguration`
> - `CompositeConfiguration`
> - `BasicBuilderParameters`
> - `FileBasedBuilderParametersImpl`
> - `CombinedBuilderParametersImpl`
> - `MultiFileBuilderParametersImpl`
>
> How this was found
> Detected by an automated JDK conformance oracle
> (`ObjectOracles.checkCloneEqualsConsistency`).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)