This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
commit 56f0d70c019711ab5e3b31445d8cda54cc731345 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Oct 9 18:33:12 2023 -0400 Make private classes final --- .../configuration2/AbstractHierarchicalConfiguration.java | 4 ++-- .../apache/commons/configuration2/DataConfiguration.java | 2 +- .../configuration2/HierarchicalConfigurationXMLReader.java | 2 +- .../commons/configuration2/XMLPropertiesConfiguration.java | 2 +- .../commons/configuration2/tree/ModelTransaction.java | 14 +++++++------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java b/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java index 458a2dbd..12f0fcc8 100644 --- a/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java @@ -675,7 +675,7 @@ public abstract class AbstractHierarchicalConfiguration<T> extends AbstractConfi * * @param <T> the type of the nodes managed by this hierarchical configuration */ - private static class DefinedVisitor<T> extends ConfigurationNodeVisitorAdapter<T> { + private static final class DefinedVisitor<T> extends ConfigurationNodeVisitorAdapter<T> { /** Stores the defined flag. */ private boolean defined; @@ -713,7 +713,7 @@ public abstract class AbstractHierarchicalConfiguration<T> extends AbstractConfi /** * A specialized visitor that fills a list with keys that are defined in a node hierarchy. */ - private class DefinedKeysVisitor extends ConfigurationNodeVisitorAdapter<T> { + private final class DefinedKeysVisitor extends ConfigurationNodeVisitorAdapter<T> { /** Stores the list to be filled. */ private final Set<String> keyList; diff --git a/src/main/java/org/apache/commons/configuration2/DataConfiguration.java b/src/main/java/org/apache/commons/configuration2/DataConfiguration.java index a9722286..5fde2902 100644 --- a/src/main/java/org/apache/commons/configuration2/DataConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/DataConfiguration.java @@ -1431,7 +1431,7 @@ public class DataConfiguration extends AbstractConfiguration { * takes care that the format pattern can be defined as a property of the wrapped configuration or temporarily passed * when calling a conversion method. */ - private class DataConversionHandler extends DefaultConversionHandler { + private final class DataConversionHandler extends DefaultConversionHandler { /** * {@inheritDoc} This implementation checks for a defined data format in the following order: * <ul> diff --git a/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationXMLReader.java b/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationXMLReader.java index 3c88804d..e84868f0 100644 --- a/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationXMLReader.java +++ b/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationXMLReader.java @@ -100,7 +100,7 @@ public class HierarchicalConfigurationXMLReader<T> extends ConfigurationXMLReade /** * A specialized visitor class for generating SAX events for a hierarchical node structure. */ - private class SAXVisitor extends ConfigurationNodeVisitorAdapter<T> { + private final class SAXVisitor extends ConfigurationNodeVisitorAdapter<T> { /** Constant for the attribute type. */ private static final String ATTR_TYPE = "CDATA"; diff --git a/src/main/java/org/apache/commons/configuration2/XMLPropertiesConfiguration.java b/src/main/java/org/apache/commons/configuration2/XMLPropertiesConfiguration.java index d54962bd..64fe72f3 100644 --- a/src/main/java/org/apache/commons/configuration2/XMLPropertiesConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/XMLPropertiesConfiguration.java @@ -300,7 +300,7 @@ public class XMLPropertiesConfiguration extends BaseConfiguration implements Fil * * @since 1.2 */ - private class XMLPropertiesHandler extends DefaultHandler { + private final class XMLPropertiesHandler extends DefaultHandler { /** The key of the current entry being parsed. */ private String key; diff --git a/src/main/java/org/apache/commons/configuration2/tree/ModelTransaction.java b/src/main/java/org/apache/commons/configuration2/tree/ModelTransaction.java index e4fd85ab..a90c940f 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/ModelTransaction.java +++ b/src/main/java/org/apache/commons/configuration2/tree/ModelTransaction.java @@ -567,7 +567,7 @@ class ModelTransaction { * operation is frequently used because each update of a node causes updates of the children of all parent nodes. * Therefore, it is treated in a special way and allows adding further sub operations dynamically. */ - private class ChildrenUpdateOperation extends Operation { + private final class ChildrenUpdateOperation extends Operation { /** A collection with new nodes to be added. */ private Collection<ImmutableNode> newNodes; @@ -676,7 +676,7 @@ class ModelTransaction { /** * A specialized operation class for adding an attribute to a target node. */ - private static class AddAttributeOperation extends Operation { + private static final class AddAttributeOperation extends Operation { /** The attribute name. */ private final String attributeName; @@ -703,7 +703,7 @@ class ModelTransaction { /** * A specialized operation class for adding multiple attributes to a target node. */ - private static class AddAttributesOperation extends Operation { + private static final class AddAttributesOperation extends Operation { /** The map with attributes. */ private final Map<String, Object> attributes; @@ -725,7 +725,7 @@ class ModelTransaction { /** * A specialized operation class for removing an attribute from a target node. */ - private static class RemoveAttributeOperation extends Operation { + private static final class RemoveAttributeOperation extends Operation { /** The attribute name. */ private final String attributeName; @@ -747,7 +747,7 @@ class ModelTransaction { /** * A specialized operation class which changes the value of a node. */ - private static class ChangeNodeValueOperation extends Operation { + private static final class ChangeNodeValueOperation extends Operation { /** The new value for the affected node. */ private final Object newValue; @@ -769,7 +769,7 @@ class ModelTransaction { /** * A specialized operation class which changes the name of a node. */ - private static class ChangeNodeNameOperation extends Operation { + private static final class ChangeNodeNameOperation extends Operation { /** The new node name. */ private final String newName; @@ -791,7 +791,7 @@ class ModelTransaction { /** * A helper class which collects multiple update operations to be executed on a single node. */ - private class Operations { + private final class Operations { /** An operation for manipulating child nodes. */ private ChildrenUpdateOperation childrenOperation;