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


The following commit(s) were added to refs/heads/master by this push:
     new b1f40cf1 Better internal class name
b1f40cf1 is described below

commit b1f40cf12c9276bc3361e296807134eaee37f000
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Fri Aug 18 10:57:07 2023 -0400

    Better internal class name
---
 .../commons/configuration2/DatabaseConfiguration.java  | 18 +++++++++---------
 .../apache/commons/configuration2/io/FileHandler.java  | 18 +++++++++---------
 ...ase.java => AbstractConfigurationNodeIterator.java} |  4 ++--
 .../tree/xpath/ConfigurationNodeIteratorAttribute.java |  2 +-
 .../tree/xpath/ConfigurationNodeIteratorChildren.java  |  2 +-
 5 files changed, 22 insertions(+), 22 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java 
b/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
index e2a34d67..373bbb3c 100644
--- a/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
@@ -295,7 +295,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
      */
     @Override
     protected Object getPropertyInternal(final String key) {
-        final JdbcOperation<Object> op = new 
JdbcOperation<Object>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, key, null) {
+        final AbstractJdbcOperation<Object> op = new 
AbstractJdbcOperation<Object>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, key, null) {
             @Override
             protected Object performOperation() throws SQLException {
                 final List<Object> results = new ArrayList<>();
@@ -325,7 +325,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
      */
     @Override
     protected void addPropertyDirect(final String key, final Object obj) {
-        new JdbcOperation<Void>(ConfigurationErrorEvent.WRITE, 
ConfigurationEvent.ADD_PROPERTY, key, obj) {
+        new AbstractJdbcOperation<Void>(ConfigurationErrorEvent.WRITE, 
ConfigurationEvent.ADD_PROPERTY, key, obj) {
             @Override
             protected Void performOperation() throws SQLException {
                 final StringBuilder query = new StringBuilder("INSERT INTO ");
@@ -383,7 +383,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
      */
     @Override
     protected boolean isEmptyInternal() {
-        final JdbcOperation<Integer> op = new 
JdbcOperation<Integer>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, null, null) {
+        final AbstractJdbcOperation<Integer> op = new 
AbstractJdbcOperation<Integer>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, null, null) {
             @Override
             protected Integer performOperation() throws SQLException {
                 try (ResultSet rs = openResultSet(String.format(SQL_IS_EMPTY, 
table), true)) {
@@ -406,7 +406,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
      */
     @Override
     protected boolean containsKeyInternal(final String key) {
-        final JdbcOperation<Boolean> op = new 
JdbcOperation<Boolean>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, key, null) {
+        final AbstractJdbcOperation<Boolean> op = new 
AbstractJdbcOperation<Boolean>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, key, null) {
             @Override
             protected Boolean performOperation() throws SQLException {
                 try (ResultSet rs = 
openResultSet(String.format(SQL_GET_PROPERTY, table, keyColumn), true, key)) {
@@ -428,7 +428,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
      */
     @Override
     protected void clearPropertyDirect(final String key) {
-        new JdbcOperation<Void>(ConfigurationErrorEvent.WRITE, 
ConfigurationEvent.CLEAR_PROPERTY, key, null) {
+        new AbstractJdbcOperation<Void>(ConfigurationErrorEvent.WRITE, 
ConfigurationEvent.CLEAR_PROPERTY, key, null) {
             @Override
             protected Void performOperation() throws SQLException {
                 try (PreparedStatement ps = 
initStatement(String.format(SQL_CLEAR_PROPERTY, table, keyColumn), true, key)) {
@@ -446,7 +446,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
      */
     @Override
     protected void clearInternal() {
-        new JdbcOperation<Void>(ConfigurationErrorEvent.WRITE, 
ConfigurationEvent.CLEAR, null, null) {
+        new AbstractJdbcOperation<Void>(ConfigurationErrorEvent.WRITE, 
ConfigurationEvent.CLEAR, null, null) {
             @Override
             protected Void performOperation() throws SQLException {
                 try (PreparedStatement statement = 
initStatement(String.format(SQL_CLEAR, table), true)) {
@@ -467,7 +467,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
     @Override
     protected Iterator<String> getKeysInternal() {
         final Collection<String> keys = new ArrayList<>();
-        new JdbcOperation<Collection<String>>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, null, null) {
+        new 
AbstractJdbcOperation<Collection<String>>(ConfigurationErrorEvent.READ, 
ConfigurationErrorEvent.READ, null, null) {
             @Override
             protected Collection<String> performOperation() throws 
SQLException {
                 try (ResultSet rs = openResultSet(String.format(SQL_GET_KEYS, 
keyColumn, table), true)) {
@@ -562,7 +562,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
      *
      * @param <T> the type of the results produced by a JDBC operation
      */
-    private abstract class JdbcOperation<T> {
+    private abstract class AbstractJdbcOperation<T> {
         /** Stores the connection. */
         private Connection conn;
 
@@ -592,7 +592,7 @@ public class DatabaseConfiguration extends 
AbstractConfiguration {
          * @param errPropName the property configurationName for the error 
event
          * @param errPropVal the property value for the error event
          */
-        protected JdbcOperation(final EventType<? extends 
ConfigurationErrorEvent> errEvType, final EventType<?> opType, final String 
errPropName,
+        protected AbstractJdbcOperation(final EventType<? extends 
ConfigurationErrorEvent> errEvType, final EventType<?> opType, final String 
errPropName,
             final Object errPropVal) {
             errorEventType = errEvType;
             operationEventType = opType;
diff --git 
a/src/main/java/org/apache/commons/configuration2/io/FileHandler.java 
b/src/main/java/org/apache/commons/configuration2/io/FileHandler.java
index 8d76dfdf..18750a92 100644
--- a/src/main/java/org/apache/commons/configuration2/io/FileHandler.java
+++ b/src/main/java/org/apache/commons/configuration2/io/FileHandler.java
@@ -108,7 +108,7 @@ public class FileHandler {
      * {@code FileLocator} instance stored in an atomic reference by a 
manipulated instance. (If we already had lambdas,
      * this could be done without a class in a more elegant way.)
      */
-    private abstract class Updater {
+    private abstract class AbstractUpdater {
         /**
          * Performs an update of the enclosing file handler's {@code 
FileLocator} object.
          */
@@ -332,7 +332,7 @@ public class FileHandler {
      * Clears the location of this {@code FileHandler}. Afterwards this 
handler does not point to any valid file.
      */
     public void clearLocation() {
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.basePath(null).fileName(null).sourceURL(null);
@@ -1076,7 +1076,7 @@ public class FileHandler {
      */
     public void setBasePath(final String basePath) {
         final String path = normalizeFileURL(basePath);
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.basePath(path);
@@ -1092,7 +1092,7 @@ public class FileHandler {
      * @param encoding the encoding of the associated file
      */
     public void setEncoding(final String encoding) {
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.encoding(encoding);
@@ -1109,7 +1109,7 @@ public class FileHandler {
     public void setFile(final File file) {
         final String fileName = file.getName();
         final String basePath = file.getParentFile() != null ? 
file.getParentFile().getAbsolutePath() : null;
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.fileName(fileName).basePath(basePath).sourceURL(null);
@@ -1141,7 +1141,7 @@ public class FileHandler {
      */
     public void setFileName(final String fileName) {
         final String name = normalizeFileURL(fileName);
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.fileName(name);
@@ -1157,7 +1157,7 @@ public class FileHandler {
      * @param fileSystem the {@code FileSystem}
      */
     public void setFileSystem(final FileSystem fileSystem) {
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.fileSystem(fileSystem);
@@ -1174,7 +1174,7 @@ public class FileHandler {
      * @see FileLocatorUtils#DEFAULT_LOCATION_STRATEGY
      */
     public void setLocationStrategy(final FileLocationStrategy strategy) {
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.locationStrategy(strategy);
@@ -1216,7 +1216,7 @@ public class FileHandler {
      * @since 2.8.0
      */
     public void setURL(final URL url, final URLConnectionOptions 
urlConnectionOptions) {
-        new Updater() {
+        new AbstractUpdater() {
             @Override
             protected void updateBuilder(final FileLocatorBuilder builder) {
                 builder.sourceURL(url);
diff --git 
a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorBase.java
 
b/src/main/java/org/apache/commons/configuration2/tree/xpath/AbstractConfigurationNodeIterator.java
similarity index 96%
rename from 
src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorBase.java
rename to 
src/main/java/org/apache/commons/configuration2/tree/xpath/AbstractConfigurationNodeIterator.java
index ae0c64fd..38d0ba31 100644
--- 
a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorBase.java
+++ 
b/src/main/java/org/apache/commons/configuration2/tree/xpath/AbstractConfigurationNodeIterator.java
@@ -34,7 +34,7 @@ import org.apache.commons.lang3.StringUtils;
  * @since 1.3
  * @param <T> the type of the nodes this iterator deals with
  */
-abstract class ConfigurationNodeIteratorBase<T> implements NodeIterator {
+abstract class AbstractConfigurationNodeIterator<T> implements NodeIterator {
     /** Constant for the prefix separator. */
     private static final String PREFIX_SEPARATOR = ":";
 
@@ -59,7 +59,7 @@ abstract class ConfigurationNodeIteratorBase<T> implements 
NodeIterator {
      * @param parent the parent pointer
      * @param reverse the reverse flag
      */
-    protected ConfigurationNodeIteratorBase(final ConfigurationNodePointer<T> 
parent, final boolean reverse) {
+    protected AbstractConfigurationNodeIterator(final 
ConfigurationNodePointer<T> parent, final boolean reverse) {
         this.parent = parent;
         this.reverse = reverse;
     }
diff --git 
a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java
 
b/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java
index fad86655..b8fff808 100644
--- 
a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java
+++ 
b/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java
@@ -30,7 +30,7 @@ import org.apache.commons.lang3.StringUtils;
  *
  * @param <T> the type of the nodes this iterator deals with
  */
-class ConfigurationNodeIteratorAttribute<T> extends 
ConfigurationNodeIteratorBase<T> {
+class ConfigurationNodeIteratorAttribute<T> extends 
AbstractConfigurationNodeIterator<T> {
     /** Constant for the wildcard node name. */
     private static final String WILDCARD = "*";
 
diff --git 
a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorChildren.java
 
b/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorChildren.java
index e7855cf2..d0d01d42 100644
--- 
a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorChildren.java
+++ 
b/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorChildren.java
@@ -34,7 +34,7 @@ import org.apache.commons.lang3.StringUtils;
  * @since 1.3
  * @param <T> the type of the nodes this iterator deals with
  */
-class ConfigurationNodeIteratorChildren<T> extends 
ConfigurationNodeIteratorBase<T> {
+class ConfigurationNodeIteratorChildren<T> extends 
AbstractConfigurationNodeIterator<T> {
 
     /** The list with the sub nodes to iterate over. */
     private final List<T> subNodes;

Reply via email to