[core] Remove deprecated members in AbstractPropertySource

AbstractPropertySource#propertyDescriptors (private now)
AbstractPropertySource#propertyValuesByDescriptor (private now)
AbstractPropertySource#copyPropertyDescriptors
AbstractPropertySource#copyPropertyValues
This commit is contained in:
Andreas Dangel
2024-02-08 09:22:19 +01:00
parent 9e5115479d
commit 50cbfe6834
2 changed files with 11 additions and 35 deletions

View File

@ -227,6 +227,15 @@ The following previously deprecated rules have been finally removed:
* `findByExtension(String)` - removed without replacement.
* {%jdoc !!core::lang.LanguageVersionDiscoverer %} - method `getLanguagesForFile(java.io.File)` removed.
Use {%jdoc core::lang.LanguageVersionDiscoverer#getLanguagesForFile(java.lang.String) %} instead.
* {%jdoc !!core::properties.AbstractPropertySource %}
* field `propertyDescriptors` has been made private and is not accessible anymore.
Use {%jdoc core::properties.AbstractPropertySource#getPropertyDescriptors() %} instead.
* field `propertyValuesByDescriptor` has been made private and is not accessible anymore.
Use {%jdoc core::properties.AbstractPropertySource#getPropertiesByPropertyDescriptor() %}
or {%jdoc core::properties.AbstractPropertySource#getOverriddenPropertiesByPropertyDescriptor() %} instead.
* method `copyPropertyDescriptors()` has been removed. Use {%jdoc core::properties.AbstractPropertySource#getPropertyDescriptors() %} instead.
* method `copyPropertyValues()` has been removed. Use {%jdoc core::properties.AbstractPropertySource#getPropertiesByPropertyDescriptor() %}
or {%jdoc core::properties.AbstractPropertySource#getOverriddenPropertiesByPropertyDescriptor() %} instead.
* pmd-apex
* {%jdoc apex::lang.apex.ast.ApexNode %} and {% jdoc apex::lang.apex.ast.ASTApexFile %}
* `#getApexVersion()`: In PMD 6, this method has been deprecated but was defined in the class `ApexRootNode`.

View File

@ -26,15 +26,10 @@ public abstract class AbstractPropertySource implements PropertySource {
// This would avoid duplicating the implementation between Rule and RuleReference,
// which should use exactly the same mechanism to override properties (XML).
// TODO 7.0.0 these fields should be made private final
/**
* The list of known properties that can be configured.
*
* @deprecated Will be made private final
*/
@Deprecated
protected List<PropertyDescriptor<?>> propertyDescriptors = new ArrayList<>();
private final List<PropertyDescriptor<?>> propertyDescriptors = new ArrayList<>();
/**
* The values for each property that were overridden here.
@ -42,36 +37,8 @@ public abstract class AbstractPropertySource implements PropertySource {
* In other words, if this map doesn't contain a descriptor
* which is in {@link #propertyDescriptors}, then it's assumed
* to have a default value.
*
* @deprecated Will be made private final
*/
@Deprecated
protected Map<PropertyDescriptor<?>, Object> propertyValuesByDescriptor = new HashMap<>();
/**
* Creates a copied list of the property descriptors and returns it.
*
* @return a copy of the property descriptors.
* @deprecated Just use {@link #getPropertyDescriptors()}
*/
@Deprecated
protected List<PropertyDescriptor<?>> copyPropertyDescriptors() {
return new ArrayList<>(propertyDescriptors);
}
/**
* Creates a copied map of the values of the properties and returns it.
*
* @return a copy of the values
*
* @deprecated Just use {@link #getPropertiesByPropertyDescriptor()} or {@link #getOverriddenPropertiesByPropertyDescriptor()}
*/
@Deprecated
protected Map<PropertyDescriptor<?>, Object> copyPropertyValues() {
return new HashMap<>(propertyValuesByDescriptor);
}
private final Map<PropertyDescriptor<?>, Object> propertyValuesByDescriptor = new HashMap<>();
@Override