Version in base suite: 2.7-2
Base version: commons-configuration2_2.7-2
Target version: commons-configuration2_2.8.0-1~deb11u1
Base file: /srv/ftp-master.debian.org/ftp/pool/main/c/commons-configuration2/commons-configuration2_2.7-2.dsc
Target file: /srv/ftp-master.debian.org/policy/pool/main/c/commons-configuration2/commons-configuration2_2.8.0-1~deb11u1.dsc
/srv/release.debian.org/tmp/dQl5PDdQrh/commons-configuration2-2.8.0/src/test/resources/org/apache/commons/configuration2/test.jar |binary
commons-configuration2-2.8.0/NOTICE.txt | 2
commons-configuration2-2.8.0/README.md | 8
commons-configuration2-2.8.0/RELEASE-NOTES.txt | 113
commons-configuration2-2.8.0/conf/checkstyle-suppressions.xml | 4
commons-configuration2-2.8.0/conf/checkstyle.xml | 29
commons-configuration2-2.8.0/conf/findbugs-exclude-filter.xml | 11
commons-configuration2-2.8.0/debian/changelog | 32
commons-configuration2-2.8.0/debian/control | 7
commons-configuration2-2.8.0/debian/copyright | 6
commons-configuration2-2.8.0/debian/maven.rules | 2
commons-configuration2-2.8.0/pom.xml | 162
commons-configuration2-2.8.0/src/changes/changes.xml | 307 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java | 1350 +---
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java | 606 --
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/AbstractYAMLBasedConfiguration.java | 122
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java | 98
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseConfigurationXMLReader.java | 61
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java | 744 --
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java | 827 --
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/CompositeConfiguration.java | 448 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/Configuration.java | 135
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationComparator.java | 7
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationConsumer.java | 3
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationConverter.java | 69
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationDecoder.java | 23
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationLookup.java | 38
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java | 90
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java | 523 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java | 174
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/DataConfiguration.java | 1237 +---
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java | 477 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java | 644 --
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/EnvironmentConfiguration.java | 52
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/FileBasedConfiguration.java | 10
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/FindNodeVisitor.java | 38
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java | 170
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java | 131
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationXMLReader.java | 94
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/INIConfiguration.java | 775 --
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java | 884 +-
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ImmutableConfigurationInvocationHandler.java | 94
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ImmutableHierarchicalConfiguration.java | 102
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/Initializable.java | 32
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/JNDIConfiguration.java | 260
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java | 52
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/MapConfiguration.java | 181
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/PatternSubtreeConfigurationWrapper.java | 246
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/PrefixedKeysIterator.java | 59
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java | 2355 +++----
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java | 719 +-
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/StrictConfigurationComparator.java | 32
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/SubnodeConfiguration.java | 225
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java | 179
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/SystemConfiguration.java | 50
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java | 914 +--
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/XMLDocumentHelper.java | 207
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/XMLListReference.java | 127
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/XMLPropertiesConfiguration.java | 188
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java | 108
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/BeanCreationContext.java | 31
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/BeanDeclaration.java | 73
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/BeanFactory.java | 50
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/BeanHelper.java | 477 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/CombinedBeanDeclaration.java | 138
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaBean.java | 156
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaClass.java | 84
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/ConstructorArg.java | 151
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/DefaultBeanFactory.java | 215
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/XMLBeanDeclaration.java | 512 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/beanutils/package-info.java | 8
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/AutoSaveListener.java | 89
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderParameters.java | 447 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderProperties.java | 121
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/BasicConfigurationBuilder.java | 564 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java | 240
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/BuilderParameters.java | 37
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilder.java | 31
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderEvent.java | 51
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderResultCreatedEvent.java | 63
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/CopyObjectDefaultHandler.java | 73
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/DatabaseBuilderParametersImpl.java | 36
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/DatabaseBuilderProperties.java | 54
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/DefaultParametersHandler.java | 31
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/DefaultParametersManager.java | 225
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/DefaultReloadingDetectorFactory.java | 19
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/EventListenerParameters.java | 49
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/EventListenerProvider.java | 29
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java | 297 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderProperties.java | 82
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.java | 268
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/HierarchicalBuilderParametersImpl.java | 24
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/HierarchicalBuilderProperties.java | 14
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/INIBuilderParametersImpl.java | 33
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/INIBuilderProperties.java | 26
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/JndiBuilderParametersImpl.java | 25
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/JndiBuilderProperties.java | 14
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/PropertiesBuilderParametersImpl.java | 40
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/PropertiesBuilderProperties.java | 36
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/ReloadingBuilderSupportListener.java | 68
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/ReloadingDetectorFactory.java | 22
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/ReloadingFileBasedConfigurationBuilder.java | 169
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderParametersImpl.java | 46
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderProperties.java | 24
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/BaseConfigurationBuilderProvider.java | 279
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderParametersImpl.java | 319 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderProperties.java | 118
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.java | 1178 +--
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilderProvider.java | 86
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationBuilderProvider.java | 27
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java | 130
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/FileExtensionConfigurationBuilderProvider.java | 121
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileBuilderParametersImpl.java | 103
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileBuilderProperties.java | 23
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.java | 417 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilderProvider.java | 145
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/MultiWrapDynaBean.java | 96
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/MultiWrapDynaClass.java | 43
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/ReloadingCombinedConfigurationBuilder.java | 133
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/ReloadingMultiFileConfigurationBuilder.java | 112
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/combined/package-info.java | 20
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/CombinedBuilderParameters.java | 15
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/Configurations.java | 456 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/DatabaseBuilderParameters.java | 14
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/FileBasedBuilderParameters.java | 16
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/HierarchicalBuilderParameters.java | 17
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/INIBuilderParameters.java | 16
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/JndiBuilderParameters.java | 13
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/MultiFileBuilderParameters.java | 16
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/Parameters.java | 272
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/PropertiesBuilderParameters.java | 17
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/XMLBuilderParameters.java | 16
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/fluent/package-info.java | 20
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/builder/package-info.java | 23
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/AbstractListDelimiterHandler.java | 142
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/ConversionHandler.java | 64
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/DefaultConversionHandler.java | 279
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/DefaultListDelimiterHandler.java | 142
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/DisabledListDelimiterHandler.java | 54
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/LegacyListDelimiterHandler.java | 175
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/ListDelimiterHandler.java | 85
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/PropertyConverter.java | 734 --
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/ValueTransformer.java | 33
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/convert/package-info.java | 15
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/BaseEventSource.java | 238
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/ConfigurationErrorEvent.java | 88
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/ConfigurationEvent.java | 111
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/Event.java | 55
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/EventListener.java | 25
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/EventListenerList.java | 271
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java | 56
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/EventSource.java | 34
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/EventType.java | 86
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/event/package-info.java | 3
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ex/ConfigurationException.java | 40
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ex/ConfigurationRuntimeException.java | 46
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ex/ConversionException.java | 39
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/ex/package-info.java | 5
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java | 730 +-
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/ConstantLookup.java | 127
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/DefaultLookups.java | 114
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/DummyLookup.java | 16
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/EnvironmentLookup.java | 21
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/ExprLookup.java | 197
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/InterpolatorSpecification.java | 204
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/Lookup.java | 34
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/StringLookupAdapter.java | 10
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/interpol/SystemPropertiesLookup.java | 17
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/AbsoluteNameLocationStrategy.java | 26
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/BasePathLocationStrategy.java | 31
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/ClasspathLocationStrategy.java | 20
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/CombinedLocationStrategy.java | 77
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/ConfigurationLogger.java | 121
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/DefaultFileSystem.java | 219
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileBased.java | 49
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileHandler.java | 1747 ++---
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileHandlerListener.java | 28
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileHandlerListenerAdapter.java | 27
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileLocationStrategy.java | 52
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileLocator.java | 478 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileLocatorAware.java | 37
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java | 744 +-
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileOptionsProvider.java | 35
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileSystem.java | 85
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileSystemLocationStrategy.java | 21
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/FileUtils.java | 50
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/HomeDirectoryLocationStrategy.java | 100
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/InputStreamSupport.java | 26
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/ProvidedURLLocationStrategy.java | 21
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/URLConnectionOptions.java | 179
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/VFSFileSystem.java | 384 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/VerifiableOutputStream.java | 4
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/io/package-info.java | 10
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/package-info.java | 7
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/plist/PropertyListConfiguration.java | 406 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java | 494 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/CombinedReloadingController.java | 153
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/FileHandlerReloadingDetector.java | 215
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/ManagedReloadingDetector.java | 28
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/ManagedReloadingDetectorMBean.java | 3
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/PeriodicReloadingTrigger.java | 134
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/ReloadingController.java | 124
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/ReloadingControllerSupport.java | 12
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/ReloadingDetector.java | 42
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/ReloadingEvent.java | 30
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/VFSFileHandlerReloadingDetector.java | 88
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/reloading/package-info.java | 7
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/resolver/CatalogResolver.java | 280
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/resolver/DefaultEntityResolver.java | 59
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/resolver/EntityRegistry.java | 25
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/resolver/EntityResolverSupport.java | 6
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/spring/ConfigurationPropertiesFactoryBean.java | 89
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/spring/ConfigurationPropertySource.java | 36
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/sync/LockMode.java | 26
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/sync/NoOpSynchronizer.java | 32
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/sync/ReadWriteSynchronizer.java | 51
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/sync/Synchronizer.java | 62
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/sync/SynchronizerSupport.java | 59
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/sync/package-info.java | 18
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java | 85
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/ConfigurationNodeVisitor.java | 35
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/ConfigurationNodeVisitorAdapter.java | 27
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/DefaultConfigurationKey.java | 573 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/DefaultExpressionEngine.java | 343 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/DefaultExpressionEngineSymbols.java | 187
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java | 86
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java | 383 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java | 1098 +--
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModelSupport.java | 15
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/MergeCombiner.java | 84
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/ModelTransaction.java | 605 --
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java | 70
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeCombiner.java | 82
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeHandler.java | 65
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeHandlerDecorator.java | 68
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeKeyResolver.java | 57
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeMatcher.java | 23
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeModel.java | 97
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeModelSupport.java | 3
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeNameMatchers.java | 37
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeSelector.java | 104
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java | 399 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java | 124
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/NodeUpdateData.java | 79
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java | 93
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/QueryResult.java | 111
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/ReferenceNodeHandler.java | 34
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/ReferenceTracker.java | 121
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/TrackedNodeHandler.java | 47
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/TrackedNodeModel.java | 193
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/TreeData.java | 117
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/TreeUtils.java | 31
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/UnionCombiner.java | 118
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationAttributePointer.java | 90
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java | 59
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorBase.java | 83
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorChildren.java | 110
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodePointer.java | 111
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodePointerFactory.java | 93
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/XPathContextFactory.java | 10
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/XPathExpressionEngine.java | 363 -
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/tree/xpath/package-info.java | 4
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java | 25
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/web/BaseWebConfiguration.java | 53
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/web/ServletConfiguration.java | 28
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/web/ServletContextConfiguration.java | 28
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/web/ServletFilterConfiguration.java | 19
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/web/ServletRequestConfiguration.java | 50
commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/web/package-info.java | 4
commons-configuration2-2.8.0/src/site/resources/profile.jacoco | 17
commons-configuration2-2.8.0/src/site/resources/profile.japicmp | 17
commons-configuration2-2.8.0/src/site/site.xml | 3
commons-configuration2-2.8.0/src/site/xdoc/building.xml | 32
commons-configuration2-2.8.0/src/site/xdoc/dependencies.xml | 44
commons-configuration2-2.8.0/src/site/xdoc/download_configuration.xml | 264
commons-configuration2-2.8.0/src/site/xdoc/userguide/howto_basicfeatures.xml | 41
commons-configuration2-2.8.0/src/site/xdoc/userguide/overview.xml | 4
commons-configuration2-2.8.0/src/site/xdoc/userguide/upgradeto2_0.xml | 2
commons-configuration2-2.8.0/src/site/xdoc/userguide/upgradeto2_x.xml | 58
commons-configuration2-2.8.0/src/site/xdoc/userguide/user_guide.xml | 1
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/BaseNonStringProperties.java | 116
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/ConfigurationAssert.java | 123
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/DatabaseConfigurationTestHelper.java | 272
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/EnumFixture.java | 23
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/FileURLStreamHandler.java | 19
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/InterpolationTestHelper.java | 183
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/Logging.java | 175
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/MockInitialContextFactory.java | 219
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/NonCloneableConfiguration.java | 35
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/NonStringTestHolder.java | 79
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/SynchronizerTestImpl.java | 129
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestAbstractConfiguration.java | 148
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java | 1397 ++--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationSynchronization.java | 223
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestAbstractHierarchicalConfiguration.java | 1222 +---
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestBaseConfiguration.java | 930 +--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestBaseConfigurationXMLReader.java | 141
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestBaseHierarchicalConfigurationSynchronization.java | 386 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestBaseNullConfiguration.java | 429 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestCatalogResolver.java | 73
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestCombinedConfiguration.java | 1517 ++---
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestCompositeConfiguration.java | 1075 +--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestCompositeConfigurationNonStringProperties.java | 7
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestConfigurationConverter.java | 88
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestConfigurationLookup.java | 52
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java | 47
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestConfigurationSet.java | 54
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestConfigurationUtils.java | 682 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestDataConfiguration.java | 2955 ++++------
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestDatabaseConfiguration.java | 588 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestDefaultImmutableConfiguration.java | 369 +
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestDynamicCombinedConfiguration.java | 659 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestEnvironmentConfiguration.java | 62
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestEqualBehavior.java | 178
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestEqualsProperty.java | 6
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestHierarchicalConfiguration.java | 705 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestHierarchicalConfigurationXMLReader.java | 27
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestHierarchicalXMLConfiguration.java | 223
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestINIConfiguration.java | 1474 ++--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestImmutableConfiguration.java | 201
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestJNDIConfiguration.java | 389 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestJNDIEnvironmentValues.java | 127
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestJSONConfiguration.java | 109
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestMapConfiguration.java | 102
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestNonStringProperties.java | 6
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestNullCompositeConfiguration.java | 480 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestNullJNDIEnvironmentValues.java | 127
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestPatternSubtreeConfiguration.java | 39
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java | 1002 +--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java | 946 +--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestPropertiesSequence.java | 45
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestStrictConfigurationComparator.java | 33
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestSubnodeConfiguration.java | 495 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestSubsetConfiguration.java | 334 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestSystemConfiguration.java | 136
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestThreesomeConfiguration.java | 19
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestXMLConfiguration.java | 805 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestXMLConfiguration_605.java | 71
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestXMLDocumentHelper.java | 341 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestXMLListHandling.java | 164
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestXMLPropertiesConfiguration.java | 74
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/TestYAMLConfiguration.java | 139
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/BeanCreationTestBean.java | 29
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/BeanCreationTestBeanWithListChild.java | 34
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/BeanCreationTestCtorBean.java | 15
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/BeanDeclarationTestImpl.java | 72
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/TestBeanHelper.java | 623 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/TestCombinedBeanDeclaration.java | 213
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java | 488 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBeanXMLConfig.java | 16
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/TestConstructorArg.java | 51
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/TestDefaultBeanFactory.java | 246
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/beanutils/TestXMLBeanDeclaration.java | 519 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/BuilderEventListenerImpl.java | 66
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/ParametersBeanTestImpl.java | 38
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestAutoSaveListener.java | 120
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestBasicBuilderParameters.java | 651 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestBasicConfigurationBuilder.java | 784 +-
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestBasicConfigurationBuilderEvents.java | 185
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestBuilderConfigurationWrapperFactory.java | 188
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestCopyObjectDefaultHandler.java | 92
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestDatabaseBuilderParametersImpl.java | 107
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestDefaultParametersManager.java | 221
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestDefaultReloadingDetectorFactory.java | 30
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestEventListenerParameters.java | 59
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestFileBasedBuilderParameters.java | 447 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestFileBasedConfigurationBuilder.java | 583 +
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestHierarchicalBuilderParametersImpl.java | 57
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestJndiBuilderParametersImpl.java | 53
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestPropertiesBuilderParametersImpl.java | 155
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestReloadingBuilderSupportListener.java | 42
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestReloadingFileBasedConfigurationBuilder.java | 289
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/TestXMLBuilderParametersImpl.java | 141
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/AbstractMultiFileConfigurationBuilderTest.java | 84
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestBaseConfigurationBuilderProvider.java | 297 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedBuilderParametersImpl.java | 498 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilder.java | 1858 ++----
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilderVFS.java | 33
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestConfigurationDeclaration.java | 114
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestFileExtensionConfigurationBuilderProvider.java | 196
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestMultiFileBuilderParametersImpl.java | 122
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestMultiFileConfigurationBuilder.java | 472 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestMultiWrapDynaBean.java | 252
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestReloadingCombinedConfigurationBuilder.java | 124
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java | 445 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/combined/TestReloadingMultiFileConfigurationBuilder.java | 223
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/fluent/TestConfigurations.java | 551 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/builder/fluent/TestParameters.java | 436 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/convert/TestDefaultConversionHandler.java | 334 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/convert/TestDefaultListDelimiterHandler.java | 154
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/convert/TestDisabledListDelimiterHandler.java | 189
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/convert/TestPropertyConverter.java | 283
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/AbstractEventListenerTestImpl.java | 66
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/AbstractTestConfigurationEvents.java | 133
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/ErrorListenerTestImpl.java | 20
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/EventListenerTestImpl.java | 19
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestConfigurationEventTypes.java | 218
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestDatabaseConfigurationEvents.java | 32
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestEvent.java | 15
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestEventListenerList.java | 720 +-
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestEventSource.java | 420 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestEventType.java | 9
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestHierarchicalConfigurationEvents.java | 110
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestMapConfigurationEvents.java | 8
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestPropertiesConfigurationEvents.java | 10
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestSubsetConfigurationEvents.java | 8
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/event/TestXMLConfigurationEvents.java | 7
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/interpol/TestConfigurationInterpolator.java | 649 +-
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/interpol/TestConstantLookup.java | 73
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/interpol/TestDummyLookup.java | 9
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/interpol/TestEnvironmentLookup.java | 21
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/interpol/TestExprLookup.java | 84
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/interpol/TestInterpolatorSpecification.java | 158
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/interpol/TestSystemPropertiesLookup.java | 17
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestAbsoluteNameLocationStrategy.java | 49
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestBasePathLocationStrategy.java | 64
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestClasspathLocationStrategy.java | 44
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestCombinedLocationStrategy.java | 180
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestConfigurationLogger.java | 205
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestDefaultFileSystem.java | 35
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestFileHandler.java | 1939 ++----
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestFileLocator.java | 195
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestFileLocatorUtils.java | 613 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestFileSystemLocationStrategy.java | 21
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestHomeDirectoryLocationStrategy.java | 85
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/io/TestProvidedURLLocationStrategy.java | 29
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/plist/AbstractTestPListEvents.java | 30
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/plist/TestPropertyListConfiguration.java | 432 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/plist/TestPropertyListConfigurationEvents.java | 14
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/plist/TestPropertyListParser.java | 48
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/plist/TestXMLPropertyListConfiguration.java | 522 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/plist/TestXMLPropertyListConfigurationEvents.java | 14
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/AlwaysReloadingDetector.java | 13
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/RandomReloadingDetector.java | 14
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/TestCombinedReloadingController.java | 167
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/TestFileHandlerReloadingDetector.java | 232
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/TestManagedReloadingDetector.java | 35
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/TestPeriodicReloadingTrigger.java | 149
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/TestReloadingController.java | 168
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java | 136
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertiesFactoryBean.java | 135
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java | 45
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/sync/TestReadWriteSynchronizer.java | 285
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/test/HsqlDB.java | 84
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/AbstractCombinerTest.java | 51
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandlerTest.java | 399 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/NodeStructureHelper.java | 659 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestDefaultConfigurationKey.java | 623 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestDefaultExpressionEngine.java | 938 +--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestDefaultExpressionEngineSymbols.java | 122
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestImmutableNode.java | 647 --
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestInMemoryNodeModel.java | 1095 +--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestInMemoryNodeModelReferences.java | 265
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestInMemoryNodeModelTrackedNodes.java | 1002 +--
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestMergeCombiner.java | 178
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestNodeAddData.java | 63
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestNodeHandlerDecorator.java | 21
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestNodeNameMatchers.java | 103
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestNodeSelector.java | 199
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestNodeTreeWalker.java | 336 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestNodeUpdateData.java | 138
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestOverrideCombiner.java | 215
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestQueryResult.java | 140
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeHandler.java | 42
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeModel.java | 227
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestTreeData.java | 9
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/TestUnionCombiner.java | 99
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/AbstractXPathTest.java | 128
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationAttributePointer.java | 104
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationIteratorAttributes.java | 86
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodeIteratorChildren.java | 308 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodePointer.java | 139
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodePointerFactory.java | 140
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestXPathContextFactory.java | 19
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestXPathExpressionEngine.java | 536 -
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/tree/xpath/TestXPathExpressionEngineInConfig.java | 108
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java | 101
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/web/TestServletConfiguration.java | 20
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/web/TestServletContextConfiguration.java | 36
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/web/TestServletFilterConfiguration.java | 71
commons-configuration2-2.8.0/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java | 87
commons-configuration2-2.8.0/src/test/resources/test.xml | 2
482 files changed, 40244 insertions(+), 59253 deletions(-)
diff -Nru commons-configuration2-2.7/NOTICE.txt commons-configuration2-2.8.0/NOTICE.txt
--- commons-configuration2-2.7/NOTICE.txt 2020-03-09 13:04:52.000000000 +0000
+++ commons-configuration2-2.8.0/NOTICE.txt 2022-03-31 14:41:23.000000000 +0000
@@ -1,5 +1,5 @@
Apache Commons Configuration
-Copyright 2001-2020 The Apache Software Foundation
+Copyright 2001-2022 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff -Nru commons-configuration2-2.7/README.md commons-configuration2-2.8.0/README.md
--- commons-configuration2-2.7/README.md 2020-03-07 19:38:25.000000000 +0000
+++ commons-configuration2-2.8.0/README.md 2022-03-31 14:41:23.000000000 +0000
@@ -43,10 +43,10 @@
Apache Commons Configuration
===================
-[![Build Status](https://travis-ci.org/apache/commons-configuration.svg)](https://travis-ci.org/apache/commons-configuration)
-[![Coverage Status](https://coveralls.io/repos/apache/commons-configuration/badge.svg)](https://coveralls.io/r/apache/commons-configuration)
+[![GitHub Actions Status](https://github.com/apache/commons-configuration/workflows/Java%20CI/badge.svg)](https://github.com/apache/commons-configuration/actions)
+[![Coverage Status](https://codecov.io/gh/apache/commons-configuration/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/commons-configuration)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-configuration2/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-configuration2/)
-[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-configuration2/2.7.svg)](https://javadoc.io/doc/org.apache.commons/commons-configuration2/2.7)
+[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-configuration2/2.8.0.svg)](https://javadoc.io/doc/org.apache.commons/commons-configuration2/2.8.0)
Tools to assist in the reading of configuration/preferences files in
various formats
@@ -68,7 +68,7 @@
org.apache.commonscommons-configuration2
- 2.7
+ 2.8.0
```
diff -Nru commons-configuration2-2.7/RELEASE-NOTES.txt commons-configuration2-2.8.0/RELEASE-NOTES.txt
--- commons-configuration2-2.7/RELEASE-NOTES.txt 2020-03-07 19:28:41.000000000 +0000
+++ commons-configuration2-2.8.0/RELEASE-NOTES.txt 2022-03-31 14:41:23.000000000 +0000
@@ -1,4 +1,115 @@
Apache Commons Configuration
+ Version 2.8.0
+ Release Notes
+
+
+INTRODUCTION:
+=============
+
+This document contains the release notes for this version of the Commons
+Configuration component. It describes the changes since the previous version.
+The Commons Configuration software library provides a generic configuration
+interface which enables an application to read configuration data from a variety
+of sources.
+
+Tools to assist in the reading of configuration/preferences files in
+various formats
+
+Minor release with new features and updated dependencies.
+
+Changes in this version include:
+
+New features:
+o Implement Iterable in ImmutableNode #74. Thanks to SethiPandi.
+o Add PropertiesConfigurationLayout.getBlankLinesBefore() and deprecate getBlancLinesBefore(). Thanks to Gary Gregory.
+o Add PropertiesConfigurationLayout.setBlankLinesBefore() and deprecate setBlancLinesBefore(). Thanks to Gary Gregory.
+o Add PropertiesConfigurationLayout.PropertyLayoutData.getBlankLines() and deprecate getBlancLines(). Thanks to Gary Gregory.
+o Add PropertiesConfigurationLayout.PropertyLayoutData.setBlankLines() and deprecate setBlancLines(). Thanks to Gary Gregory.
+o CONFIGURATION-789: Add ImmutableConfiguration.getEnum() methods. Thanks to Gary Gregory.
+o CONFIGURATION-789: Add ImmutableConfiguration.getDuration() methods. Thanks to Gary Gregory.
+
+Fixed Bugs:
+o CONFIGURATION-753: Make interpolation of collections and arrays in ConfigurationInterpolator consistent with
+ behavior of DefaultConversionHandler. Add ConfigurationInterpolator.setStringConverter to
+ allow customized string conversion behavior.
+o CONFIGURATION-795: Computation of blank lines after header comment #82. Thanks to dpeger.
+o CONFIGURATION-801: Remove redundant initializer #110. Thanks to Arturo Bernal.
+o CONFIGURATION-802: Use final #111. Thanks to Arturo Bernal.
+o CONFIGURATION-803: Java 8 lambda improvements and more #112. Thanks to Arturo Bernal.
+o CONFIGURATION-804: Redundant local variable #113. Thanks to Arturo Bernal.
+o CONFIGURATION-805: Use try with resource #114. Thanks to Arturo Bernal.
+o CONFIGURATION-805: [Javadoc] Specify that typed getList returns null for missing key #100. Thanks to Roman Zaynetdinov.
+o Mention EnvironmentConfiguration in the list of configuration sources #45. Thanks to Oliver B. Fischer.
+o CONFIGURATION-808: DefaultListDelimiterHandler.escapeList working only for List>String< #137. Thanks to cigaly.
+o Use final #141. Thanks to Arturo Bernal.
+o Replace test asserts by simpler but equivalent calls. #139 Thanks to Arturo Bernal.
+o CONFIGURATION-764: Single Variable Interpolation #182. Thanks to Ning Zhang, Matt Juntunen, Bruno P. Kinoshita, Gary Gregory.
+o Implement proper concurrency in ConstantLookup. Thanks to Gary Gregory.
+o CONFIGURATION-813: Support new namespace jakarta.mail.* used by javamail 2.0+ (first release October 2020) #186. Thanks to Dependabot.
+
+Changes:
+o Unclosed file handle when reading config from JAR file URL.
+ Add and use FileBasedBuilderProperties.setURL(URL, URLConnectionOptions). Thanks to Robin Jansohn, Gary Gregory, Rob Spoor.
+o Make default interpolation prefix lookups configurable via system property. Remove dns, url, and script
+ lookups from defaults. If these lookups are required for use in AbstractConfiguration subclasses, they must
+ be enabled via system property. See ConfigurationInterpolator.getDefaultPrefixLookups() for details.
+o Bump actions/cache from 2 to 3.0.4 #99, #151, #169. Thanks to Dependabot, Gary Gregory.
+o Bump actions/checkout from 1 to 3 #47, #62, #70, #85, #150, #163. Thanks to Dependabot.
+o Bump actions/setup-java from 1.4.0 to 3 #63, #65, #73, #174. Thanks to Dependabot, Gary Gregory.
+o Bump codeql-action from v1 to v2. Thanks to Dependabot, Matt Juntunen.
+o Bump Spring dependency versions:
+ org.springframework:spring-beans 4.3.26.RELEASE -> 5.3.21
+ org.springframework:spring-context 4.3.26.RELEASE -> 5.3.21
+ org.springframework:spring-core 4.3.26.RELEASE -> 5.3.21
+ org.springframework:spring-test 4.3.26.RELEASE -> 5.3.21
+ #165, #172 Thanks to Dependabot, Matt Juntunen, kinow, Gary Gregory.
+o Bump commons-parent from 52 to 53. Thanks to Dependabot, Matt Juntunen.
+o CONFIGURATION-787: Bump Apache Commons Lang from 3.9 to 3.12.0. Thanks to Gary Gregory.
+o CONFIGURATION-790: Bump com.fasterxml.jackson.core:jackson-databind from 2.10.3 to 2.13.3, #60. Thanks to Gary Gregory, Dependabot.
+o Bump Slf4j test dependencies:
+ org.slf4j:slf4j-api 1.7.26 -> 1.7.33,
+ org.slf4j:slf4j-ext 1.7.26 -> 1.7.33,
+ org.slf4j:slf4j-log4j12 1.7.26 -> 1.7.33,
+ org.slf4j:slf4j-nop 1.7.26 -> 1.7.33. Thanks to Gary Gregory.
+o Bump commons-parent from 50 to 52. Thanks to Dependabot.
+o Bump mailapi from 1.6.4 to 1.6.7 #48. Thanks to Dependabot, Gary Gregory.
+o Bump spotbugs-maven-plugin from 3.1.12.2 to 4.7.0.0, #55, #75, #79, #93, #116, #183. Thanks to Dependabot, Gary Gregory.
+o Bump hsqldb from 2.5.0 to 2.5.2 #54, #128. Thanks to Dependabot.
+o Bump commons-text from 1.8 to 1.9. Thanks to Gary Gregory.
+o Bump servlet-api from 2.4 to 2.5 #58. Thanks to Gary Gregory.
+o Bump maven-checkstyle-plugin from 3.1.0 to 3.1.2, #57, #97. Thanks to Gary Gregory.
+o Bump commons-pool2 from 2.8.0 to 2.10.0, #61, #124. Thanks to Dependabot, Gary Gregory.
+o Bump optional commons-codec from 1.14 to 1.15. Thanks to Gary Gregory.
+o Bump checkstyle from 8.26 to 9.3, #66, #71, #90, #101, #118, #121, #132, #155. Thanks to Dependabot, Gary Gregory.
+o Bump commons.jacoco.version 0.8.5 to 0.8.8 (Fixes Java 15 builds). Thanks to Gary Gregory.
+o Bump tests from commons-pool2 2.10.0 to 2.11.1. Thanks to Gary Gregory.
+o Bump tests from commons-dbcp2 2.7.0 to 2.9.0. Thanks to Gary Gregory.
+o Bump snakeyaml from 1.26 to 1.30 #68, #126, #137. Thanks to Dependabot, Gary Gregory.
+o Bump commons.japicmp.version from 0.14.1 to 0.15.7. Thanks to Gary Gregory.
+o Bump junit from 4.13 to 4.13.2 #78. Thanks to Dependabot, Gary Gregory.
+o Bump Apache Commons VFS 2.6.0 -> 2.9.0. Thanks to Gary Gregory.
+o Bump jackson-databind from 2.11.3 to 2.13.2.2 ,#88, #94, #127, #159, #168, #173. Thanks to Dependabot.
+o Bump commons.animal-sniffer.version 1.19 -> 1.20. Thanks to Gary Gregory.
+o Bump commons.javadoc.version from 3.1.1 to 3.4.0. Thanks to Gary Gregory.
+o Bump org.dbunit:dbunit from 2.7.0 to 2.7.3, #167. Thanks to Gary Gregory, Dependabot.
+o Bump tests to hamcrest v2.2 #143. Thanks to John Patrick.
+o Bump slf4j.version from 1.7.33 to 1.7.36 #166. Thanks to Dependabot.
+o Bump mailapi from 1.6.6 to 2.0.1 #186. Thanks to Dependabot.
+o Use GitHub Actions setup-java Maven cache property #190. Thanks to sullis.
+
+
+Historical list of changes: https://commons.apache.org/proper/commons-configuration/changes-report.html
+
+For complete information on Apache Commons Configuration, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the Apache Apache Commons Configuration website:
+
+https://commons.apache.org/proper/commons-configuration/
+
+Download it from https://commons.apache.org/proper/commons-configuration//download_text.cgi
+
+=============================================================================
+
+ Apache Commons Configuration
Version 2.7
Release Notes
@@ -40,7 +151,7 @@
o Update tests from JUnit 4.12 to 4.13. Thanks to Gary Gregory.
o CONFIGURATION-779: Update optional jackson-databind from 2.10.1 to 2.10.2. Thanks to Gary Gregory.
o CONFIGURATION-783: Update com.fasterxml.jackson.core:jackson-databind from 2.10.2 to 2.10.3. Thanks to Gary Gregory.
-o CONFIGURATION-784: Update org.yaml:snakeyaml from 1.25 to 1.26 and tweak parser configuration. Thanks to Gary Gregory.
+o CONFIGURATION-784: Update org.yaml:snakeyaml from 1.25 to 1.26 and tweak parser configuration. Thanks to Gary Gregory.
o CONFIGURATION-785: Update org.springframework:spring-* from 4.3.25.RELEASE to 4.3.26.RELEASE. Thanks to Gary Gregory.
o Update org.apache.commons:commons-parent from 48 to 50 Thanks to Rob Tompkins.
diff -Nru commons-configuration2-2.7/conf/checkstyle-suppressions.xml commons-configuration2-2.8.0/conf/checkstyle-suppressions.xml
--- commons-configuration2-2.7/conf/checkstyle-suppressions.xml 2020-03-07 18:57:27.000000000 +0000
+++ commons-configuration2-2.8.0/conf/checkstyle-suppressions.xml 2022-03-31 14:41:23.000000000 +0000
@@ -1,8 +1,8 @@
+ "-//Checkstyle//DTD SuppressionFilter Configuration 1.0//EN"
+ "https://checkstyle.org/dtds/suppressions_1_0.dtd">
-
-
+
-
@@ -87,11 +85,9 @@
-
-
@@ -99,13 +95,11 @@
-
-
@@ -116,7 +110,6 @@
-
@@ -124,20 +117,13 @@
-
-
-
-
-
-
-
-
-
+
+
@@ -157,7 +143,6 @@
-
@@ -168,8 +153,6 @@
-
-
diff -Nru commons-configuration2-2.7/conf/findbugs-exclude-filter.xml commons-configuration2-2.8.0/conf/findbugs-exclude-filter.xml
--- commons-configuration2-2.7/conf/findbugs-exclude-filter.xml 2020-03-07 18:57:27.000000000 +0000
+++ commons-configuration2-2.8.0/conf/findbugs-exclude-filter.xml 2022-03-31 14:41:23.000000000 +0000
@@ -93,4 +93,15 @@
+
+
+
+
+
+
+
+
+
+
+
diff -Nru commons-configuration2-2.7/debian/changelog commons-configuration2-2.8.0/debian/changelog
--- commons-configuration2-2.7/debian/changelog 2020-04-05 13:33:44.000000000 +0000
+++ commons-configuration2-2.8.0/debian/changelog 2022-11-28 09:52:07.000000000 +0000
@@ -1,3 +1,35 @@
+commons-configuration2 (2.8.0-1~deb11u1) bullseye-security; urgency=high
+
+ * Team upload.
+ * Backport version 2.8.0 from Bullseye.
+ * Fix CVE-2022-33980:
+ Apache Commons Configuration performs variable interpolation, allowing
+ properties to be dynamically evaluated and expanded. Starting with version
+ 2.4 and continuing through 2.7, the set of default Lookup instances
+ included interpolators that could result in arbitrary code execution or
+ contact with remote servers. These lookups are: - "script" - execute
+ expressions using the JVM script execution engine (javax.script) - "dns" -
+ resolve dns records - "url" - load values from urls, including from remote
+ servers Applications using the interpolation defaults in the affected
+ versions may be vulnerable to remote code execution or unintentional
+ contact with remote servers if untrusted configuration values are used.
+ (Closes: #1014960)
+
+ -- Markus Koschany Mon, 28 Nov 2022 10:52:07 +0100
+
+commons-configuration2 (2.8.0-1) unstable; urgency=medium
+
+ * Team upload.
+ * New upstream version 2.8.0 (Closes: #1014960)
+ Addresses CVE-2022-33980
+ * Bump Standards-Version to 4.6.1
+ * Use debhelper-compat 13
+ * Freshen years in debian/copyright
+ * Update javax.servlet dependency to libservlet-api-java
+ * Add build-dep on libhamcrest-java
+
+ -- tony mancill Sat, 16 Jul 2022 09:53:15 -0700
+
commons-configuration2 (2.7-2) unstable; urgency=medium
* Team upload.
diff -Nru commons-configuration2-2.7/debian/control commons-configuration2-2.8.0/debian/control
--- commons-configuration2-2.7/debian/control 2020-04-05 13:33:44.000000000 +0000
+++ commons-configuration2-2.8.0/debian/control 2022-11-28 09:52:07.000000000 +0000
@@ -4,7 +4,7 @@
Maintainer: Debian Java Maintainers
Uploaders: Emmanuel Bourg
Build-Depends:
- debhelper-compat (= 12),
+ debhelper-compat (= 13),
default-jdk,
default-jdk-doc,
javahelper,
@@ -17,6 +17,7 @@
libcommons-dbcp-java-doc,
libcommons-digester-java,
libcommons-digester-java-doc,
+ libhamcrest-java,
libcommons-jexl2-java,
libcommons-jxpath-java (>= 1.3-5),
libcommons-jxpath-java-doc,
@@ -33,11 +34,11 @@
libjavacc-maven-plugin-java,
libmail-java,
libmaven-javadoc-plugin-java,
- libservlet3.1-java,
+ libservlet-api-java,
libspring-context-java,
libyaml-snake-java,
maven-debian-helper
-Standards-Version: 4.5.0
+Standards-Version: 4.6.1
Vcs-Git: https://salsa.debian.org/java-team/commons-configuration2.git
Vcs-Browser: https://salsa.debian.org/java-team/commons-configuration2
Homepage: http://commons.apache.org/configuration/
diff -Nru commons-configuration2-2.7/debian/copyright commons-configuration2-2.8.0/debian/copyright
--- commons-configuration2-2.7/debian/copyright 2020-04-05 13:33:44.000000000 +0000
+++ commons-configuration2-2.8.0/debian/copyright 2022-11-28 09:52:07.000000000 +0000
@@ -4,14 +4,14 @@
Source: http://commons.apache.org/configuration/
Files: *
-Copyright: 2001-2020, The Apache Software Foundation
+Copyright: 2001-2022, The Apache Software Foundation
License: Apache-2.0
Files: debian/*
Copyright: 2007-2010, Torsten Werner
2011, Damien Raude-Morvan
- 2013-2020, Emmanuel Bourg
- 2015-2020, tony mancill
+ 2013-2022, Emmanuel Bourg
+ 2015-2022, tony mancill
License: Apache-2.0
License: Apache-2.0
diff -Nru commons-configuration2-2.7/debian/maven.rules commons-configuration2-2.8.0/debian/maven.rules
--- commons-configuration2-2.7/debian/maven.rules 2020-04-05 13:33:44.000000000 +0000
+++ commons-configuration2-2.8.0/debian/maven.rules 2022-11-28 09:52:07.000000000 +0000
@@ -1,5 +1,5 @@
com.fasterxml.jackson.core jackson-databind * s/.*/2.x/ * *
junit junit jar s/4\..*/4.x/ * *
javax.mail s/mail/javax.mail-api/ jar s/.*/debian/ * *
-javax.servlet s/servlet-api/javax.servlet-api/ jar s/.*/3.1/ * *
+org.hamcrest s/hamcrest/hamcrest-core/ * s/.*/debian/ * *
org.yaml snakeyaml * s/.*/1.x/ * *
diff -Nru commons-configuration2-2.7/pom.xml commons-configuration2-2.8.0/pom.xml
--- commons-configuration2-2.7/pom.xml 2020-03-09 13:05:39.000000000 +0000
+++ commons-configuration2-2.8.0/pom.xml 2022-03-31 14:41:23.000000000 +0000
@@ -15,18 +15,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
org.apache.commonscommons-parent
- 50
+ 534.0.0commons-configuration2
- 2.7
+ 2.8.0Apache Commons Configuration2001
@@ -176,14 +174,19 @@
- Gary Gregoryggregory
- ggregory@apache.org
- Rocket Software
- -6
+ Gary Gregory
+ ggregory at apache.org
+ https://www.garygregory.com
+ The Apache Software Foundation
+ https://www.apache.org/
- Java Developer
+ PMC Member
+ America/New_York
+
+ https://people.apache.org/~ggregory/img/garydgregory80.png
+
@@ -286,12 +289,12 @@
org.apache.commonscommons-lang3
- 3.9
+ 3.12.0org.apache.commonscommons-text
- 1.8
+ 1.9
@@ -320,7 +323,7 @@
commons-codeccommons-codec
- 1.14
+ 1.15true
@@ -334,7 +337,7 @@
org.apache.commonscommons-vfs2
- 2.6.0
+ 2.9.0true
@@ -395,21 +398,21 @@
javax.servletservlet-api
- 2.4
+ 2.5providedorg.yamlsnakeyaml
- 1.26
+ 1.30truecom.fasterxml.jackson.corejackson-databind
- 2.10.3
+ 2.13.3true
@@ -418,35 +421,56 @@
org.apache.commonscommons-dbcp2
- 2.7.0
+ 2.9.0
+ test
+
+
+
+ commons-io
+ commons-io
+ 2.11.0testorg.apache.commonscommons-pool2
- 2.8.0
+ 2.11.1testorg.hsqldbhsqldb
- 2.5.0
+
+ 2.5.2testorg.dbunitdbunit
- 2.7.0
+ 2.7.3testjunitjunit
- 4.13
+ 4.13.2
+ test
+
+
+ org.hamcrest
+ hamcrest-core
+
+
+
+
+
+ org.hamcrest
+ hamcrest
+ 2.2test
@@ -484,7 +508,7 @@
org.easymockeasymock
- 4.2
+ 4.3test
@@ -492,7 +516,7 @@
com.sun.mailmailapi
- 1.6.4
+ 2.0.1test
@@ -536,7 +560,7 @@
configurationorg.apache.commons.configuration2
- 2.7
+ 2.8.0(reworked 2.x version)commons-configuration-${commons.release.2.version}1.10
@@ -562,29 +586,36 @@
org.yaml.snakeyaml.*;resolution:=optional,
*
- 1.7.26
- 4.3.26.RELEASE
+ 1.7.36
+ 5.3.21
-
- false
- 0.14.1
+ 0.15.7false
- 0.8.5
- 3.1.12.2
- 3.1.1
- 8.26
+ 0.8.8
+ 4.7.0.0
+
+
+
+ 3.10.0
+ 3.3.2
+
+ 9.3
+
+ 1.20
- 2.6
- RC2
+ 2.7
+ RC3truescm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}
- Rob Tompkins
- B6E73D84EA4FCC47166087253FAAD2CD5ECBB314
+ Matt Juntunen
+ 7DD53AEFEDF1C3D392B51EBE346F4FCECFB70B1A
- clean verify apache-rat:check japicmp:cmp checkstyle:check spotbugs:check javadoc:javadoc
+ clean install apache-rat:check japicmp:cmp checkstyle:check spotbugs:check javadoc:javadocsrc/test/resources
@@ -619,7 +650,7 @@
org.apache.maven.pluginsmaven-checkstyle-plugin
- 3.1.0
+ 3.1.2${basedir}/conf/checkstyle.xml${basedir}/conf/checkstyle-suppressions.xml
@@ -627,7 +658,6 @@
basedir=${basedir}falsefalse
- false${project.build.sourceDirectory}
@@ -759,6 +789,7 @@
https://docs.oracle.com/javase/8/docs/api/
https://docs.spring.io/spring/docs/${spring.version}/javadoc-api/
+ https://commons.apache.org/proper/commons-text/javadocs/api-release/
@@ -776,47 +807,36 @@
- webdav
+ java9
+
+ 9
+
+
+
+ true
+
+
+
+ java16
+
- false
+ [16,)
-
-
- org.apache.jackrabbit
- jackrabbit-webdav
- 1.5.2
- test
-
- org.apache.maven.pluginsmaven-surefire-plugin
- once
-
- true
- ${test.webdav.base}
-
-
- **/TestWebdavConfigurationBuilder.java
-
+
+ --illegal-access=permit
+ --add-opens java.base/java.lang=ALL-UNNAMED
+
-
- java9
-
- 9
-
-
-
- true
-
- none
@@ -914,6 +931,7 @@
https://docs.oracle.com/javase/8/docs/api/
https://docs.spring.io/spring/docs/${spring.version}/javadoc-api/
+ https://commons.apache.org/proper/commons-text/javadocs/api-release/
diff -Nru commons-configuration2-2.7/src/changes/changes.xml commons-configuration2-2.8.0/src/changes/changes.xml
--- commons-configuration2-2.7/src/changes/changes.xml 2020-03-07 19:23:34.000000000 +0000
+++ commons-configuration2-2.8.0/src/changes/changes.xml 2022-03-31 14:41:23.000000000 +0000
@@ -20,8 +20,201 @@
Apache Commons Configuration Release NotesApache Commons Community
-
+
+
+
+ Make interpolation of collections and arrays in ConfigurationInterpolator consistent with
+ behavior of DefaultConversionHandler. Add ConfigurationInterpolator.setStringConverter to
+ allow customized string conversion behavior.
+
+
+ Computation of blank lines after header comment #82.
+
+
+ Remove redundant initializer #110.
+
+
+ Use final #111.
+
+
+ Java 8 lambda improvements and more #112.
+
+
+ Redundant local variable #113.
+
+
+ Use try with resource #114.
+
+
+ [Javadoc] Specify that typed getList returns null for missing key #100.
+
+
+ Mention EnvironmentConfiguration in the list of configuration sources #45.
+
+
+ DefaultListDelimiterHandler.escapeList working only for List>String< #137.
+
+
+ Use final #141.
+
+
+ Replace test asserts by simpler but equivalent calls. #139
+
+
+ Single Variable Interpolation #182.
+
+
+ Implement proper concurrency in ConstantLookup.
+
+
+ Support new namespace jakarta.mail.* used by javamail 2.0+ (first release October 2020) #186.
+
+
+
+ Implement Iterable in ImmutableNode #74.
+
+
+ Unclosed file handle when reading config from JAR file URL.
+ Add and use FileBasedBuilderProperties.setURL(URL, URLConnectionOptions).
+
+
+ Add PropertiesConfigurationLayout.getBlankLinesBefore() and deprecate getBlancLinesBefore().
+
+
+ Add PropertiesConfigurationLayout.setBlankLinesBefore() and deprecate setBlancLinesBefore().
+
+
+ Add PropertiesConfigurationLayout.PropertyLayoutData.getBlankLines() and deprecate getBlancLines().
+
+
+ Add PropertiesConfigurationLayout.PropertyLayoutData.setBlankLines() and deprecate setBlancLines().
+
+
+ Add ImmutableConfiguration.getEnum() methods.
+
+
+ Add ImmutableConfiguration.getDuration() methods.
+
+
+
+ Make default interpolation prefix lookups configurable via system property. Remove dns, url, and script
+ lookups from defaults. If these lookups are required for use in AbstractConfiguration subclasses, they must
+ be enabled via system property. See ConfigurationInterpolator.getDefaultPrefixLookups() for details.
+
+
+ Bump actions/cache from 2 to 3.0.4 #99, #151, #169.
+
+
+ Bump actions/checkout from 1 to 3 #47, #62, #70, #85, #150, #163.
+
+
+ Bump actions/setup-java from 1.4.0 to 3 #63, #65, #73, #174.
+
+
+ Bump codeql-action from v1 to v2.
+
+
+ Bump Spring dependency versions:
+ org.springframework:spring-beans 4.3.26.RELEASE -> 5.3.21
+ org.springframework:spring-context 4.3.26.RELEASE -> 5.3.21
+ org.springframework:spring-core 4.3.26.RELEASE -> 5.3.21
+ org.springframework:spring-test 4.3.26.RELEASE -> 5.3.21
+ #165, #172
+
+
+ Bump commons-parent from 52 to 53.
+
+
+ Bump Apache Commons Lang from 3.9 to 3.12.0.
+
+
+ Bump com.fasterxml.jackson.core:jackson-databind from 2.10.3 to 2.13.3, #60.
+
+
+ Bump Slf4j test dependencies:
+ org.slf4j:slf4j-api 1.7.26 -> 1.7.33,
+ org.slf4j:slf4j-ext 1.7.26 -> 1.7.33,
+ org.slf4j:slf4j-log4j12 1.7.26 -> 1.7.33,
+ org.slf4j:slf4j-nop 1.7.26 -> 1.7.33.
+
+
+ Bump commons-parent from 50 to 52.
+
+
+ Bump mailapi from 1.6.4 to 1.6.7 #48.
+
+
+ Bump spotbugs-maven-plugin from 3.1.12.2 to 4.7.0.0, #55, #75, #79, #93, #116, #183.
+
+
+ Bump hsqldb from 2.5.0 to 2.5.2 #54, #128.
+
+
+ Bump commons-text from 1.8 to 1.9.
+
+
+ Bump servlet-api from 2.4 to 2.5 #58.
+
+
+ Bump maven-checkstyle-plugin from 3.1.0 to 3.1.2, #57, #97.
+
+
+ Bump commons-pool2 from 2.8.0 to 2.10.0, #61, #124.
+
+
+ Bump optional commons-codec from 1.14 to 1.15.
+
+
+ Bump checkstyle from 8.26 to 9.3, #66, #71, #90, #101, #118, #121, #132, #155.
+
+
+ Bump commons.jacoco.version 0.8.5 to 0.8.8 (Fixes Java 15 builds).
+
+
+ Bump tests from commons-pool2 2.10.0 to 2.11.1.
+
+
+ Bump tests from commons-dbcp2 2.7.0 to 2.9.0.
+
+
+ Bump snakeyaml from 1.26 to 1.30 #68, #126, #137.
+
+
+ Bump commons.japicmp.version from 0.14.1 to 0.15.7.
+
+
+ Bump junit from 4.13 to 4.13.2 #78.
+
+
+ Bump Apache Commons VFS 2.6.0 -> 2.9.0.
+
+
+ Bump jackson-databind from 2.11.3 to 2.13.2.2 ,#88, #94, #127, #159, #168, #173.
+
+
+ Bump commons.animal-sniffer.version 1.19 -> 1.20.
+
+
+ Bump commons.javadoc.version from 3.1.1 to 3.4.0.
+
+
+ Bump org.dbunit:dbunit from 2.7.0 to 2.7.3, #167.
+
+
+ Bump tests to hamcrest v2.2 #143.
+
+
+ Bump slf4j.version from 1.7.33 to 1.7.36 #166.
+
+
+ Bump mailapi from 1.6.6 to 2.0.1 #186.
+
+
+ Use GitHub Actions setup-java Maven cache property #190.
+
+
@@ -31,10 +224,10 @@
Use variable arguments.
- Update ]com.puppycrawl.tools:checkstyle from 8.24 to 8.25.
+ Bump com.puppycrawl.tools:checkstyle from 8.24 to 8.25.
- Update com.fasterxml.jackson.core:jackson-databind from 2.9.9 to 2.10.0.
+ Bump com.fasterxml.jackson.core:jackson-databind from 2.9.9 to 2.10.0.
Refactor XMLConfiguration.write(Writer) to add XMLConfiguration.write(Writer, Transformer).
@@ -46,7 +239,7 @@
XMLConfiguration#write does not indent XML elements.
- Update com.fasterxml.jackson.core:jackson-databind 2.10.0 -> 2.10.1.
+ Bump com.fasterxml.jackson.core:jackson-databind 2.10.0 -> 2.10.1.
[test] org.easymock:easymock 4.0.2 -> 4.1.
@@ -55,31 +248,31 @@
User's Guide > Properties files > Saving - small documentation bugs #41.
- Update Apache Commons VFS from 2.4.1 to 2.5.0.
+ Bump Apache Commons VFS from 2.4.1 to 2.5.0.
- Update Apache Commons VFS from 2.5.0 to 2.6.0.
+ Bump Apache Commons VFS from 2.5.0 to 2.6.0.
- Update optional Apache Commons Codec from 1.13 to 1.14.
+ Bump optional Apache Commons Codec from 1.13 to 1.14.
- Update tests from JUnit 4.12 to 4.13.
+ Bump tests from JUnit 4.12 to 4.13.
- Update optional jackson-databind from 2.10.1 to 2.10.2.
+ Bump optional jackson-databind from 2.10.1 to 2.10.2.
- Update com.fasterxml.jackson.core:jackson-databind from 2.10.2 to 2.10.3.
+ Bump com.fasterxml.jackson.core:jackson-databind from 2.10.2 to 2.10.3.
Update org.yaml:snakeyaml from 1.25 to 1.26 and tweak parser configuration.
- Update org.springframework:spring-* from 4.3.25.RELEASE to 4.3.26.RELEASE.
+ Bump org.springframework:spring-* from 4.3.25.RELEASE to 4.3.26.RELEASE.
- Update org.apache.commons:commons-parent from 48 to 50
+ Bump org.apache.commons:commons-parent from 48 to 50
@@ -89,13 +282,13 @@
XMLPropertyListConfiguration cannot set arrays in the correct plist form.
- Update Apache Commons Text from 1.6 to 1.7.
+ Bump Apache Commons Text from 1.6 to 1.7.
- Update Apache Commons VFS from 2.3 to 2.4.1.
+ Bump Apache Commons VFS from 2.3 to 2.4.1.
- Update Apache Commons Text from 1.7 to 1.8.
+ Bump Apache Commons Text from 1.7 to 1.8.
Fix Javadoc for org.apache.commons.configuration2.PropertiesConfiguration.getIncludeOptional().
@@ -104,7 +297,7 @@
Document "includeOptional" on the site.
- [CVE-2014-0114] Update Apache Commons BeanUtils from 1.9.3 to 1.9.4.
+ [CVE-2014-0114] Bump Apache Commons BeanUtils from 1.9.3 to 1.9.4.
Fix syntax in user guide documentation #33.
@@ -113,31 +306,31 @@
Allow for custom behavior to handle errors loading included properties files.
- Update org.yaml:snakeyaml from 1.24 to 1.25.
+ Bump org.yaml:snakeyaml from 1.24 to 1.25.
- Update tests from org.apache.commons:commons-dbcp2 2.6.0 to 2.7.0.
+ Bump tests from org.apache.commons:commons-dbcp2 2.6.0 to 2.7.0.
- Update tests from org.apache.commons:commons-pool2 2.6.2 to 2.7.0.
+ Bump tests from org.apache.commons:commons-pool2 2.6.2 to 2.7.0.
- Update commons-codec:commons-codec from 1.12 to 1.13.
+ Bump commons-codec:commons-codec from 1.12 to 1.13.
- Update tests from org.hsqldb:hsqldb 2.4.1 to 2.5.0.
+ Bump tests from org.hsqldb:hsqldb 2.4.1 to 2.5.0.
- Update tests from com.sun.mail:mailapi 1.6.3 to 1.6.4.
+ Bump tests from com.sun.mail:mailapi 1.6.3 to 1.6.4.
- Update Spring from 4.3.24.RELEASE to 4.3.25.RELEASE.
+ Bump Spring from 4.3.24.RELEASE to 4.3.25.RELEASE.
Properties file using cyclical includes cause a StackOverflowError instead of detecting the misconfiguration.
- Update maven-checkstyle-plugin from 3.0.0 to 3.1.0.
+ Bump maven-checkstyle-plugin from 3.0.0 to 3.1.0.
Use current version of Checkstyle: 6.18 to 8.24.
@@ -149,28 +342,28 @@
Allow user to specify the comments and separator chars.
- Update Jackson from 2.9.7 to 2.9.8.
+ Bump Jackson from 2.9.7 to 2.9.8.
- Update Apache Commons Codec from 1.11 to 1.12.
+ Bump Apache Commons Codec from 1.11 to 1.12.
- Update Apache Commons VFS from 2.2 to 2.3.
+ Bump Apache Commons VFS from 2.2 to 2.3.
- Update Spring from 4.3.19 to 4.3.22.
+ Bump Spring from 4.3.19 to 4.3.22.
- Update optional library snakeyaml from 1.23 to 1.24.
+ Bump optional library snakeyaml from 1.23 to 1.24.
- Update Apache Commons Lang from 3.8.1 to 3.9.
+ Bump Apache Commons Lang from 3.8.1 to 3.9.
- Update Jackson from 2.9.8 to 2.9.9.
+ Bump Jackson from 2.9.8 to 2.9.9.
- Update Spring from 4.3.22 to 4.3.24.
+ Bump Spring from 4.3.22 to 4.3.24.
Add the special key "includeoptional" for properties files.
@@ -182,7 +375,7 @@
Fixed numerous typos in user guides.
- Update Apache Commons Lang from 3.7 to 3.8.1.
+ Bump Apache Commons Lang from 3.7 to 3.8.1.
FileHandlerReloadingDetector now has a new refresh() method to
@@ -209,22 +402,22 @@
Replace use of deprecated Commons Lang string substitution code for Commons Text.
- Update Java requirement from version 7 to 8.
+ Bump Java requirement from version 7 to 8.
- Update Jackson from 2.9.6 to 2.9.7.
+ Bump Jackson from 2.9.6 to 2.9.7.
- Update optional dependency snakeyaml from 1.21 to 1.23.
+ Bump optional dependency snakeyaml from 1.21 to 1.23.
- Update optional Spring dependencies from 4.3.18.RELEASE to 4.3.19.RELEASE.
+ Bump optional Spring dependencies from 4.3.18.RELEASE to 4.3.19.RELEASE.
Add support for Commons Text 1.4 localhost string lookup as a default lookup.
- Update Apache Commons Text from 1.4 to 1.5.
+ Bump Apache Commons Text from 1.4 to 1.5.
Add support for Commons Text 1.5 new string lookups as default lookups.
@@ -233,20 +426,20 @@
org.apache.commons.configuration2.DatabaseConfiguration never closes result sets and statements.
- Update Apache Commons Text from 1.5 to 1.6.
+ Bump Apache Commons Text from 1.5 to 1.6.
- Update Spring from 4.3.14.RELEASE to 4.3.18.RELEASE.
+ Bump Spring from 4.3.14.RELEASE to 4.3.18.RELEASE.
- Update optional dependency snakeyaml from 1.20 to 1.21.
+ Bump optional dependency snakeyaml from 1.20 to 1.21.
- Update Jackson from 2.9.5 to 2.9.6.
+ Bump Jackson from 2.9.5 to 2.9.6.
Root node attributes are now updated correctly when loading XML
@@ -256,31 +449,31 @@
Added a .gitignore file to the project.
- Update Apache Commons Codec from 1.10 to 1.11.
+ Bump Apache Commons Codec from 1.10 to 1.11.
- Update Jackson from 2.8.9 to 2.9.3.
+ Bump Jackson from 2.8.9 to 2.9.3.
- Update Apache Commons Lang from 3.6 to 3.7.
+ Bump Apache Commons Lang from 3.6 to 3.7.
- Update Apache Commons VFS from 2.1 to 2.2.
+ Bump Apache Commons VFS from 2.1 to 2.2.
- Update Snakeyaml from 1.18 to 1.19.
+ Bump Snakeyaml from 1.18 to 1.19.
- Update optional dependency snakeyaml from 1.19 to 1.20.
+ Bump optional dependency snakeyaml from 1.19 to 1.20.
- Update Spring from 4.3.9.RELEASE to 4.3.13.RELEASE.
+ Bump Spring from 4.3.9.RELEASE to 4.3.13.RELEASE.
- Update optional dependency Jackson from 2.9.3 to 2.9.5.
+ Bump optional dependency Jackson from 2.9.3 to 2.9.5.
- Update optional dependency Spring from 4.3.13.RELEASE to 4.3.14.RELEASE.
+ Bump optional dependency Spring from 4.3.13.RELEASE to 4.3.14.RELEASE.
JSONConfiguration can now handle list structures with complex objects
@@ -342,10 +535,10 @@
the correct root node set.
- Update optional Spring dependency from 4.2.5.RELEASE to 4.3.9.RELEASE.
+ Bump optional Spring dependency from 4.2.5.RELEASE to 4.3.9.RELEASE.
- Update Apache Commons Lang from 3.3.2 to 3.6.
+ Bump Apache Commons Lang from 3.3.2 to 3.6.
Add convenience ctor ConfigurationRuntimeException(String, Object...).
@@ -360,7 +553,7 @@
Fixed a typo in the upgrade to 2.0 guide.
- Update platform requirement from Java 6 to 7.
+ Bump platform requirement from Java 6 to 7.
Add toString() methods here and there to help debugging.
@@ -468,10 +661,10 @@
are now handled correctly when the configuration is saved.
- Update Apache Commons VFS from 2.0 to 2.1.
+ Bump Apache Commons VFS from 2.0 to 2.1.
- Update optional dependency Apache Commons Codec from 1.9 to 1.10.
+ Bump optional dependency Apache Commons Codec from 1.9 to 1.10.
@@ -1847,7 +2040,7 @@
A new class PropertiesConfigurationLayout was introduced whose task is
- to preserve the structure (e.g. comments, blanc lines) of a file
+ to preserve the structure (e.g. comments, blank lines) of a file
loaded by PropertiesConfiguration. Each PropertiesConfiguration
object is now associated with such a layout object. A saved properties
file will look very similar to its original.
diff -Nru commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
--- commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java 2020-03-07 18:57:27.000000000 +0000
+++ commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java 2022-03-31 14:41:23.000000000 +0000
@@ -19,6 +19,7 @@
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -46,58 +47,48 @@
import org.apache.commons.configuration2.sync.LockMode;
import org.apache.commons.configuration2.sync.NoOpSynchronizer;
import org.apache.commons.configuration2.sync.Synchronizer;
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.lang3.ObjectUtils;
/**
- *
Abstract configuration class. Provides basic functionality but does not
- * store any data.
- *
If you want to write your own Configuration class then you should
- * implement only abstract methods from this class. A lot of functionality
- * needed by typical implementations of the {@code Configuration}
- * interface is already provided by this base class. Following is a list of
- * features implemented here:
- *
Data conversion support. The various data types required by the
- * {@code Configuration} interface are already handled by this base class.
- * A concrete sub class only needs to provide a generic {@code getProperty()}
- * method.
- *
Support for variable interpolation. Property values containing special
- * variable tokens (like {@code ${var}}) will be replaced by their
- * corresponding values.
- *
Optional support for string lists. The values of properties to be added to this
- * configuration are checked whether they contain a list delimiter character. If
- * this is the case and if list splitting is enabled, the string is split and
- * multiple values are added for this property. List splitting is controlled
- * by a {@link ListDelimiterHandler} object which can be set using the
- * {@link #setListDelimiterHandler(ListDelimiterHandler)} method. It is
- * disabled per default. To enable this feature, set a suitable
- * {@code ListDelimiterHandler}, e.g. an instance of
- * {@link org.apache.commons.configuration2.convert.DefaultListDelimiterHandler
- * DefaultListDelimiterHandler} configured with the desired list delimiter character.
- *
Allows specifying how missing properties are treated. Per default the
- * get methods returning an object will return null if the searched
- * property key is not found (and no default value is provided). With the
- * {@code setThrowExceptionOnMissing()} method this behavior can be
- * changed to throw an exception when a requested property cannot be found.
- *
Basic event support. Whenever this configuration is modified registered
- * event listeners are notified. Refer to the various {@code EVENT_XXX}
- * constants to get an impression about which event types are supported.
- *
Support for proper synchronization based on the {@link Synchronizer}
- * interface.
+ *
+ * Abstract configuration class. Provides basic functionality but does not store any data.
+ *
+ *
+ * If you want to write your own Configuration class then you should implement only abstract methods from this class. A
+ * lot of functionality needed by typical implementations of the {@code Configuration} interface is already provided by
+ * this base class. Following is a list of features implemented here:
+ *
+ *
+ *
Data conversion support. The various data types required by the {@code Configuration} interface are already
+ * handled by this base class. A concrete sub class only needs to provide a generic {@code getProperty()} method.
+ *
Support for variable interpolation. Property values containing special variable tokens (like {@code ${var}}) will
+ * be replaced by their corresponding values.
+ *
Optional support for string lists. The values of properties to be added to this configuration are checked whether
+ * they contain a list delimiter character. If this is the case and if list splitting is enabled, the string is split
+ * and multiple values are added for this property. List splitting is controlled by a {@link ListDelimiterHandler}
+ * object which can be set using the {@link #setListDelimiterHandler(ListDelimiterHandler)} method. It is disabled per
+ * default. To enable this feature, set a suitable {@code ListDelimiterHandler}, e.g. an instance of
+ * {@link org.apache.commons.configuration2.convert.DefaultListDelimiterHandler DefaultListDelimiterHandler} configured
+ * with the desired list delimiter character.
+ *
Allows specifying how missing properties are treated. Per default the get methods returning an object will return
+ * null if the searched property key is not found (and no default value is provided). With the
+ * {@code setThrowExceptionOnMissing()} method this behavior can be changed to throw an exception when a requested
+ * property cannot be found.
+ *
Basic event support. Whenever this configuration is modified registered event listeners are notified. Refer to
+ * the various {@code EVENT_XXX} constants to get an impression about which event types are supported.
+ *
Support for proper synchronization based on the {@link Synchronizer} interface.
*
*
- * Most methods defined by the {@code Configuration} interface are already
- * implemented in this class. Many method implementations perform basic
- * book-keeping tasks (e.g. firing events, handling synchronization), and then
- * delegate to other (protected) methods executing the actual work. Subclasses
- * override these protected methods to define or adapt behavior. The public
- * entry point methods are final to prevent subclasses from breaking basic
- * functionality.
+ * Most methods defined by the {@code Configuration} interface are already implemented in this class. Many method
+ * implementations perform basic book-keeping tasks (e.g. firing events, handling synchronization), and then delegate to
+ * other (protected) methods executing the actual work. Subclasses override these protected methods to define or adapt
+ * behavior. The public entry point methods are final to prevent subclasses from breaking basic functionality.
*
*
*/
-public abstract class AbstractConfiguration extends BaseEventSource implements Configuration
-{
+public abstract class AbstractConfiguration extends BaseEventSource implements Configuration {
/** The list delimiter handler. */
private ListDelimiterHandler listDelimiterHandler;
@@ -105,8 +96,8 @@
private ConversionHandler conversionHandler;
/**
- * Whether the configuration should throw NoSuchElementExceptions or simply
- * return null when a property does not exist. Defaults to return null.
+ * Whether the configuration should throw NoSuchElementExceptions or simply return null when a property does not exist.
+ * Defaults to return null.
*/
private boolean throwExceptionOnMissing;
@@ -119,14 +110,13 @@
/** The object used for dealing with encoded property values. */
private ConfigurationDecoder configurationDecoder;
- /** Stores the logger.*/
+ /** Stores the logger. */
private ConfigurationLogger log;
/**
* Creates a new instance of {@code AbstractConfiguration}.
*/
- public AbstractConfiguration()
- {
+ public AbstractConfiguration() {
interpolator = new AtomicReference<>();
initLogger(null);
installDefaultInterpolator();
@@ -140,43 +130,32 @@
* @return the {@code ListDelimiterHandler}
* @since 2.0
*/
- public ListDelimiterHandler getListDelimiterHandler()
- {
+ public ListDelimiterHandler getListDelimiterHandler() {
return listDelimiterHandler;
}
/**
*
- * Sets the {@code ListDelimiterHandler} to be used by this instance. This
- * object is invoked every time when dealing with string properties that may
- * contain a list delimiter and thus have to be split to multiple values.
- * Per default, a {@code ListDelimiterHandler} implementation is set which
- * does not support list splitting. This can be changed for instance by
- * setting a {@link org.apache.commons.configuration2.convert.DefaultListDelimiterHandler
+ * Sets the {@code ListDelimiterHandler} to be used by this instance. This object is invoked every time when dealing
+ * with string properties that may contain a list delimiter and thus have to be split to multiple values. Per default, a
+ * {@code ListDelimiterHandler} implementation is set which does not support list splitting. This can be changed for
+ * instance by setting a {@link org.apache.commons.configuration2.convert.DefaultListDelimiterHandler
* DefaultListDelimiterHandler} object.
*
*
- * Warning: Be careful when changing the list delimiter
- * handler when the configuration has already been loaded/populated. List
- * handling is typically applied already when properties are added to the
- * configuration. If later another handler is set which processes lists
- * differently, results may be unexpected; some operations may even cause
+ * Warning: Be careful when changing the list delimiter handler when the configuration has already been
+ * loaded/populated. List handling is typically applied already when properties are added to the configuration. If later
+ * another handler is set which processes lists differently, results may be unexpected; some operations may even cause
* exceptions.
*
*
- * @param listDelimiterHandler the {@code ListDelimiterHandler} to be used
- * (must not be null)
- * @throws IllegalArgumentException if the {@code ListDelimiterHandler} is
- * null
+ * @param listDelimiterHandler the {@code ListDelimiterHandler} to be used (must not be null)
+ * @throws IllegalArgumentException if the {@code ListDelimiterHandler} is null
* @since 2.0
*/
- public void setListDelimiterHandler(
- final ListDelimiterHandler listDelimiterHandler)
- {
- if (listDelimiterHandler == null)
- {
- throw new IllegalArgumentException(
- "List delimiter handler must not be null!");
+ public void setListDelimiterHandler(final ListDelimiterHandler listDelimiterHandler) {
+ if (listDelimiterHandler == null) {
+ throw new IllegalArgumentException("List delimiter handler must not be null!");
}
this.listDelimiterHandler = listDelimiterHandler;
}
@@ -187,49 +166,37 @@
* @return the {@code ConversionHandler}
* @since 2.0
*/
- public ConversionHandler getConversionHandler()
- {
+ public ConversionHandler getConversionHandler() {
return conversionHandler;
}
/**
- * Sets the {@code ConversionHandler} to be used by this instance. The
- * {@code ConversionHandler} is responsible for every kind of data type
- * conversion. It is consulted by all get methods returning results in
- * specific data types. A newly created configuration uses a default
- * {@code ConversionHandler} implementation. This can be changed while
- * initializing the configuration (e.g. via a builder). Note that access to
- * this property is not synchronized.
- *
- * @param conversionHandler the {@code ConversionHandler} to be used (must
- * not be null)
- * @throws IllegalArgumentException if the {@code ConversionHandler} is
- * null
- * @since 2.0
- */
- public void setConversionHandler(final ConversionHandler conversionHandler)
- {
- if (conversionHandler == null)
- {
- throw new IllegalArgumentException(
- "ConversionHandler must not be null!");
+ * Sets the {@code ConversionHandler} to be used by this instance. The {@code ConversionHandler} is responsible for
+ * every kind of data type conversion. It is consulted by all get methods returning results in specific data types. A
+ * newly created configuration uses a default {@code ConversionHandler} implementation. This can be changed while
+ * initializing the configuration (e.g. via a builder). Note that access to this property is not synchronized.
+ *
+ * @param conversionHandler the {@code ConversionHandler} to be used (must not be null)
+ * @throws IllegalArgumentException if the {@code ConversionHandler} is null
+ * @since 2.0
+ */
+ public void setConversionHandler(final ConversionHandler conversionHandler) {
+ if (conversionHandler == null) {
+ throw new IllegalArgumentException("ConversionHandler must not be null!");
}
this.conversionHandler = conversionHandler;
}
/**
- * Allows to set the {@code throwExceptionOnMissing} flag. This
- * flag controls the behavior of property getter methods that return
- * objects if the requested property is missing. If the flag is set to
- * false (which is the default value), these methods will return
- * null. If set to true, they will throw a
- * {@code NoSuchElementException} exception. Note that getter methods
- * for primitive data types are not affected by this flag.
+ * Allows to set the {@code throwExceptionOnMissing} flag. This flag controls the behavior of property getter methods
+ * that return objects if the requested property is missing. If the flag is set to false (which is the default
+ * value), these methods will return null. If set to true, they will throw a
+ * {@code NoSuchElementException} exception. Note that getter methods for primitive data types are not affected by this
+ * flag.
*
* @param throwExceptionOnMissing The new value for the property
*/
- public void setThrowExceptionOnMissing(final boolean throwExceptionOnMissing)
- {
+ public void setThrowExceptionOnMissing(final boolean throwExceptionOnMissing) {
this.throwExceptionOnMissing = throwExceptionOnMissing;
}
@@ -238,122 +205,94 @@
*
* @return true if missing values throw Exceptions
*/
- public boolean isThrowExceptionOnMissing()
- {
+ public boolean isThrowExceptionOnMissing() {
return throwExceptionOnMissing;
}
/**
- * Returns the {@code ConfigurationInterpolator} object that manages the
- * lookup objects for resolving variables.
+ * Returns the {@code ConfigurationInterpolator} object that manages the lookup objects for resolving variables.
+ * Unless a custom interpolator has been set or the instance has been modified, the returned interpolator will
+ * resolve values from this configuration instance and support the
+ * {@link ConfigurationInterpolator#getDefaultPrefixLookups() default prefix lookups}.
*
- * @return the {@code ConfigurationInterpolator} associated with this
- * configuration
+ * @return the {@code ConfigurationInterpolator} associated with this configuration
* @since 1.4
+ * @see ConfigurationInterpolator#getDefaultPrefixLookups()
*/
@Override
- public ConfigurationInterpolator getInterpolator()
- {
+ public ConfigurationInterpolator getInterpolator() {
return interpolator.get();
}
/**
- * {@inheritDoc} This implementation sets the passed in object without
- * further modifications. A null argument is allowed; this disables
- * interpolation.
+ * {@inheritDoc} This implementation sets the passed in object without further modifications. A null argument is
+ * allowed; this disables interpolation.
*
* @since 2.0
*/
@Override
- public final void setInterpolator(final ConfigurationInterpolator ci)
- {
+ public final void setInterpolator(final ConfigurationInterpolator ci) {
interpolator.set(ci);
}
/**
- * {@inheritDoc} This implementation creates a new
- * {@code ConfigurationInterpolator} instance and initializes it with the
- * given {@code Lookup} objects. In addition, it adds a specialized default
- * {@code Lookup} object which queries this {@code Configuration}.
+ * {@inheritDoc} This implementation creates a new {@code ConfigurationInterpolator} instance and initializes it with
+ * the given {@code Lookup} objects. In addition, it adds a specialized default {@code Lookup} object which queries this
+ * {@code Configuration}.
*
* @since 2.0
*/
@Override
- public final void installInterpolator(
- final Map prefixLookups,
- final Collection extends Lookup> defLookups)
- {
- final InterpolatorSpecification spec =
- new InterpolatorSpecification.Builder()
- .withPrefixLookups(prefixLookups)
- .withDefaultLookups(defLookups)
- .withDefaultLookup(new ConfigurationLookup(this))
- .create();
+ public final void installInterpolator(final Map prefixLookups, final Collection extends Lookup> defLookups) {
+ final InterpolatorSpecification spec = new InterpolatorSpecification.Builder().withPrefixLookups(prefixLookups).withDefaultLookups(defLookups)
+ .withDefaultLookup(new ConfigurationLookup(this)).create();
setInterpolator(ConfigurationInterpolator.fromSpecification(spec));
}
/**
- * Registers all {@code Lookup} objects in the given map at the current
- * {@code ConfigurationInterpolator} of this configuration. The set of
- * default lookup objects (for variables without a prefix) is not modified
- * by this method. If this configuration does not have a
- * {@code ConfigurationInterpolator}, a new instance is created. Note: This
- * method is mainly intended to be used for initializing a configuration
- * when it is created by a builder. Normal client code should better call
- * {@link #installInterpolator(Map, Collection)} to define the
- * {@code ConfigurationInterpolator} in a single step.
+ * Registers all {@code Lookup} objects in the given map at the current {@code ConfigurationInterpolator} of this
+ * configuration. The set of default lookup objects (for variables without a prefix) is not modified by this method. If
+ * this configuration does not have a {@code ConfigurationInterpolator}, a new instance is created. Note: This method is
+ * mainly intended to be used for initializing a configuration when it is created by a builder. Normal client code
+ * should better call {@link #installInterpolator(Map, Collection)} to define the {@code ConfigurationInterpolator} in a
+ * single step.
*
- * @param lookups a map with new {@code Lookup} objects and their prefixes
- * (may be null)
+ * @param lookups a map with new {@code Lookup} objects and their prefixes (may be null)
* @since 2.0
*/
- public void setPrefixLookups(final Map lookups)
- {
+ public void setPrefixLookups(final Map lookups) {
boolean success;
- do
- {
+ do {
// do this in a loop because the ConfigurationInterpolator
// instance may be changed by another thread
final ConfigurationInterpolator ciOld = getInterpolator();
- final ConfigurationInterpolator ciNew =
- ciOld != null ? ciOld : new ConfigurationInterpolator();
+ final ConfigurationInterpolator ciNew = ciOld != null ? ciOld : new ConfigurationInterpolator();
ciNew.registerLookups(lookups);
success = interpolator.compareAndSet(ciOld, ciNew);
} while (!success);
}
/**
- * Adds all {@code Lookup} objects in the given collection as default
- * lookups (i.e. lookups without a variable prefix) to the
- * {@code ConfigurationInterpolator} object of this configuration. In
- * addition, it adds a specialized default {@code Lookup} object which
- * queries this {@code Configuration}. The set of {@code Lookup} objects
- * with prefixes is not modified by this method. If this configuration does
- * not have a {@code ConfigurationInterpolator}, a new instance is created.
- * Note: This method is mainly intended to be used for initializing a
- * configuration when it is created by a builder. Normal client code should
- * better call {@link #installInterpolator(Map, Collection)} to define the
+ * Adds all {@code Lookup} objects in the given collection as default lookups (i.e. lookups without a variable prefix)
+ * to the {@code ConfigurationInterpolator} object of this configuration. In addition, it adds a specialized default
+ * {@code Lookup} object which queries this {@code Configuration}. The set of {@code Lookup} objects with prefixes is
+ * not modified by this method. If this configuration does not have a {@code ConfigurationInterpolator}, a new instance
+ * is created. Note: This method is mainly intended to be used for initializing a configuration when it is created by a
+ * builder. Normal client code should better call {@link #installInterpolator(Map, Collection)} to define the
* {@code ConfigurationInterpolator} in a single step.
*
- * @param lookups the collection with default {@code Lookup} objects to be
- * added
+ * @param lookups the collection with default {@code Lookup} objects to be added
* @since 2.0
*/
- public void setDefaultLookups(final Collection extends Lookup> lookups)
- {
+ public void setDefaultLookups(final Collection extends Lookup> lookups) {
boolean success;
- do
- {
+ do {
final ConfigurationInterpolator ciOld = getInterpolator();
- final ConfigurationInterpolator ciNew =
- ciOld != null ? ciOld : new ConfigurationInterpolator();
+ final ConfigurationInterpolator ciNew = ciOld != null ? ciOld : new ConfigurationInterpolator();
Lookup confLookup = findConfigurationLookup(ciNew);
- if (confLookup == null)
- {
+ if (confLookup == null) {
confLookup = new ConfigurationLookup(this);
- }
- else
- {
+ } else {
ciNew.removeDefaultLookup(confLookup);
}
ciNew.addDefaultLookups(lookups);
@@ -363,39 +302,32 @@
}
/**
- * Sets the specified {@code ConfigurationInterpolator} as the parent of
- * this configuration's {@code ConfigurationInterpolator}. If this
- * configuration does not have a {@code ConfigurationInterpolator}, a new
- * instance is created. Note: This method is mainly intended to be used for
- * initializing a configuration when it is created by a builder. Normal
- * client code can directly update the {@code ConfigurationInterpolator}.
+ * Sets the specified {@code ConfigurationInterpolator} as the parent of this configuration's
+ * {@code ConfigurationInterpolator}. If this configuration does not have a {@code ConfigurationInterpolator}, a new
+ * instance is created. Note: This method is mainly intended to be used for initializing a configuration when it is
+ * created by a builder. Normal client code can directly update the {@code ConfigurationInterpolator}.
*
* @param parent the parent {@code ConfigurationInterpolator} to be set
* @since 2.0
*/
- public void setParentInterpolator(final ConfigurationInterpolator parent)
- {
+ public void setParentInterpolator(final ConfigurationInterpolator parent) {
boolean success;
- do
- {
+ do {
final ConfigurationInterpolator ciOld = getInterpolator();
- final ConfigurationInterpolator ciNew =
- ciOld != null ? ciOld : new ConfigurationInterpolator();
+ final ConfigurationInterpolator ciNew = ciOld != null ? ciOld : new ConfigurationInterpolator();
ciNew.setParentInterpolator(parent);
success = interpolator.compareAndSet(ciOld, ciNew);
} while (!success);
}
/**
- * Sets the {@code ConfigurationDecoder} for this configuration. This object
- * is used by {@link #getEncodedString(String)}.
+ * Sets the {@code ConfigurationDecoder} for this configuration. This object is used by
+ * {@link #getEncodedString(String)}.
*
* @param configurationDecoder the {@code ConfigurationDecoder}
* @since 2.0
*/
- public void setConfigurationDecoder(
- final ConfigurationDecoder configurationDecoder)
- {
+ public void setConfigurationDecoder(final ConfigurationDecoder configurationDecoder) {
this.configurationDecoder = configurationDecoder;
}
@@ -405,38 +337,29 @@
* @return the {@code ConfigurationDecoder}
* @since 2.0
*/
- public ConfigurationDecoder getConfigurationDecoder()
- {
+ public ConfigurationDecoder getConfigurationDecoder() {
return configurationDecoder;
}
/**
- * Creates a clone of the {@code ConfigurationInterpolator} used by this
- * instance. This method can be called by {@code clone()} implementations of
- * derived classes. Normally, the {@code ConfigurationInterpolator} of a
- * configuration instance must not be shared with other instances because it
- * contains a specific {@code Lookup} object pointing to the owning
- * configuration. This has to be taken into account when cloning a
- * configuration. This method creates a new
- * {@code ConfigurationInterpolator} for this configuration instance which
- * contains all lookup objects from the original
- * {@code ConfigurationInterpolator} except for the configuration specific
- * lookup pointing to the passed in original configuration. This one is
- * replaced by a corresponding {@code Lookup} referring to this
+ * Creates a clone of the {@code ConfigurationInterpolator} used by this instance. This method can be called by
+ * {@code clone()} implementations of derived classes. Normally, the {@code ConfigurationInterpolator} of a
+ * configuration instance must not be shared with other instances because it contains a specific {@code Lookup} object
+ * pointing to the owning configuration. This has to be taken into account when cloning a configuration. This method
+ * creates a new {@code ConfigurationInterpolator} for this configuration instance which contains all lookup objects
+ * from the original {@code ConfigurationInterpolator} except for the configuration specific lookup pointing to the
+ * passed in original configuration. This one is replaced by a corresponding {@code Lookup} referring to this
* configuration.
*
- * @param orgConfig the original configuration from which this one was
- * cloned
+ * @param orgConfig the original configuration from which this one was cloned
* @since 2.0
*/
- protected void cloneInterpolator(final AbstractConfiguration orgConfig)
- {
+ protected void cloneInterpolator(final AbstractConfiguration orgConfig) {
interpolator = new AtomicReference<>();
final ConfigurationInterpolator orgInterpolator = orgConfig.getInterpolator();
final List defaultLookups = orgInterpolator.getDefaultLookups();
final Lookup lookup = findConfigurationLookup(orgInterpolator, orgConfig);
- if (lookup != null)
- {
+ if (lookup != null) {
defaultLookups.remove(lookup);
}
@@ -444,51 +367,38 @@
}
/**
- * Creates a default {@code ConfigurationInterpolator} which is initialized
- * with all default {@code Lookup} objects. This method is called by the
- * constructor. It ensures that default interpolation works for every new
- * configuration instance.
- */
- private void installDefaultInterpolator()
- {
- installInterpolator(
- ConfigurationInterpolator.getDefaultPrefixLookups(), null);
+ * Creates a default {@code ConfigurationInterpolator} which is initialized with all default {@code Lookup} objects.
+ * This method is called by the constructor. It ensures that default interpolation works for every new configuration
+ * instance.
+ */
+ private void installDefaultInterpolator() {
+ installInterpolator(ConfigurationInterpolator.getDefaultPrefixLookups(), null);
}
/**
- * Finds a {@code ConfigurationLookup} pointing to this configuration in the
- * default lookups of the specified {@code ConfigurationInterpolator}. This
- * method is called to ensure that there is exactly one default lookup
- * querying this configuration.
+ * Finds a {@code ConfigurationLookup} pointing to this configuration in the default lookups of the specified
+ * {@code ConfigurationInterpolator}. This method is called to ensure that there is exactly one default lookup querying
+ * this configuration.
*
* @param ci the {@code ConfigurationInterpolator} in question
* @return the found {@code Lookup} object or null
*/
- private Lookup findConfigurationLookup(final ConfigurationInterpolator ci)
- {
+ private Lookup findConfigurationLookup(final ConfigurationInterpolator ci) {
return findConfigurationLookup(ci, this);
}
/**
- * Finds a {@code ConfigurationLookup} pointing to the specified
- * configuration in the default lookups for the specified
+ * Finds a {@code ConfigurationLookup} pointing to the specified configuration in the default lookups for the specified
* {@code ConfigurationInterpolator}.
*
* @param ci the {@code ConfigurationInterpolator} in question
* @param targetConf the target configuration of the searched lookup
* @return the found {@code Lookup} object or null
*/
- private static Lookup findConfigurationLookup(final ConfigurationInterpolator ci,
- final ImmutableConfiguration targetConf)
- {
- for (final Lookup l : ci.getDefaultLookups())
- {
- if (l instanceof ConfigurationLookup)
- {
- if (targetConf == ((ConfigurationLookup) l).getConfiguration())
- {
- return l;
- }
+ private static Lookup findConfigurationLookup(final ConfigurationInterpolator ci, final ImmutableConfiguration targetConf) {
+ for (final Lookup l : ci.getDefaultLookups()) {
+ if (l instanceof ConfigurationLookup && targetConf == ((ConfigurationLookup) l).getConfiguration()) {
+ return l;
}
}
return null;
@@ -500,88 +410,73 @@
* @return the logger
* @since 2.0
*/
- public ConfigurationLogger getLogger()
- {
+ public ConfigurationLogger getLogger() {
return log;
}
/**
- * Allows setting the logger to be used by this configuration object. This
- * method makes it possible for clients to exactly control logging behavior.
- * Per default a logger is set that will ignore all log messages. Derived
- * classes that want to enable logging should call this method during their
- * initialization with the logger to be used. It is legal to pass a
- * null logger; in this case, logging will be disabled.
+ * Allows setting the logger to be used by this configuration object. This method makes it possible for clients to
+ * exactly control logging behavior. Per default a logger is set that will ignore all log messages. Derived classes that
+ * want to enable logging should call this method during their initialization with the logger to be used. It is legal to
+ * pass a null logger; in this case, logging will be disabled.
*
* @param log the new logger
* @since 2.0
*/
- public void setLogger(final ConfigurationLogger log)
- {
+ public void setLogger(final ConfigurationLogger log) {
initLogger(log);
}
/**
- * Adds a special {@link EventListener} object to this configuration that
- * will log all internal errors. This method is intended to be used by
- * certain derived classes, for which it is known that they can fail on
- * property access (e.g. {@code DatabaseConfiguration}).
+ * Adds a special {@link EventListener} object to this configuration that will log all internal errors. This method is
+ * intended to be used by certain derived classes, for which it is known that they can fail on property access (e.g.
+ * {@code DatabaseConfiguration}).
*
* @since 1.4
*/
- public final void addErrorLogListener()
- {
- addEventListener(ConfigurationErrorEvent.ANY,
- event -> getLogger().warn("Internal error", event.getCause()));
+ public final void addErrorLogListener() {
+ addEventListener(ConfigurationErrorEvent.ANY, event -> getLogger().warn("Internal error", event.getCause()));
}
/**
- * Returns the object responsible for synchronizing this configuration. All
- * access to this configuration - both read and write access - is controlled
- * by this object. This implementation never returns null. If no
- * {@code Synchronizer} has been set, a {@link NoOpSynchronizer} is
- * returned. So, per default, instances of {@code AbstractConfiguration} are
- * not thread-safe unless a suitable {@code Synchronizer} is set!
+ * Returns the object responsible for synchronizing this configuration. All access to this configuration - both read and
+ * write access - is controlled by this object. This implementation never returns null. If no
+ * {@code Synchronizer} has been set, a {@link NoOpSynchronizer} is returned. So, per default, instances of
+ * {@code AbstractConfiguration} are not thread-safe unless a suitable {@code Synchronizer} is set!
*
* @return the {@code Synchronizer} used by this instance
* @since 2.0
*/
@Override
- public final Synchronizer getSynchronizer()
- {
+ public final Synchronizer getSynchronizer() {
final Synchronizer sync = synchronizer;
return sync != null ? sync : NoOpSynchronizer.INSTANCE;
}
/**
- * Sets the object responsible for synchronizing this configuration. This
- * method has to be called with a suitable {@code Synchronizer} object when
- * initializing this configuration instance in order to make it thread-safe.
+ * Sets the object responsible for synchronizing this configuration. This method has to be called with a suitable
+ * {@code Synchronizer} object when initializing this configuration instance in order to make it thread-safe.
*
- * @param synchronizer the new {@code Synchronizer}; can be null,
- * then this instance uses a {@link NoOpSynchronizer}
+ * @param synchronizer the new {@code Synchronizer}; can be null, then this instance uses a
+ * {@link NoOpSynchronizer}
* @since 2.0
*/
@Override
- public final void setSynchronizer(final Synchronizer synchronizer)
- {
+ public final void setSynchronizer(final Synchronizer synchronizer) {
this.synchronizer = synchronizer;
}
/**
- * {@inheritDoc} This implementation delegates to {@code beginRead()} or
- * {@code beginWrite()}, depending on the {@code LockMode} argument.
- * Subclasses can override these protected methods to perform additional
- * steps when a configuration is locked.
+ * {@inheritDoc} This implementation delegates to {@code beginRead()} or {@code beginWrite()}, depending on the
+ * {@code LockMode} argument. Subclasses can override these protected methods to perform additional steps when a
+ * configuration is locked.
*
* @since 2.0
* @throws NullPointerException if the argument is null
*/
@Override
- public final void lock(final LockMode mode)
- {
- switch (mode)
- {
+ public final void lock(final LockMode mode) {
+ switch (mode) {
case READ:
beginRead(false);
break;
@@ -594,18 +489,15 @@
}
/**
- * {@inheritDoc} This implementation delegates to {@code endRead()} or
- * {@code endWrite()}, depending on the {@code LockMode} argument.
- * Subclasses can override these protected methods to perform additional
- * steps when a configuration's lock is released.
+ * {@inheritDoc} This implementation delegates to {@code endRead()} or {@code endWrite()}, depending on the
+ * {@code LockMode} argument. Subclasses can override these protected methods to perform additional steps when a
+ * configuration's lock is released.
*
* @throws NullPointerException if the argument is null
*/
@Override
- public final void unlock(final LockMode mode)
- {
- switch (mode)
- {
+ public final void unlock(final LockMode mode) {
+ switch (mode) {
case READ:
endRead();
break;
@@ -618,114 +510,91 @@
}
/**
- * Notifies this configuration's {@link Synchronizer} that a read operation
- * is about to start. This method is called by all methods which access this
- * configuration in a read-only mode. Subclasses may override it to perform
- * additional actions before this read operation. The boolean
- * optimize argument can be evaluated by overridden methods in
- * derived classes. Some operations which require a lock do not need a fully
- * initialized configuration object. By setting this flag to
- * true, such operations can give a corresponding hint. An
- * overridden implementation of {@code beginRead()} can then decide to skip
- * some initialization steps. All basic operations in this class (and most
- * of the basic {@code Configuration} implementations) call this method with
- * a parameter value of false. In any case the
- * inherited method must be called! Otherwise, proper synchronization is not
- * guaranteed.
+ * Notifies this configuration's {@link Synchronizer} that a read operation is about to start. This method is called by
+ * all methods which access this configuration in a read-only mode. Subclasses may override it to perform additional
+ * actions before this read operation. The boolean optimize argument can be evaluated by overridden methods in
+ * derived classes. Some operations which require a lock do not need a fully initialized configuration object. By
+ * setting this flag to true, such operations can give a corresponding hint. An overridden
+ * implementation of {@code beginRead()} can then decide to skip some initialization steps. All basic operations in this
+ * class (and most of the basic {@code Configuration} implementations) call this method with a parameter value of
+ * false. In any case the inherited method must be called! Otherwise, proper synchronization is
+ * not guaranteed.
*
* @param optimize a flag whether optimization can be performed
* @since 2.0
*/
- protected void beginRead(final boolean optimize)
- {
+ protected void beginRead(final boolean optimize) {
getSynchronizer().beginRead();
}
/**
- * Notifies this configuration's {@link Synchronizer} that a read operation
- * has finished. This method is called by all methods which access this
- * configuration in a read-only manner at the end of their execution.
- * Subclasses may override it to perform additional actions after this read
- * operation. In any case the inherited method must be called!
+ * Notifies this configuration's {@link Synchronizer} that a read operation has finished. This method is called by all
+ * methods which access this configuration in a read-only manner at the end of their execution. Subclasses may override
+ * it to perform additional actions after this read operation. In any case the inherited method must be called!
* Otherwise, the read lock will not be released.
*
* @since 2.0
*/
- protected void endRead()
- {
+ protected void endRead() {
getSynchronizer().endRead();
}
/**
- * Notifies this configuration's {@link Synchronizer} that an update
- * operation is about to start. This method is called by all methods which
- * modify this configuration. Subclasses may override it to perform
- * additional operations before an update. For a description of the boolean
- * optimize argument refer to the documentation of
- * {@code beginRead()}. In any case the inherited method must be
- * called! Otherwise, proper synchronization is not guaranteed.
+ * Notifies this configuration's {@link Synchronizer} that an update operation is about to start. This method is called
+ * by all methods which modify this configuration. Subclasses may override it to perform additional operations before an
+ * update. For a description of the boolean optimize argument refer to the documentation of
+ * {@code beginRead()}. In any case the inherited method must be called! Otherwise, proper synchronization is
+ * not guaranteed.
*
* @param optimize a flag whether optimization can be performed
* @see #beginRead(boolean)
* @since 2.0
*/
- protected void beginWrite(final boolean optimize)
- {
+ protected void beginWrite(final boolean optimize) {
getSynchronizer().beginWrite();
}
/**
- * Notifies this configuration's {@link Synchronizer} that an update
- * operation has finished. This method is called by all methods which modify
- * this configuration at the end of their execution. Subclasses may override
- * it to perform additional operations after an update. In any case
- * the inherited method must be called! Otherwise, the write lock will not
- * be released.
+ * Notifies this configuration's {@link Synchronizer} that an update operation has finished. This method is called by
+ * all methods which modify this configuration at the end of their execution. Subclasses may override it to perform
+ * additional operations after an update. In any case the inherited method must be called! Otherwise, the write
+ * lock will not be released.
*
* @since 2.0
*/
- protected void endWrite()
- {
+ protected void endWrite() {
getSynchronizer().endWrite();
}
@Override
- public final void addProperty(final String key, final Object value)
- {
+ public final void addProperty(final String key, final Object value) {
beginWrite(false);
- try
- {
+ try {
fireEvent(ConfigurationEvent.ADD_PROPERTY, key, value, true);
addPropertyInternal(key, value);
fireEvent(ConfigurationEvent.ADD_PROPERTY, key, value, false);
- }
- finally
- {
+ } finally {
endWrite();
}
}
/**
- * Actually adds a property to this configuration. This method is called by
- * {@code addProperty()}. It performs list splitting if necessary and
- * delegates to {@link #addPropertyDirect(String, Object)} for every single
- * property value.
+ * Actually adds a property to this configuration. This method is called by {@code addProperty()}. It performs list
+ * splitting if necessary and delegates to {@link #addPropertyDirect(String, Object)} for every single property value.
*
* @param key the key of the property to be added
* @param value the new property value
* @since 2.0
*/
- protected void addPropertyInternal(final String key, final Object value)
- {
- for (final Object obj : getListDelimiterHandler().parse(value))
- {
+ protected void addPropertyInternal(final String key, final Object value) {
+ for (final Object obj : getListDelimiterHandler().parse(value)) {
addPropertyDirect(key, obj);
}
}
/**
- * Adds a key/value pair to the Configuration. Override this method to
- * provide write access to underlying Configuration store.
+ * Adds a key/value pair to the Configuration. Override this method to provide write access to underlying Configuration
+ * store.
*
* @param key key to use for mapping
* @param value object to store
@@ -739,222 +608,171 @@
*
* @return returns the key name with the ${key} substituted
*/
- protected String interpolate(final String base)
- {
+ protected String interpolate(final String base) {
final Object result = interpolate((Object) base);
return result == null ? null : result.toString();
}
/**
- * Returns the interpolated value. This implementation delegates to the
- * current {@code ConfigurationInterpolator}. If no
- * {@code ConfigurationInterpolator} is set, the passed in value is returned
- * without changes.
+ * Returns the interpolated value. This implementation delegates to the current {@code ConfigurationInterpolator}. If no
+ * {@code ConfigurationInterpolator} is set, the passed in value is returned without changes.
*
* @param value the value to interpolate
* @return the value with variables substituted
*/
- protected Object interpolate(final Object value)
- {
+ protected Object interpolate(final Object value) {
final ConfigurationInterpolator ci = getInterpolator();
return ci != null ? ci.interpolate(value) : value;
}
@Override
- public Configuration subset(final String prefix)
- {
+ public Configuration subset(final String prefix) {
return new SubsetConfiguration(this, prefix, ".");
}
@Override
- public ImmutableConfiguration immutableSubset(final String prefix)
- {
+ public ImmutableConfiguration immutableSubset(final String prefix) {
return ConfigurationUtils.unmodifiableConfiguration(subset(prefix));
}
@Override
- public final void setProperty(final String key, final Object value)
- {
+ public final void setProperty(final String key, final Object value) {
beginWrite(false);
- try
- {
+ try {
fireEvent(ConfigurationEvent.SET_PROPERTY, key, value, true);
setPropertyInternal(key, value);
fireEvent(ConfigurationEvent.SET_PROPERTY, key, value, false);
- }
- finally
- {
+ } finally {
endWrite();
}
}
/**
- * Actually sets the value of a property. This method is called by
- * {@code setProperty()}. It provides a default implementation of this
- * functionality by clearing the specified key and delegating to
- * {@code addProperty()}. Subclasses should override this method if they can
- * provide a more efficient algorithm for setting a property value.
+ * Actually sets the value of a property. This method is called by {@code setProperty()}. It provides a default
+ * implementation of this functionality by clearing the specified key and delegating to {@code addProperty()}.
+ * Subclasses should override this method if they can provide a more efficient algorithm for setting a property value.
*
* @param key the property key
* @param value the new property value
* @since 2.0
*/
- protected void setPropertyInternal(final String key, final Object value)
- {
+ protected void setPropertyInternal(final String key, final Object value) {
setDetailEvents(false);
- try
- {
+ try {
clearProperty(key);
addProperty(key, value);
- }
- finally
- {
+ } finally {
setDetailEvents(true);
}
}
/**
- * Removes the specified property from this configuration. This
- * implementation performs some preparations and then delegates to
- * {@code clearPropertyDirect()}, which will do the real work.
+ * Removes the specified property from this configuration. This implementation performs some preparations and then
+ * delegates to {@code clearPropertyDirect()}, which will do the real work.
*
* @param key the key to be removed
*/
@Override
- public final void clearProperty(final String key)
- {
+ public final void clearProperty(final String key) {
beginWrite(false);
- try
- {
+ try {
fireEvent(ConfigurationEvent.CLEAR_PROPERTY, key, null, true);
clearPropertyDirect(key);
fireEvent(ConfigurationEvent.CLEAR_PROPERTY, key, null, false);
- }
- finally
- {
+ } finally {
endWrite();
}
}
/**
- * Removes the specified property from this configuration. This method is
- * called by {@code clearProperty()} after it has done some
- * preparations. It must be overridden in sub classes.
+ * Removes the specified property from this configuration. This method is called by {@code clearProperty()} after it has
+ * done some preparations. It must be overridden in sub classes.
*
* @param key the key to be removed
*/
protected abstract void clearPropertyDirect(String key);
@Override
- public final void clear()
- {
+ public final void clear() {
beginWrite(false);
- try
- {
+ try {
fireEvent(ConfigurationEvent.CLEAR, null, null, true);
clearInternal();
fireEvent(ConfigurationEvent.CLEAR, null, null, false);
- }
- finally
- {
+ } finally {
endWrite();
}
}
/**
- * Clears the whole configuration. This method is called by {@code clear()}
- * after some preparations have been made. This base implementation uses
- * the iterator provided by {@code getKeys()} to remove every single
- * property. Subclasses should override this method if there is a more
- * efficient way of clearing the configuration.
+ * Clears the whole configuration. This method is called by {@code clear()} after some preparations have been made. This
+ * base implementation uses the iterator provided by {@code getKeys()} to remove every single property. Subclasses
+ * should override this method if there is a more efficient way of clearing the configuration.
*/
- protected void clearInternal()
- {
+ protected void clearInternal() {
setDetailEvents(false);
boolean useIterator = true;
- try
- {
+ try {
final Iterator it = getKeys();
- while (it.hasNext())
- {
+ while (it.hasNext()) {
final String key = it.next();
- if (useIterator)
- {
- try
- {
+ if (useIterator) {
+ try {
it.remove();
- }
- catch (final UnsupportedOperationException usoex)
- {
+ } catch (final UnsupportedOperationException usoex) {
useIterator = false;
}
}
- if (useIterator && containsKey(key))
- {
+ if (useIterator && containsKey(key)) {
useIterator = false;
}
- if (!useIterator)
- {
+ if (!useIterator) {
// workaround for Iterators that do not remove the
// property
// on calling remove() or do not support remove() at all
clearProperty(key);
}
}
- }
- finally
- {
+ } finally {
setDetailEvents(true);
}
}
/**
- * {@inheritDoc} This implementation takes care of synchronization and then
- * delegates to {@code getKeysInternal()} for obtaining the actual iterator.
- * Note that depending on a concrete implementation, an iteration may fail
- * if the configuration is updated concurrently.
+ * {@inheritDoc} This implementation takes care of synchronization and then delegates to {@code getKeysInternal()} for
+ * obtaining the actual iterator. Note that depending on a concrete implementation, an iteration may fail if the
+ * configuration is updated concurrently.
*/
@Override
- public final Iterator getKeys()
- {
+ public final Iterator getKeys() {
beginRead(false);
- try
- {
+ try {
return getKeysInternal();
- }
- finally
- {
+ } finally {
endRead();
}
}
/**
- * {@inheritDoc} This implementation returns keys that either match the
- * prefix or start with the prefix followed by a dot ('.'). So the call
- * {@code getKeys("db");} will find the keys {@code db},
- * {@code db.user}, or {@code db.password}, but not the key
- * {@code dbdriver}.
+ * {@inheritDoc} This implementation returns keys that either match the prefix or start with the prefix followed by a
+ * dot ('.'). So the call {@code getKeys("db");} will find the keys {@code db}, {@code db.user}, or {@code db.password},
+ * but not the key {@code dbdriver}.
*/
@Override
- public final Iterator getKeys(final String prefix)
- {
+ public final Iterator getKeys(final String prefix) {
beginRead(false);
- try
- {
+ try {
return getKeysInternal(prefix);
- }
- finally
- {
+ } finally {
endRead();
}
}
/**
- * Actually creates an iterator for iterating over the keys in this
- * configuration. This method is called by {@code getKeys()}, it has to be
- * defined by concrete subclasses.
+ * Actually creates an iterator for iterating over the keys in this configuration. This method is called by
+ * {@code getKeys()}, it has to be defined by concrete subclasses.
*
* @return an {@code Iterator} with all property keys in this configuration
* @since 2.0
@@ -962,45 +780,36 @@
protected abstract Iterator getKeysInternal();
/**
- * Returns an {@code Iterator} with all property keys starting with the
- * specified prefix. This method is called by {@link #getKeys(String)}. It
- * is fully implemented by delegating to {@code getKeysInternal()} and
- * returning a special iterator which filters for the passed in prefix.
- * Subclasses can override it if they can provide a more efficient way to
- * iterate over specific keys only.
+ * Returns an {@code Iterator} with all property keys starting with the specified prefix. This method is called by
+ * {@link #getKeys(String)}. It is fully implemented by delegating to {@code getKeysInternal()} and returning a special
+ * iterator which filters for the passed in prefix. Subclasses can override it if they can provide a more efficient way
+ * to iterate over specific keys only.
*
* @param prefix the prefix for the keys to be taken into account
* @return an {@code Iterator} returning the filtered keys
* @since 2.0
*/
- protected Iterator getKeysInternal(final String prefix)
- {
+ protected Iterator getKeysInternal(final String prefix) {
return new PrefixedKeysIterator(getKeysInternal(), prefix);
}
/**
- * {@inheritDoc} This implementation ensures proper synchronization.
- * Subclasses have to define the abstract {@code getPropertyInternal()}
- * method which is called from here.
+ * {@inheritDoc} This implementation ensures proper synchronization. Subclasses have to define the abstract
+ * {@code getPropertyInternal()} method which is called from here.
*/
@Override
- public final Object getProperty(final String key)
- {
+ public final Object getProperty(final String key) {
beginRead(false);
- try
- {
+ try {
return getPropertyInternal(key);
- }
- finally
- {
+ } finally {
endRead();
}
}
/**
- * Actually obtains the value of the specified property. This method is
- * called by {@code getProperty()}. Concrete subclasses must define it to
- * fetch the value of the desired property.
+ * Actually obtains the value of the specified property. This method is called by {@code getProperty()}. Concrete
+ * subclasses must define it to fetch the value of the desired property.
*
* @param key the key of the property in question
* @return the (raw) value of this property
@@ -1009,103 +818,80 @@
protected abstract Object getPropertyInternal(String key);
/**
- * {@inheritDoc} This implementation handles synchronization and delegates
- * to {@code isEmptyInternal()}.
+ * {@inheritDoc} This implementation handles synchronization and delegates to {@code isEmptyInternal()}.
*/
@Override
- public final boolean isEmpty()
- {
+ public final boolean isEmpty() {
beginRead(false);
- try
- {
+ try {
return isEmptyInternal();
- }
- finally
- {
+ } finally {
endRead();
}
}
/**
- * Actually checks whether this configuration contains data. This method is
- * called by {@code isEmpty()}. It has to be defined by concrete subclasses.
+ * Actually checks whether this configuration contains data. This method is called by {@code isEmpty()}. It has to be
+ * defined by concrete subclasses.
*
- * @return true if this configuration contains no data, false
- * otherwise
+ * @return true if this configuration contains no data, false otherwise
* @since 2.0
*/
protected abstract boolean isEmptyInternal();
/**
- * {@inheritDoc} This implementation handles synchronization and delegates
- * to {@code sizeInternal()}.
+ * {@inheritDoc} This implementation handles synchronization and delegates to {@code sizeInternal()}.
*/
@Override
- public final int size()
- {
+ public final int size() {
beginRead(false);
- try
- {
+ try {
return sizeInternal();
- }
- finally
- {
+ } finally {
endRead();
}
}
/**
- * Actually calculates the size of this configuration. This method is called
- * by {@code size()} with a read lock held. The base implementation provided
- * here calculates the size based on the iterator returned by
- * {@code getKeys()}. Sub classes which can determine the size in a more
- * efficient way should override this method.
+ * Actually calculates the size of this configuration. This method is called by {@code size()} with a read lock held.
+ * The base implementation provided here calculates the size based on the iterator returned by {@code getKeys()}. Sub
+ * classes which can determine the size in a more efficient way should override this method.
*
* @return the size of this configuration (i.e. the number of keys)
*/
- protected int sizeInternal()
- {
+ protected int sizeInternal() {
int size = 0;
- for (final Iterator keyIt = getKeysInternal(); keyIt.hasNext(); size++)
- {
+ for (final Iterator keyIt = getKeysInternal(); keyIt.hasNext(); size++) {
keyIt.next();
}
return size;
}
/**
- * {@inheritDoc} This implementation handles synchronization and delegates
- * to {@code containsKeyInternal()}.
+ * {@inheritDoc} This implementation handles synchronization and delegates to {@code containsKeyInternal()}.
*/
@Override
- public final boolean containsKey(final String key)
- {
+ public final boolean containsKey(final String key) {
beginRead(false);
- try
- {
+ try {
return containsKeyInternal(key);
- }
- finally
- {
+ } finally {
endRead();
}
}
/**
- * Actually checks whether the specified key is contained in this
- * configuration. This method is called by {@code containsKey()}. It has to
- * be defined by concrete subclasses.
+ * Actually checks whether the specified key is contained in this configuration. This method is called by
+ * {@code containsKey()}. It has to be defined by concrete subclasses.
*
* @param key the key in question
- * @return true if this key is contained in this configuration,
- * false otherwise
+ * @return true if this key is contained in this configuration, false otherwise
* @since 2.0
*/
protected abstract boolean containsKeyInternal(String key);
@Override
- public Properties getProperties(final String key)
- {
+ public Properties getProperties(final String key) {
return getProperties(key, null);
}
@@ -1113,19 +899,15 @@
* Get a list of properties associated with the given configuration key.
*
* @param key The configuration key.
- * @param defaults Any default values for the returned
- * {@code Properties} object. Ignored if {@code null}.
+ * @param defaults Any default values for the returned {@code Properties} object. Ignored if {@code null}.
*
* @return The associated properties if key is found.
*
- * @throws ConversionException is thrown if the key maps to an object that
- * is not a String/List of Strings.
+ * @throws ConversionException is thrown if the key maps to an object that is not a String/List of Strings.
*
- * @throws IllegalArgumentException if one of the tokens is malformed (does
- * not contain an equals sign).
+ * @throws IllegalArgumentException if one of the tokens is malformed (does not contain an equals sign).
*/
- public Properties getProperties(final String key, final Properties defaults)
- {
+ public Properties getProperties(final String key, final Properties defaults) {
/*
* Grab an array of the tokens for this key.
*/
@@ -1135,23 +917,17 @@
* Each token is of the form 'key=value'.
*/
final Properties props = defaults == null ? new Properties() : new Properties(defaults);
- for (final String token : tokens)
- {
+ for (final String token : tokens) {
final int equalSign = token.indexOf('=');
- if (equalSign > 0)
- {
+ if (equalSign > 0) {
final String pkey = token.substring(0, equalSign).trim();
final String pvalue = token.substring(equalSign + 1).trim();
props.put(pkey, pvalue);
- }
- else if (tokens.length == 1 && "".equals(token))
- {
+ } else if (tokens.length == 1 && "".equals(token)) {
// Semantically equivalent to an empty Properties
// object.
break;
- }
- else
- {
+ } else {
throw new IllegalArgumentException('\'' + token + "' does not contain an equals sign");
}
}
@@ -1159,212 +935,191 @@
}
@Override
- public boolean getBoolean(final String key)
- {
+ public boolean getBoolean(final String key) {
final Boolean b = convert(Boolean.class, key, null, true);
return checkNonNullValue(key, b).booleanValue();
}
@Override
- public boolean getBoolean(final String key, final boolean defaultValue)
- {
+ public boolean getBoolean(final String key, final boolean defaultValue) {
return getBoolean(key, Boolean.valueOf(defaultValue)).booleanValue();
}
/**
- * Obtains the value of the specified key and tries to convert it into a
- * {@code Boolean} object. If the property has no value, the passed
- * in default value will be used.
+ * Obtains the value of the specified key and tries to convert it into a {@code Boolean} object. If the property has no
+ * value, the passed in default value will be used.
*
* @param key the key of the property
* @param defaultValue the default value
* @return the value of this key converted to a {@code Boolean}
- * @throws ConversionException if the value cannot be converted to a
- * {@code Boolean}
+ * @throws ConversionException if the value cannot be converted to a {@code Boolean}
*/
@Override
- public Boolean getBoolean(final String key, final Boolean defaultValue)
- {
+ public Boolean getBoolean(final String key, final Boolean defaultValue) {
return convert(Boolean.class, key, defaultValue, false);
}
@Override
- public byte getByte(final String key)
- {
+ public byte getByte(final String key) {
final Byte b = convert(Byte.class, key, null, true);
return checkNonNullValue(key, b).byteValue();
}
@Override
- public byte getByte(final String key, final byte defaultValue)
- {
+ public byte getByte(final String key, final byte defaultValue) {
return getByte(key, Byte.valueOf(defaultValue)).byteValue();
}
@Override
- public Byte getByte(final String key, final Byte defaultValue)
- {
+ public Byte getByte(final String key, final Byte defaultValue) {
return convert(Byte.class, key, defaultValue, false);
}
@Override
- public double getDouble(final String key)
- {
+ public double getDouble(final String key) {
final Double d = convert(Double.class, key, null, true);
return checkNonNullValue(key, d).doubleValue();
}
@Override
- public double getDouble(final String key, final double defaultValue)
- {
+ public double getDouble(final String key, final double defaultValue) {
return getDouble(key, Double.valueOf(defaultValue)).doubleValue();
}
@Override
- public Double getDouble(final String key, final Double defaultValue)
- {
+ public Double getDouble(final String key, final Double defaultValue) {
return convert(Double.class, key, defaultValue, false);
}
@Override
- public float getFloat(final String key)
- {
+ public Duration getDuration(final String key) {
+ return checkNonNullValue(key, convert(Duration.class, key, null, true));
+ }
+
+ @Override
+ public Duration getDuration(final String key, final Duration defaultValue) {
+ return convert(Duration.class, key, defaultValue, false);
+ }
+
+ @Override
+ public float getFloat(final String key) {
final Float f = convert(Float.class, key, null, true);
return checkNonNullValue(key, f).floatValue();
}
@Override
- public float getFloat(final String key, final float defaultValue)
- {
+ public float getFloat(final String key, final float defaultValue) {
return getFloat(key, Float.valueOf(defaultValue)).floatValue();
}
@Override
- public Float getFloat(final String key, final Float defaultValue)
- {
+ public Float getFloat(final String key, final Float defaultValue) {
return convert(Float.class, key, defaultValue, false);
}
@Override
- public int getInt(final String key)
- {
+ public int getInt(final String key) {
final Integer i = convert(Integer.class, key, null, true);
return checkNonNullValue(key, i).intValue();
}
@Override
- public int getInt(final String key, final int defaultValue)
- {
+ public int getInt(final String key, final int defaultValue) {
return getInteger(key, Integer.valueOf(defaultValue)).intValue();
}
@Override
- public Integer getInteger(final String key, final Integer defaultValue)
- {
+ public Integer getInteger(final String key, final Integer defaultValue) {
return convert(Integer.class, key, defaultValue, false);
}
@Override
- public long getLong(final String key)
- {
+ public long getLong(final String key) {
final Long l = convert(Long.class, key, null, true);
return checkNonNullValue(key, l).longValue();
}
@Override
- public long getLong(final String key, final long defaultValue)
- {
+ public long getLong(final String key, final long defaultValue) {
return getLong(key, Long.valueOf(defaultValue)).longValue();
}
@Override
- public Long getLong(final String key, final Long defaultValue)
- {
+ public Long getLong(final String key, final Long defaultValue) {
return convert(Long.class, key, defaultValue, false);
}
@Override
- public short getShort(final String key)
- {
+ public short getShort(final String key) {
final Short s = convert(Short.class, key, null, true);
return checkNonNullValue(key, s).shortValue();
}
@Override
- public short getShort(final String key, final short defaultValue)
- {
+ public short getShort(final String key, final short defaultValue) {
return getShort(key, Short.valueOf(defaultValue)).shortValue();
}
@Override
- public Short getShort(final String key, final Short defaultValue)
- {
+ public Short getShort(final String key, final Short defaultValue) {
return convert(Short.class, key, defaultValue, false);
}
/**
* {@inheritDoc}
+ *
* @see #setThrowExceptionOnMissing(boolean)
*/
@Override
- public BigDecimal getBigDecimal(final String key)
- {
+ public BigDecimal getBigDecimal(final String key) {
return convert(BigDecimal.class, key, null, true);
}
@Override
- public BigDecimal getBigDecimal(final String key, final BigDecimal defaultValue)
- {
+ public BigDecimal getBigDecimal(final String key, final BigDecimal defaultValue) {
return convert(BigDecimal.class, key, defaultValue, false);
}
/**
* {@inheritDoc}
+ *
* @see #setThrowExceptionOnMissing(boolean)
*/
@Override
- public BigInteger getBigInteger(final String key)
- {
+ public BigInteger getBigInteger(final String key) {
return convert(BigInteger.class, key, null, true);
}
@Override
- public BigInteger getBigInteger(final String key, final BigInteger defaultValue)
- {
+ public BigInteger getBigInteger(final String key, final BigInteger defaultValue) {
return convert(BigInteger.class, key, defaultValue, false);
}
/**
* {@inheritDoc}
+ *
* @see #setThrowExceptionOnMissing(boolean)
*/
@Override
- public String getString(final String key)
- {
+ public String getString(final String key) {
return convert(String.class, key, null, true);
}
@Override
- public String getString(final String key, final String defaultValue)
- {
+ public String getString(final String key, final String defaultValue) {
final String result = convert(String.class, key, null, false);
return result != null ? result : interpolate(defaultValue);
}
/**
- * {@inheritDoc} This implementation delegates to {@link #getString(String)}
- * in order to obtain the value of the passed in key. This value is passed
- * to the decoder. Because {@code getString()} is used behind the scenes all
- * standard features like handling of missing keys and interpolation work as
- * expected.
+ * {@inheritDoc} This implementation delegates to {@link #getString(String)} in order to obtain the value of the passed
+ * in key. This value is passed to the decoder. Because {@code getString()} is used behind the scenes all standard
+ * features like handling of missing keys and interpolation work as expected.
*/
@Override
- public String getEncodedString(final String key, final ConfigurationDecoder decoder)
- {
- if (decoder == null)
- {
- throw new IllegalArgumentException(
- "ConfigurationDecoder must not be null!");
+ public String getEncodedString(final String key, final ConfigurationDecoder decoder) {
+ if (decoder == null) {
+ throw new IllegalArgumentException("ConfigurationDecoder must not be null!");
}
final String value = getString(key);
@@ -1372,311 +1127,233 @@
}
/**
- * {@inheritDoc} This implementation makes use of the
- * {@code ConfigurationDecoder} set for this configuration. If no such
- * object has been set, an {@code IllegalStateException} exception is
- * thrown.
+ * {@inheritDoc} This implementation makes use of the {@code ConfigurationDecoder} set for this configuration. If no
+ * such object has been set, an {@code IllegalStateException} exception is thrown.
*
* @throws IllegalStateException if no {@code ConfigurationDecoder} is set
* @see #setConfigurationDecoder(ConfigurationDecoder)
*/
@Override
- public String getEncodedString(final String key)
- {
+ public String getEncodedString(final String key) {
final ConfigurationDecoder decoder = getConfigurationDecoder();
- if (decoder == null)
- {
- throw new IllegalStateException(
- "No default ConfigurationDecoder defined!");
+ if (decoder == null) {
+ throw new IllegalStateException("No default ConfigurationDecoder defined!");
}
return getEncodedString(key, decoder);
}
/**
- * Get an array of strings associated with the given configuration key.
- * If the key doesn't map to an existing object, an empty array is returned.
- * When a property is added to a configuration, it is checked whether it
- * contains multiple values. This is obvious if the added object is a list
- * or an array. For strings the association {@link ListDelimiterHandler} is
- * consulted to find out whether the string can be split into multiple
- * values.
+ * Get an array of strings associated with the given configuration key. If the key doesn't map to an existing object, an
+ * empty array is returned. When a property is added to a configuration, it is checked whether it contains multiple
+ * values. This is obvious if the added object is a list or an array. For strings the association
+ * {@link ListDelimiterHandler} is consulted to find out whether the string can be split into multiple values.
*
* @param key The configuration key.
* @return The associated string array if key is found.
*
- * @throws ConversionException is thrown if the key maps to an
- * object that is not a String/List of Strings.
+ * @throws ConversionException is thrown if the key maps to an object that is not a String/List of Strings.
* @see #setListDelimiterHandler(ListDelimiterHandler)
*/
@Override
- public String[] getStringArray(final String key)
- {
+ public String[] getStringArray(final String key) {
final String[] result = (String[]) getArray(String.class, key);
- return result == null ? new String[0] : result;
+ return result == null ? ArrayUtils.EMPTY_STRING_ARRAY : result;
}
/**
* {@inheritDoc}
+ *
* @see #getStringArray(String)
*/
@Override
- public List
*
- * This base class offers functionality related to YAML-like data structures
- * based on maps. Such a map has strings as keys and arbitrary objects as
- * values. The class offers methods to transform such a map into a hierarchy
- * of {@link ImmutableNode} objects and vice versa.
+ * This base class offers functionality related to YAML-like data structures based on maps. Such a map has strings as
+ * keys and arbitrary objects as values. The class offers methods to transform such a map into a hierarchy of
+ * {@link ImmutableNode} objects and vice versa.
*
*
* @since 2.2
*/
-public class AbstractYAMLBasedConfiguration extends BaseHierarchicalConfiguration
-{
+public class AbstractYAMLBasedConfiguration extends BaseHierarchicalConfiguration {
/**
* Creates a new instance of {@code AbstractYAMLBasedConfiguration}.
*/
- protected AbstractYAMLBasedConfiguration()
- {
+ protected AbstractYAMLBasedConfiguration() {
initLogger(new ConfigurationLogger(getClass()));
}
/**
- * Creates a new instance of {@code AbstractYAMLBasedConfiguration} as a
- * copy of the specified configuration.
+ * Creates a new instance of {@code AbstractYAMLBasedConfiguration} as a copy of the specified configuration.
*
* @param c the configuration to be copied
*/
- protected AbstractYAMLBasedConfiguration(
- final HierarchicalConfiguration c)
- {
+ protected AbstractYAMLBasedConfiguration(final HierarchicalConfiguration c) {
super(c);
initLogger(new ConfigurationLogger(getClass()));
}
/**
- * Loads this configuration from the content of the specified map. The data
- * in the map is transformed into a hierarchy of {@link ImmutableNode}
- * objects.
+ * Loads this configuration from the content of the specified map. The data in the map is transformed into a hierarchy
+ * of {@link ImmutableNode} objects.
*
* @param map the map to be processed
*/
- protected void load(final Map map)
- {
+ protected void load(final Map map) {
final List roots = constructHierarchy("", map);
getNodeModel().setRootNode(roots.get(0));
}
/**
- * Constructs a YAML map, i.e. String -> Object from a given configuration
- * node.
+ * Constructs a YAML map, i.e. String -> Object from a given configuration node.
*
* @param node The configuration node to create a map from.
* @return A Map that contains the configuration node information.
*/
- protected Map constructMap(final ImmutableNode node)
- {
+ protected Map constructMap(final ImmutableNode node) {
final Map map = new HashMap<>(node.getChildren().size());
- for (final ImmutableNode cNode : node.getChildren())
- {
- final Object value = cNode.getChildren().isEmpty() ? cNode.getValue()
- : constructMap(cNode);
+ for (final ImmutableNode cNode : node) {
+ final Object value = cNode.getChildren().isEmpty() ? cNode.getValue() : constructMap(cNode);
addEntry(map, cNode.getNodeName(), value);
}
return map;
}
/**
- * Adds a key value pair to a map, taking list structures into account. If a
- * key is added which is already present in the map, this method ensures
- * that a list is created.
+ * Adds a key value pair to a map, taking list structures into account. If a key is added which is already present in
+ * the map, this method ensures that a list is created.
*
* @param map the map
* @param key the key
* @param value the value
*/
- private static void addEntry(final Map map, final String key,
- final Object value)
- {
+ private static void addEntry(final Map map, final String key, final Object value) {
final Object oldValue = map.get(key);
- if (oldValue == null)
- {
+ if (oldValue == null) {
map.put(key, value);
- }
- else if (oldValue instanceof Collection)
- {
+ } else if (oldValue instanceof Collection) {
// safe case because the collection was created by ourselves
@SuppressWarnings("unchecked")
- final
- Collection values = (Collection) oldValue;
+ final Collection values = (Collection) oldValue;
values.add(value);
- }
- else
- {
+ } else {
final Collection values = new ArrayList<>();
values.add(oldValue);
values.add(value);
@@ -131,50 +110,35 @@
}
/**
- * Creates a part of the hierarchical nodes structure of the resulting
- * configuration. The passed in element is converted into one or multiple
- * configuration nodes. (If list structures are involved, multiple nodes are
- * returned.)
+ * Creates a part of the hierarchical nodes structure of the resulting configuration. The passed in element is converted
+ * into one or multiple configuration nodes. (If list structures are involved, multiple nodes are returned.)
*
* @param key the key of the new node(s)
* @param elem the element to be processed
* @return a list with configuration nodes representing the element
*/
- private static List constructHierarchy(final String key,
- final Object elem)
- {
- if (elem instanceof Map)
- {
+ private static List constructHierarchy(final String key, final Object elem) {
+ if (elem instanceof Map) {
return parseMap((Map) elem, key);
}
- else if (elem instanceof Collection)
- {
+ if (elem instanceof Collection) {
return parseCollection((Collection) elem, key);
}
- else
- {
- return Collections.singletonList(
- new ImmutableNode.Builder().name(key).value(elem).create());
- }
+ return Collections.singletonList(new ImmutableNode.Builder().name(key).value(elem).create());
}
/**
- * Parses a map structure. The single keys of the map are processed
- * recursively.
+ * Parses a map structure. The single keys of the map are processed recursively.
*
* @param map the map to be processed
* @param key the key under which this map is to be stored
* @return a node representing this map
*/
- private static List parseMap(final Map map, final String key)
- {
+ private static List parseMap(final Map map, final String key) {
final ImmutableNode.Builder subtree = new ImmutableNode.Builder().name(key);
- for (final Map.Entry entry : map.entrySet())
- {
- final List children =
- constructHierarchy(entry.getKey(), entry.getValue());
- for (final ImmutableNode child : children)
- {
+ for (final Map.Entry entry : map.entrySet()) {
+ final List children = constructHierarchy(entry.getKey(), entry.getValue());
+ for (final ImmutableNode child : children) {
subtree.addChild(child);
}
}
@@ -182,36 +146,30 @@
}
/**
- * Parses a collection structure. The elements of the collection are
- * processed recursively.
+ * Parses a collection structure. The elements of the collection are processed recursively.
*
* @param col the collection to be processed
* @param key the key under which this collection is to be stored
* @return a node representing this collection
*/
- private static List parseCollection(final Collection col, final String key)
- {
+ private static List parseCollection(final Collection col, final String key) {
final List nodes = new ArrayList<>(col.size());
- for (final Object elem : col)
- {
+ for (final Object elem : col) {
nodes.addAll(constructHierarchy(key, elem));
}
return nodes;
}
/**
- * Internal helper method to wrap an exception in a
- * {@code ConfigurationException}.
+ * Internal helper method to wrap an exception in a {@code ConfigurationException}.
+ *
* @param e the exception to be wrapped
* @throws ConfigurationException the resulting exception
*/
- static void rethrowException(final Exception e) throws ConfigurationException
- {
- if (e instanceof ClassCastException)
- {
+ static void rethrowException(final Exception e) throws ConfigurationException {
+ if (e instanceof ClassCastException) {
throw new ConfigurationException("Error parsing", e);
}
- throw new ConfigurationException("Unable to load the configuration",
- e);
+ throw new ConfigurationException("Unable to load the configuration", e);
}
}
diff -Nru commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java
--- commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java 2020-03-07 18:57:27.000000000 +0000
+++ commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java 2022-03-31 14:41:23.000000000 +0000
@@ -27,47 +27,36 @@
import org.apache.commons.configuration2.ex.ConfigurationRuntimeException;
/**
- * Basic configuration class. Stores the configuration data but does not
- * provide any load or save functions. If you want to load your Configuration
- * from a file use PropertiesConfiguration or XmlConfiguration.
+ * Basic configuration class. Stores the configuration data but does not provide any load or save functions. If you want
+ * to load your Configuration from a file use PropertiesConfiguration or XmlConfiguration.
*
- * This class extends normal Java properties by adding the possibility
- * to use the same key many times concatenating the value strings
- * instead of overwriting them.
+ * This class extends normal Java properties by adding the possibility to use the same key many times concatenating the
+ * value strings instead of overwriting them.
*
*/
-public class BaseConfiguration extends AbstractConfiguration implements Cloneable
-{
+public class BaseConfiguration extends AbstractConfiguration implements Cloneable {
/** stores the configuration key-value pairs */
private Map store = new LinkedHashMap<>();
/**
- * Adds a key/value pair to the map. This routine does no magic morphing.
- * It ensures the keylist is maintained
+ * Adds a key/value pair to the map. This routine does no magic morphing. It ensures the keylist is maintained
*
* @param key key to use for mapping
* @param value object to store
*/
@Override
- protected void addPropertyDirect(final String key, final Object value)
- {
+ protected void addPropertyDirect(final String key, final Object value) {
final Object previousValue = getPropertyInternal(key);
- if (previousValue == null)
- {
+ if (previousValue == null) {
store.put(key, value);
- }
- else if (previousValue instanceof List)
- {
+ } else if (previousValue instanceof List) {
// safe to case because we have created the lists ourselves
@SuppressWarnings("unchecked")
- final
- List valueList = (List) previousValue;
+ final List valueList = (List) previousValue;
// the value is added to the existing list
valueList.add(value);
- }
- else
- {
+ } else {
// the previous value is replaced by a list containing the previous value and the new value
final List list = new ArrayList<>();
list.add(previousValue);
@@ -85,20 +74,17 @@
* @return object associated with the given configuration key.
*/
@Override
- protected Object getPropertyInternal(final String key)
- {
+ protected Object getPropertyInternal(final String key) {
return store.get(key);
}
/**
* Check if the configuration is empty
*
- * @return {@code true} if Configuration is empty,
- * {@code false} otherwise.
+ * @return {@code true} if Configuration is empty, {@code false} otherwise.
*/
@Override
- protected boolean isEmptyInternal()
- {
+ protected boolean isEmptyInternal() {
return store.isEmpty();
}
@@ -107,12 +93,10 @@
*
* @param key the configuration key
*
- * @return {@code true} if Configuration contain given key,
- * {@code false} otherwise.
+ * @return {@code true} if Configuration contain given key, {@code false} otherwise.
*/
@Override
- protected boolean containsKeyInternal(final String key)
- {
+ protected boolean containsKeyInternal(final String key) {
return store.containsKey(key);
}
@@ -122,60 +106,50 @@
* @param key the key to remove along with corresponding value.
*/
@Override
- protected void clearPropertyDirect(final String key)
- {
+ protected void clearPropertyDirect(final String key) {
store.remove(key);
}
@Override
- protected void clearInternal()
- {
+ protected void clearInternal() {
store.clear();
}
/**
- * {@inheritDoc} This implementation obtains the size directly from the map
- * used as data store. So this is a rather efficient implementation.
+ * {@inheritDoc} This implementation obtains the size directly from the map used as data store. So this is a rather
+ * efficient implementation.
*/
@Override
- protected int sizeInternal()
- {
+ protected int sizeInternal() {
return store.size();
}
/**
- * Get the list of the keys contained in the configuration
- * repository.
+ * Get the list of the keys contained in the configuration repository.
*
* @return An Iterator.
*/
@Override
- protected Iterator getKeysInternal()
- {
+ protected Iterator getKeysInternal() {
return store.keySet().iterator();
}
/**
- * Creates a copy of this object. This implementation will create a deep
- * clone, i.e. the map that stores the properties is cloned, too. So changes
- * performed at the copy won't affect the original and vice versa.
+ * Creates a copy of this object. This implementation will create a deep clone, i.e. the map that stores the properties
+ * is cloned, too. So changes performed at the copy won't affect the original and vice versa.
*
* @return the copy
* @since 1.3
*/
@Override
- public Object clone()
- {
- try
- {
+ public Object clone() {
+ try {
final BaseConfiguration copy = (BaseConfiguration) super.clone();
cloneStore(copy);
copy.cloneInterpolator(this);
return copy;
- }
- catch (final CloneNotSupportedException cex)
- {
+ } catch (final CloneNotSupportedException cex) {
// should not happen
throw new ConfigurationRuntimeException(cex);
}
@@ -187,24 +161,18 @@
* @param copy the copy created by the {@code clone()} method
* @throws CloneNotSupportedException if the map cannot be cloned
*/
- private void cloneStore(final BaseConfiguration copy)
- throws CloneNotSupportedException
- {
+ private void cloneStore(final BaseConfiguration copy) throws CloneNotSupportedException {
// This is safe because the type of the map is known
@SuppressWarnings("unchecked")
- final
- Map clonedStore = (Map) ConfigurationUtils.clone(store);
+ final Map clonedStore = (Map) ConfigurationUtils.clone(store);
copy.store = clonedStore;
// Handle collections in the map; they have to be cloned, too
- for (final Map.Entry e : store.entrySet())
- {
- if (e.getValue() instanceof Collection)
- {
+ for (final Map.Entry e : store.entrySet()) {
+ if (e.getValue() instanceof Collection) {
// This is safe because the collections were created by ourselves
@SuppressWarnings("unchecked")
- final
- Collection strList = (Collection) e.getValue();
+ final Collection strList = (Collection) e.getValue();
copy.store.put(e.getKey(), new ArrayList<>(strList));
}
}
diff -Nru commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/BaseConfigurationXMLReader.java commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseConfigurationXMLReader.java
--- commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/BaseConfigurationXMLReader.java 2020-03-07 18:57:27.000000000 +0000
+++ commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseConfigurationXMLReader.java 2022-03-31 14:41:23.000000000 +0000
@@ -18,35 +18,33 @@
package org.apache.commons.configuration2;
/**
- *
A specialized SAX2 XML parser that processes configuration objects.
+ *
+ * A specialized SAX2 XML parser that processes configuration objects.
+ *
*
- *
This class mimics to be a SAX compliant XML parser. It is able to iterate
- * over the keys in a configuration object and to generate corresponding SAX
- * events. By registering a {@code ContentHandler} at an instance
- * it is possible to perform XML processing on a configuration object.
+ *
+ * This class mimics to be a SAX compliant XML parser. It is able to iterate over the keys in a configuration object and
+ * to generate corresponding SAX events. By registering a {@code ContentHandler} at an instance it is possible to
+ * perform XML processing on a configuration object.
+ *
*
*/
-public class BaseConfigurationXMLReader extends ConfigurationXMLReader
-{
- /** Stores the actual configuration.*/
+public class BaseConfigurationXMLReader extends ConfigurationXMLReader {
+ /** Stores the actual configuration. */
private Configuration config;
/**
* Creates a new instance of {@code BaseConfigurationXMLReader}.
*/
- public BaseConfigurationXMLReader()
- {
- super();
+ public BaseConfigurationXMLReader() {
}
/**
- * Creates a new instance of {@code BaseConfigurationXMLReader} and
- * sets the configuration object to be parsed.
+ * Creates a new instance of {@code BaseConfigurationXMLReader} and sets the configuration object to be parsed.
*
* @param conf the configuration to be parsed
*/
- public BaseConfigurationXMLReader(final Configuration conf)
- {
+ public BaseConfigurationXMLReader(final Configuration conf) {
this();
setConfiguration(conf);
}
@@ -56,8 +54,7 @@
*
* @return the actual configuration
*/
- public Configuration getConfiguration()
- {
+ public Configuration getConfiguration() {
return config;
}
@@ -66,8 +63,7 @@
*
* @param conf the configuration
*/
- public void setConfiguration(final Configuration conf)
- {
+ public void setConfiguration(final Configuration conf) {
config = conf;
}
@@ -77,32 +73,26 @@
* @return the actual configuration
*/
@Override
- public Configuration getParsedConfiguration()
- {
+ public Configuration getParsedConfiguration() {
return getConfiguration();
}
/**
- * The main SAX event generation method. This element uses an internal
- * {@code HierarchicalConfigurationConverter} object to iterate over
- * all keys in the actual configuration and to generate corresponding SAX
- * events.
+ * The main SAX event generation method. This element uses an internal {@code HierarchicalConfigurationConverter} object
+ * to iterate over all keys in the actual configuration and to generate corresponding SAX events.
*/
@Override
- protected void processKeys()
- {
+ protected void processKeys() {
fireElementStart(getRootName(), null);
new SAXConverter().process(getConfiguration());
fireElementEnd(getRootName());
}
/**
- * An internally used helper class to iterate over all configuration keys
- * ant to generate corresponding SAX events.
+ * An internally used helper class to iterate over all configuration keys ant to generate corresponding SAX events.
*
*/
- class SAXConverter extends HierarchicalConfigurationConverter
- {
+ class SAXConverter extends HierarchicalConfigurationConverter {
/**
* Callback for the start of an element.
*
@@ -110,11 +100,9 @@
* @param value the element value
*/
@Override
- protected void elementStart(final String name, final Object value)
- {
+ protected void elementStart(final String name, final Object value) {
fireElementStart(name, null);
- if (value != null)
- {
+ if (value != null) {
fireCharacters(value.toString());
}
}
@@ -125,8 +113,7 @@
* @param name the element name
*/
@Override
- protected void elementEnd(final String name)
- {
+ protected void elementEnd(final String name) {
fireElementEnd(name);
}
}
diff -Nru commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java
--- commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java 2020-03-07 18:57:27.000000000 +0000
+++ commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java 2022-03-31 14:41:23.000000000 +0000
@@ -45,151 +45,118 @@
/**
*
- * A specialized hierarchical configuration implementation that is based on a
- * structure of {@link ImmutableNode} objects.
+ * A specialized hierarchical configuration implementation that is based on a structure of {@link ImmutableNode}
+ * objects.
*
*
*/
-public class BaseHierarchicalConfiguration extends AbstractHierarchicalConfiguration
- implements InMemoryNodeModelSupport
-{
+public class BaseHierarchicalConfiguration extends AbstractHierarchicalConfiguration implements InMemoryNodeModelSupport {
/** A listener for reacting on changes caused by sub configurations. */
private final EventListener changeListener;
/**
* Creates a new instance of {@code BaseHierarchicalConfiguration}.
*/
- public BaseHierarchicalConfiguration()
- {
+ public BaseHierarchicalConfiguration() {
this((HierarchicalConfiguration) null);
}
/**
- * Creates a new instance of {@code BaseHierarchicalConfiguration} and
- * copies all data contained in the specified configuration into the new
- * one.
+ * Creates a new instance of {@code BaseHierarchicalConfiguration} and copies all data contained in the specified
+ * configuration into the new one.
*
- * @param c the configuration that is to be copied (if null, this
- * constructor will behave like the standard constructor)
+ * @param c the configuration that is to be copied (if null, this constructor will behave like the standard
+ * constructor)
* @since 1.4
*/
- public BaseHierarchicalConfiguration(final HierarchicalConfiguration c)
- {
+ public BaseHierarchicalConfiguration(final HierarchicalConfiguration c) {
this(createNodeModel(c));
}
/**
- * Creates a new instance of {@code BaseHierarchicalConfiguration} and
- * initializes it with the given {@code NodeModel}.
+ * Creates a new instance of {@code BaseHierarchicalConfiguration} and initializes it with the given {@code NodeModel}.
*
* @param model the {@code NodeModel}
*/
- protected BaseHierarchicalConfiguration(final NodeModel model)
- {
+ protected BaseHierarchicalConfiguration(final NodeModel model) {
super(model);
changeListener = createChangeListener();
}
/**
- * {@inheritDoc} This implementation returns the {@code InMemoryNodeModel}
- * used by this configuration.
+ * {@inheritDoc} This implementation returns the {@code InMemoryNodeModel} used by this configuration.
*/
@Override
- public InMemoryNodeModel getNodeModel()
- {
+ public InMemoryNodeModel getNodeModel() {
return (InMemoryNodeModel) super.getNodeModel();
}
/**
- * Creates a new {@code Configuration} object containing all keys
- * that start with the specified prefix. This implementation will return a
- * {@code BaseHierarchicalConfiguration} object so that the structure of
- * the keys will be saved. The nodes selected by the prefix (it is possible
- * that multiple nodes are selected) are mapped to the root node of the
- * returned configuration, i.e. their children and attributes will become
- * children and attributes of the new root node. However, a value of the root
- * node is only set if exactly one of the selected nodes contain a value (if
- * multiple nodes have a value, there is simply no way to decide how these
- * values are merged together). Note that the returned
- * {@code Configuration} object is not connected to its source
- * configuration: updates on the source configuration are not reflected in
- * the subset and vice versa. The returned configuration uses the same
- * {@code Synchronizer} as this configuration.
+ * Creates a new {@code Configuration} object containing all keys that start with the specified prefix. This
+ * implementation will return a {@code BaseHierarchicalConfiguration} object so that the structure of the keys will be
+ * saved. The nodes selected by the prefix (it is possible that multiple nodes are selected) are mapped to the root node
+ * of the returned configuration, i.e. their children and attributes will become children and attributes of the new root
+ * node. However, a value of the root node is only set if exactly one of the selected nodes contain a value (if multiple
+ * nodes have a value, there is simply no way to decide how these values are merged together). Note that the returned
+ * {@code Configuration} object is not connected to its source configuration: updates on the source configuration are
+ * not reflected in the subset and vice versa. The returned configuration uses the same {@code Synchronizer} as this
+ * configuration.
*
* @param prefix the prefix of the keys for the subset
* @return a new configuration object representing the selected subset
*/
@Override
- public Configuration subset(final String prefix)
- {
+ public Configuration subset(final String prefix) {
beginRead(false);
- try
- {
+ try {
final List> results = fetchNodeList(prefix);
- if (results.isEmpty())
- {
+ if (results.isEmpty()) {
return new BaseHierarchicalConfiguration();
}
final BaseHierarchicalConfiguration parent = this;
- final BaseHierarchicalConfiguration result =
- new BaseHierarchicalConfiguration()
- {
- // Override interpolate to always interpolate on the parent
- @Override
- protected Object interpolate(final Object value)
- {
- return parent.interpolate(value);
- }
+ final BaseHierarchicalConfiguration result = new BaseHierarchicalConfiguration() {
+ // Override interpolate to always interpolate on the parent
+ @Override
+ protected Object interpolate(final Object value) {
+ return parent.interpolate(value);
+ }
- @Override
- public ConfigurationInterpolator getInterpolator()
- {
- return parent.getInterpolator();
- }
- };
+ @Override
+ public ConfigurationInterpolator getInterpolator() {
+ return parent.getInterpolator();
+ }
+ };
result.getModel().setRootNode(createSubsetRootNode(results));
- if (result.isEmpty())
- {
+ if (result.isEmpty()) {
return new BaseHierarchicalConfiguration();
}
result.setSynchronizer(getSynchronizer());
return result;
- }
- finally
- {
+ } finally {
endRead();
}
}
/**
- * Creates a root node for a subset configuration based on the passed in
- * query results. This method creates a new root node and adds the children
- * and attributes of all result nodes to it. If only a single node value is
- * defined, it is assigned as value of the new root node.
+ * Creates a root node for a subset configuration based on the passed in query results. This method creates a new root
+ * node and adds the children and attributes of all result nodes to it. If only a single node value is defined, it is
+ * assigned as value of the new root node.
*
* @param results the collection of query results
* @return the root node for the subset configuration
*/
- private ImmutableNode createSubsetRootNode(
- final Collection> results)
- {
+ private ImmutableNode createSubsetRootNode(final Collection> results) {
final ImmutableNode.Builder builder = new ImmutableNode.Builder();
Object value = null;
int valueCount = 0;
- for (final QueryResult result : results)
- {
- if (result.isAttributeResult())
- {
- builder.addAttribute(result.getAttributeName(),
- result.getAttributeValue(getModel().getNodeHandler()));
- }
- else
- {
- if (result.getNode().getValue() != null)
- {
+ for (final QueryResult result : results) {
+ if (result.isAttributeResult()) {
+ builder.addAttribute(result.getAttributeName(), result.getAttributeValue(getModel().getNodeHandler()));
+ } else {
+ if (result.getNode().getValue() != null) {
value = result.getNode().getValue();
valueCount++;
}
@@ -198,190 +165,142 @@
}
}
- if (valueCount == 1)
- {
+ if (valueCount == 1) {
builder.value(value);
}
return builder.create();
}
/**
- * {@inheritDoc} The result of this implementation depends on the
- * {@code supportUpdates} flag: If it is false, a plain
- * {@code BaseHierarchicalConfiguration} is returned using the selected node
- * as root node. This is suitable for read-only access to properties.
- * Because the configuration returned in this case is not connected to the
- * parent configuration, updates on properties made by one configuration are
- * not reflected by the other one. A value of true for this parameter
- * causes a tracked node to be created, and result is a
- * {@link SubnodeConfiguration} based on this tracked node. This
- * configuration is really connected to its parent, so that updated
- * properties are visible on both.
+ * {@inheritDoc} The result of this implementation depends on the {@code supportUpdates} flag: If it is false, a
+ * plain {@code BaseHierarchicalConfiguration} is returned using the selected node as root node. This is suitable for
+ * read-only access to properties. Because the configuration returned in this case is not connected to the parent
+ * configuration, updates on properties made by one configuration are not reflected by the other one. A value of
+ * true for this parameter causes a tracked node to be created, and result is a {@link SubnodeConfiguration}
+ * based on this tracked node. This configuration is really connected to its parent, so that updated properties are
+ * visible on both.
*
* @see SubnodeConfiguration
- * @throws ConfigurationRuntimeException if the key does not select a single
- * node
+ * @throws ConfigurationRuntimeException if the key does not select a single node
*/
@Override
- public HierarchicalConfiguration configurationAt(final String key,
- final boolean supportUpdates)
- {
+ public HierarchicalConfiguration configurationAt(final String key, final boolean supportUpdates) {
beginRead(false);
- try
- {
- return supportUpdates ? createConnectedSubConfiguration(key)
- : createIndependentSubConfiguration(key);
- }
- finally
- {
+ try {
+ return supportUpdates ? createConnectedSubConfiguration(key) : createIndependentSubConfiguration(key);
+ } finally {
endRead();
}
}
/**
- * Returns the {@code InMemoryNodeModel} to be used as parent model for a
- * new sub configuration. This method is called whenever a sub configuration
- * is to be created. This base implementation returns the model of this
- * configuration. Sub classes with different requirements for the parent
- * models of sub configurations have to override it.
+ * Returns the {@code InMemoryNodeModel} to be used as parent model for a new sub configuration. This method is called
+ * whenever a sub configuration is to be created. This base implementation returns the model of this configuration. Sub
+ * classes with different requirements for the parent models of sub configurations have to override it.
*
* @return the parent model for a new sub configuration
*/
- protected InMemoryNodeModel getSubConfigurationParentModel()
- {
+ protected InMemoryNodeModel getSubConfigurationParentModel() {
return (InMemoryNodeModel) getModel();
}
/**
- * Returns the {@code NodeSelector} to be used for a sub configuration based
- * on the passed in key. This method is called whenever a sub configuration
- * is to be created. This base implementation returns a new
- * {@code NodeSelector} initialized with the passed in key. Sub classes may
- * override this method if they have a different strategy for creating a
- * selector.
+ * Returns the {@code NodeSelector} to be used for a sub configuration based on the passed in key. This method is called
+ * whenever a sub configuration is to be created. This base implementation returns a new {@code NodeSelector}
+ * initialized with the passed in key. Sub classes may override this method if they have a different strategy for
+ * creating a selector.
*
* @param key the key of the sub configuration
* @return a {@code NodeSelector} for initializing a sub configuration
* @since 2.0
*/
- protected NodeSelector getSubConfigurationNodeSelector(final String key)
- {
+ protected NodeSelector getSubConfigurationNodeSelector(final String key) {
return new NodeSelector(key);
}
/**
- * Creates a connected sub configuration based on a selector for a tracked
- * node.
+ * Creates a connected sub configuration based on a selector for a tracked node.
*
* @param selector the {@code NodeSelector}
- * @param parentModelSupport the {@code InMemoryNodeModelSupport} object for
- * the parent node model
+ * @param parentModelSupport the {@code InMemoryNodeModelSupport} object for the parent node model
* @return the newly created sub configuration
* @since 2.0
*/
- protected SubnodeConfiguration createSubConfigurationForTrackedNode(
- final NodeSelector selector, final InMemoryNodeModelSupport parentModelSupport)
- {
- final SubnodeConfiguration subConfig =
- new SubnodeConfiguration(this, new TrackedNodeModel(
- parentModelSupport, selector, true));
+ protected SubnodeConfiguration createSubConfigurationForTrackedNode(final NodeSelector selector, final InMemoryNodeModelSupport parentModelSupport) {
+ final SubnodeConfiguration subConfig = new SubnodeConfiguration(this, new TrackedNodeModel(parentModelSupport, selector, true));
initSubConfigurationForThisParent(subConfig);
return subConfig;
}
/**
- * Initializes a {@code SubnodeConfiguration} object. This method should be
- * called for each sub configuration created for this configuration. It
- * ensures that the sub configuration is correctly connected to its parent
- * instance and that update events are correctly propagated.
+ * Initializes a {@code SubnodeConfiguration} object. This method should be called for each sub configuration created
+ * for this configuration. It ensures that the sub configuration is correctly connected to its parent instance and that
+ * update events are correctly propagated.
*
* @param subConfig the sub configuration to be initialized
* @since 2.0
*/
- protected void initSubConfigurationForThisParent(final SubnodeConfiguration subConfig)
- {
+ protected void initSubConfigurationForThisParent(final SubnodeConfiguration subConfig) {
initSubConfiguration(subConfig);
subConfig.addEventListener(ConfigurationEvent.ANY, changeListener);
}
/**
- * Creates a sub configuration from the specified key which is connected to
- * this configuration. This implementation creates a
- * {@link SubnodeConfiguration} with a tracked node identified by the passed
- * in key.
+ * Creates a sub configuration from the specified key which is connected to this configuration. This implementation
+ * creates a {@link SubnodeConfiguration} with a tracked node identified by the passed in key.
*
* @param key the key of the sub configuration
* @return the new sub configuration
*/
- private BaseHierarchicalConfiguration createConnectedSubConfiguration(
- final String key)
- {
+ private BaseHierarchicalConfiguration createConnectedSubConfiguration(final String key) {
final NodeSelector selector = getSubConfigurationNodeSelector(key);
getSubConfigurationParentModel().trackNode(selector, this);
return createSubConfigurationForTrackedNode(selector, this);
}
/**
- * Creates a list of connected sub configurations based on a passed in list
- * of node selectors.
+ * Creates a list of connected sub configurations based on a passed in list of node selectors.
*
* @param parentModelSupport the parent node model support object
* @param selectors the list of {@code NodeSelector} objects
* @return the list with sub configurations
*/
- private List> createConnectedSubConfigurations(
- final InMemoryNodeModelSupport parentModelSupport,
- final Collection selectors)
- {
- final List> configs =
- new ArrayList<>(
- selectors.size());
- for (final NodeSelector selector : selectors)
- {
- configs.add(createSubConfigurationForTrackedNode(selector,
- parentModelSupport));
+ private List> createConnectedSubConfigurations(final InMemoryNodeModelSupport parentModelSupport,
+ final Collection selectors) {
+ final List> configs = new ArrayList<>(selectors.size());
+ for (final NodeSelector selector : selectors) {
+ configs.add(createSubConfigurationForTrackedNode(selector, parentModelSupport));
}
return configs;
}
/**
- * Creates a sub configuration from the specified key which is independent
- * on this configuration. This means that the sub configuration operates on
- * a separate node model (although the nodes are initially shared).
+ * Creates a sub configuration from the specified key which is independent on this configuration. This means that the
+ * sub configuration operates on a separate node model (although the nodes are initially shared).
*
* @param key the key of the sub configuration
* @return the new sub configuration
*/
- private BaseHierarchicalConfiguration createIndependentSubConfiguration(
- final String key)
- {
+ private BaseHierarchicalConfiguration createIndependentSubConfiguration(final String key) {
final List targetNodes = fetchFilteredNodeResults(key);
final int size = targetNodes.size();
- if (size != 1)
- {
- throw new ConfigurationRuntimeException(
- "Passed in key must select exactly one node (found %,d): %s", size, key);
- }
- final BaseHierarchicalConfiguration sub =
- new BaseHierarchicalConfiguration(new InMemoryNodeModel(
- targetNodes.get(0)));
+ if (size != 1) {
+ throw new ConfigurationRuntimeException("Passed in key must select exactly one node (found %,d): %s", size, key);
+ }
+ final BaseHierarchicalConfiguration sub = new BaseHierarchicalConfiguration(new InMemoryNodeModel(targetNodes.get(0)));
initSubConfiguration(sub);
return sub;
}
/**
- * Returns an initialized sub configuration for this configuration that is
- * based on another {@code BaseHierarchicalConfiguration}. Thus, it is
- * independent from this configuration.
+ * Returns an initialized sub configuration for this configuration that is based on another
+ * {@code BaseHierarchicalConfiguration}. Thus, it is independent from this configuration.
*
* @param node the root node for the sub configuration
* @return the initialized sub configuration
*/
- private BaseHierarchicalConfiguration createIndependentSubConfigurationForNode(
- final ImmutableNode node)
- {
- final BaseHierarchicalConfiguration sub =
- new BaseHierarchicalConfiguration(new InMemoryNodeModel(node));
+ private BaseHierarchicalConfiguration createIndependentSubConfigurationForNode(final ImmutableNode node) {
+ final BaseHierarchicalConfiguration sub = new BaseHierarchicalConfiguration(new InMemoryNodeModel(node));
initSubConfiguration(sub);
return sub;
}
@@ -392,76 +311,59 @@
* @param key the key
* @return the filtered list with result nodes
*/
- private List fetchFilteredNodeResults(final String key)
- {
+ private List fetchFilteredNodeResults(final String key) {
final NodeHandler handler = getModel().getNodeHandler();
return resolveNodeKey(handler.getRootNode(), key, handler);
}
/**
- * {@inheritDoc} This implementation creates a {@code SubnodeConfiguration}
- * by delegating to {@code configurationAt()}. Then an immutable wrapper
- * is created and returned.
+ * {@inheritDoc} This implementation creates a {@code SubnodeConfiguration} by delegating to {@code configurationAt()}.
+ * Then an immutable wrapper is created and returned.
*/
@Override
- public ImmutableHierarchicalConfiguration immutableConfigurationAt(
- final String key, final boolean supportUpdates)
- {
- return ConfigurationUtils.unmodifiableConfiguration(configurationAt(
- key, supportUpdates));
+ public ImmutableHierarchicalConfiguration immutableConfigurationAt(final String key, final boolean supportUpdates) {
+ return ConfigurationUtils.unmodifiableConfiguration(configurationAt(key, supportUpdates));
}
/**
* {@inheritDoc} This is a short form for {@code configurationAt(key,
* false)}.
+ *
* @throws ConfigurationRuntimeException if the key does not select a single node
*/
@Override
- public HierarchicalConfiguration configurationAt(final String key)
- {
+ public HierarchicalConfiguration configurationAt(final String key) {
return configurationAt(key, false);
}
/**
- * {@inheritDoc} This implementation creates a {@code SubnodeConfiguration}
- * by delegating to {@code configurationAt()}. Then an immutable wrapper
- * is created and returned.
+ * {@inheritDoc} This implementation creates a {@code SubnodeConfiguration} by delegating to {@code configurationAt()}.
+ * Then an immutable wrapper is created and returned.
+ *
* @throws ConfigurationRuntimeException if the key does not select a single node
*/
@Override
- public ImmutableHierarchicalConfiguration immutableConfigurationAt(
- final String key)
- {
- return ConfigurationUtils.unmodifiableConfiguration(configurationAt(
- key));
+ public ImmutableHierarchicalConfiguration immutableConfigurationAt(final String key) {
+ return ConfigurationUtils.unmodifiableConfiguration(configurationAt(key));
}
/**
- * {@inheritDoc} This implementation creates sub configurations in the same
- * way as described for {@link #configurationAt(String)}.
+ * {@inheritDoc} This implementation creates sub configurations in the same way as described for
+ * {@link #configurationAt(String)}.
*/
@Override
- public List> configurationsAt(
- final String key)
- {
+ public List> configurationsAt(final String key) {
List nodes;
beginRead(false);
- try
- {
+ try {
nodes = fetchFilteredNodeResults(key);
- }
- finally
- {
+ } finally {
endRead();
}
- final List> results =
- new ArrayList<>(
- nodes.size());
- for (final ImmutableNode node : nodes)
- {
- final BaseHierarchicalConfiguration sub =
- createIndependentSubConfigurationForNode(node);
+ final List> results = new ArrayList<>(nodes.size());
+ for (final ImmutableNode node : nodes) {
+ final BaseHierarchicalConfiguration sub = createIndependentSubConfigurationForNode(node);
results.add(sub);
}
@@ -469,78 +371,57 @@
}
/**
- * {@inheritDoc} This implementation creates tracked nodes for the specified
- * key. Then sub configurations for these nodes are created and returned.
+ * {@inheritDoc} This implementation creates tracked nodes for the specified key. Then sub configurations for these
+ * nodes are created and returned.
*/
@Override
- public List> configurationsAt(
- final String key, final boolean supportUpdates)
- {
- if (!supportUpdates)
- {
+ public List> configurationsAt(final String key, final boolean supportUpdates) {
+ if (!supportUpdates) {
return configurationsAt(key);
}
InMemoryNodeModel parentModel;
beginRead(false);
- try
- {
+ try {
parentModel = getSubConfigurationParentModel();
- }
- finally
- {
+ } finally {
endRead();
}
- final Collection selectors =
- parentModel.selectAndTrackNodes(key, this);
+ final Collection selectors = parentModel.selectAndTrackNodes(key, this);
return createConnectedSubConfigurations(this, selectors);
}
/**
- * {@inheritDoc} This implementation first delegates to
- * {@code configurationsAt()} to create a list of
- * {@code SubnodeConfiguration} objects. Then for each element of this list
- * an unmodifiable wrapper is created.
+ * {@inheritDoc} This implementation first delegates to {@code configurationsAt()} to create a list of
+ * {@code SubnodeConfiguration} objects. Then for each element of this list an unmodifiable wrapper is created.
*/
@Override
- public List immutableConfigurationsAt(
- final String key)
- {
+ public List immutableConfigurationsAt(final String key) {
return toImmutable(configurationsAt(key));
}
/**
- * {@inheritDoc} This implementation resolves the node(s) selected by the
- * given key. If not a single node is selected, an empty list is returned.
- * Otherwise, sub configurations for each child of the node are created.
+ * {@inheritDoc} This implementation resolves the node(s) selected by the given key. If not a single node is selected,
+ * an empty list is returned. Otherwise, sub configurations for each child of the node are created.
*/
@Override
- public List> childConfigurationsAt(
- final String key)
- {
+ public List> childConfigurationsAt(final String key) {
List nodes;
beginRead(false);
- try
- {
+ try {
nodes = fetchFilteredNodeResults(key);
- }
- finally
- {
+ } finally {
endRead();
}
- if (nodes.size() != 1)
- {
+ if (nodes.size() != 1) {
return Collections.emptyList();
}
final ImmutableNode parent = nodes.get(0);
- final List> subs =
- new ArrayList<>(parent
- .getChildren().size());
- for (final ImmutableNode node : parent.getChildren())
- {
+ final List> subs = new ArrayList<>(parent.getChildren().size());
+ for (final ImmutableNode node : parent) {
subs.add(createIndependentSubConfigurationForNode(node));
}
@@ -548,61 +429,47 @@
}
/**
- * {@inheritDoc} This method works like
- * {@link #childConfigurationsAt(String)}; however, depending on the value
- * of the {@code supportUpdates} flag, connected sub configurations may be
- * created.
+ * {@inheritDoc} This method works like {@link #childConfigurationsAt(String)}; however, depending on the value of the
+ * {@code supportUpdates} flag, connected sub configurations may be created.
*/
@Override
- public List> childConfigurationsAt(
- final String key, final boolean supportUpdates)
- {
- if (!supportUpdates)
- {
+ public List> childConfigurationsAt(final String key, final boolean supportUpdates) {
+ if (!supportUpdates) {
return childConfigurationsAt(key);
}
final InMemoryNodeModel parentModel = getSubConfigurationParentModel();
- return createConnectedSubConfigurations(this,
- parentModel.trackChildNodes(key, this));
+ return createConnectedSubConfigurations(this, parentModel.trackChildNodes(key, this));
}
/**
- * {@inheritDoc} This implementation first delegates to
- * {@code childConfigurationsAt()} to create a list of mutable child
- * configurations. Then a list with immutable wrapper configurations is
- * created.
+ * {@inheritDoc} This implementation first delegates to {@code childConfigurationsAt()} to create a list of mutable
+ * child configurations. Then a list with immutable wrapper configurations is created.
*/
@Override
- public List immutableChildConfigurationsAt(
- final String key)
- {
+ public List immutableChildConfigurationsAt(final String key) {
return toImmutable(childConfigurationsAt(key));
}
/**
- * This method is always called when a subnode configuration created from
- * this configuration has been modified. This implementation transforms the
- * received event into an event of type {@code SUBNODE_CHANGED}
- * and notifies the registered listeners.
+ * This method is always called when a subnode configuration created from this configuration has been modified. This
+ * implementation transforms the received event into an event of type {@code SUBNODE_CHANGED} and notifies the
+ * registered listeners.
*
* @param event the event describing the change
* @since 1.5
*/
- protected void subnodeConfigurationChanged(final ConfigurationEvent event)
- {
+ protected void subnodeConfigurationChanged(final ConfigurationEvent event) {
fireEvent(ConfigurationEvent.SUBNODE_CHANGED, null, event, event.isBeforeUpdate());
}
/**
- * Initializes properties of a sub configuration. A sub configuration
- * inherits some settings from its parent, e.g. the expression engine or the
- * synchronizer. The corresponding values are copied by this method.
+ * Initializes properties of a sub configuration. A sub configuration inherits some settings from its parent, e.g. the
+ * expression engine or the synchronizer. The corresponding values are copied by this method.
*
* @param sub the sub configuration to be initialized
*/
- private void initSubConfiguration(final BaseHierarchicalConfiguration sub)
- {
+ private void initSubConfiguration(final BaseHierarchicalConfiguration sub) {
sub.setSynchronizer(getSynchronizer());
sub.setExpressionEngine(getExpressionEngine());
sub.setListDelimiterHandler(getListDelimiterHandler());
@@ -611,50 +478,41 @@
}
/**
- * Creates a listener which reacts on all changes on this configuration or
- * one of its {@code SubnodeConfiguration} instances. If such a change is
- * detected, some updates have to be performed.
+ * Creates a listener which reacts on all changes on this configuration or one of its {@code SubnodeConfiguration}
+ * instances. If such a change is detected, some updates have to be performed.
*
* @return the newly created change listener
*/
- private EventListener createChangeListener()
- {
- return event -> subnodeConfigurationChanged(event);
+ private EventListener createChangeListener() {
+ return this::subnodeConfigurationChanged;
}
/**
- * Returns a configuration with the same content as this configuration, but
- * with all variables replaced by their actual values. This implementation
- * is specific for hierarchical configurations. It clones the current
- * configuration and runs a specialized visitor on the clone, which performs
- * interpolation on the single configuration nodes.
+ * Returns a configuration with the same content as this configuration, but with all variables replaced by their actual
+ * values. This implementation is specific for hierarchical configurations. It clones the current configuration and runs
+ * a specialized visitor on the clone, which performs interpolation on the single configuration nodes.
*
* @return a configuration with all variables interpolated
* @since 1.5
*/
@Override
- public Configuration interpolatedConfiguration()
- {
+ public Configuration interpolatedConfiguration() {
final InterpolatedVisitor visitor = new InterpolatedVisitor();
final NodeHandler handler = getModel().getNodeHandler();
- NodeTreeWalker.INSTANCE
- .walkDFS(handler.getRootNode(), visitor, handler);
+ NodeTreeWalker.INSTANCE.walkDFS(handler.getRootNode(), visitor, handler);
- final BaseHierarchicalConfiguration c =
- (BaseHierarchicalConfiguration) clone();
+ final BaseHierarchicalConfiguration c = (BaseHierarchicalConfiguration) clone();
c.getNodeModel().setRootNode(visitor.getInterpolatedRoot());
return c;
}
/**
- * {@inheritDoc} This implementation creates a new instance of
- * {@link InMemoryNodeModel}, initialized with this configuration's root
- * node. This has the effect that although the same nodes are used, the
- * original and copied configurations are independent on each other.
+ * {@inheritDoc} This implementation creates a new instance of {@link InMemoryNodeModel}, initialized with this
+ * configuration's root node. This has the effect that although the same nodes are used, the original and copied
+ * configurations are independent on each other.
*/
@Override
- protected NodeModel cloneNodeModel()
- {
+ protected NodeModel cloneNodeModel() {
return new InMemoryNodeModel(getModel().getNodeHandler().getRootNode());
}
@@ -664,121 +522,93 @@
* @param subs a list with mutable configurations
* @return a list with corresponding immutable configurations
*/
- private static List toImmutable(
- final List extends HierarchicalConfiguration>> subs)
- {
- final List res =
- new ArrayList<>(subs.size());
- for (final HierarchicalConfiguration> sub : subs)
- {
+ private static List toImmutable(final List extends HierarchicalConfiguration>> subs) {
+ final List res = new ArrayList<>(subs.size());
+ for (final HierarchicalConfiguration> sub : subs) {
res.add(ConfigurationUtils.unmodifiableConfiguration(sub));
}
return res;
}
/**
- * Creates the {@code NodeModel} for this configuration based on a passed in
- * source configuration. This implementation creates an
- * {@link InMemoryNodeModel}. If the passed in source configuration is
- * defined, its root node also becomes the root node of this configuration.
- * Otherwise, a new, empty root node is used.
+ * Creates the {@code NodeModel} for this configuration based on a passed in source configuration. This implementation
+ * creates an {@link InMemoryNodeModel}. If the passed in source configuration is defined, its root node also becomes
+ * the root node of this configuration. Otherwise, a new, empty root node is used.
*
* @param c the configuration that is to be copied
* @return the {@code NodeModel} for the new configuration
*/
- private static NodeModel createNodeModel(
- final HierarchicalConfiguration c)
- {
+ private static NodeModel createNodeModel(final HierarchicalConfiguration c) {
final ImmutableNode root = c != null ? obtainRootNode(c) : null;
return new InMemoryNodeModel(root);
}
/**
- * Obtains the root node from a configuration whose data is to be copied. It
- * has to be ensured that the synchronizer is called correctly.
+ * Obtains the root node from a configuration whose data is to be copied. It has to be ensured that the synchronizer is
+ * called correctly.
*
* @param c the configuration that is to be copied
* @return the root node of this configuration
*/
- private static ImmutableNode obtainRootNode(
- final HierarchicalConfiguration c)
- {
+ private static ImmutableNode obtainRootNode(final HierarchicalConfiguration c) {
return c.getNodeModel().getNodeHandler().getRootNode();
}
/**
- * A specialized visitor base class that can be used for storing the tree of
- * configuration nodes. The basic idea is that each node can be associated
- * with a reference object. This reference object has a concrete meaning in
- * a derived class, e.g. an entry in a JNDI context or an XML element. When
- * the configuration tree is set up, the {@code load()} method is
- * responsible for setting the reference objects. When the configuration
- * tree is later modified, new nodes do not have a defined reference object.
- * This visitor class processes all nodes and finds the ones without a
- * defined reference object. For those nodes the {@code insert()}
- * method is called, which must be defined in concrete sub classes. This
- * method can perform all steps to integrate the new node into the original
- * structure.
- */
- protected abstract static class BuilderVisitor extends
- ConfigurationNodeVisitorAdapter
- {
+ * A specialized visitor base class that can be used for storing the tree of configuration nodes. The basic idea is that
+ * each node can be associated with a reference object. This reference object has a concrete meaning in a derived class,
+ * e.g. an entry in a JNDI context or an XML element. When the configuration tree is set up, the {@code load()} method
+ * is responsible for setting the reference objects. When the configuration tree is later modified, new nodes do not
+ * have a defined reference object. This visitor class processes all nodes and finds the ones without a defined
+ * reference object. For those nodes the {@code insert()} method is called, which must be defined in concrete sub
+ * classes. This method can perform all steps to integrate the new node into the original structure.
+ */
+ protected abstract static class BuilderVisitor extends ConfigurationNodeVisitorAdapter {
@Override
- public void visitBeforeChildren(final ImmutableNode node, final NodeHandler handler)
- {
+ public void visitBeforeChildren(final ImmutableNode node, final NodeHandler handler) {
final ReferenceNodeHandler refHandler = (ReferenceNodeHandler) handler;
updateNode(node, refHandler);
insertNewChildNodes(node, refHandler);
}
/**
- * Inserts a new node into the structure constructed by this builder.
- * This method is called for each node that has been added to the
- * configuration tree after the configuration has been loaded from its
- * source. These new nodes have to be inserted into the original
- * structure. The passed in nodes define the position of the node to be
- * inserted: its parent and the siblings between to insert.
+ * Inserts a new node into the structure constructed by this builder. This method is called for each node that has been
+ * added to the configuration tree after the configuration has been loaded from its source. These new nodes have to be
+ * inserted into the original structure. The passed in nodes define the position of the node to be inserted: its parent
+ * and the siblings between to insert.
*
* @param newNode the node to be inserted
* @param parent the parent node
- * @param sibling1 the sibling after which the node is to be inserted;
- * can be null if the new node is going to be the first
- * child node
- * @param sibling2 the sibling before which the node is to be inserted;
- * can be null if the new node is going to be the last
- * child node
+ * @param sibling1 the sibling after which the node is to be inserted; can be null if the new node is going to be
+ * the first child node
+ * @param sibling2 the sibling before which the node is to be inserted; can be null if the new node is going to
+ * be the last child node
* @param refHandler the {@code ReferenceNodeHandler}
*/
- protected abstract void insert(ImmutableNode newNode,
- ImmutableNode parent, ImmutableNode sibling1,
- ImmutableNode sibling2, ReferenceNodeHandler refHandler);
+ protected abstract void insert(ImmutableNode newNode, ImmutableNode parent, ImmutableNode sibling1, ImmutableNode sibling2,
+ ReferenceNodeHandler refHandler);
/**
- * Updates a node that already existed in the original hierarchy. This
- * method is called for each node that has an assigned reference object.
- * A concrete implementation should update the reference according to
- * the node's current value.
+ * Updates a node that already existed in the original hierarchy. This method is called for each node that has an
+ * assigned reference object. A concrete implementation should update the reference according to the node's current
+ * value.
*
* @param node the current node to be processed
* @param reference the reference object for this node
* @param refHandler the {@code ReferenceNodeHandler}
*/
- protected abstract void update(ImmutableNode node, Object reference,
- ReferenceNodeHandler refHandler);
+ protected abstract void update(ImmutableNode node, Object reference, ReferenceNodeHandler refHandler);
/**
- * Updates the value of a node. If this node is associated with a
- * reference object, the {@code update()} method is called.
+ * Updates the value of a node. If this node is associated with a reference object, the {@code update()} method is
+ * called.
*
* @param node the current node to be processed
* @param refHandler the {@code ReferenceNodeHandler}
*/
- private void updateNode(final ImmutableNode node,
- final ReferenceNodeHandler refHandler)
- {
+ private void updateNode(final ImmutableNode node, final ReferenceNodeHandler refHandler) {
final Object reference = refHandler.getReference(node);
- if (reference != null)
- {
+ if (reference != null) {
update(node, reference, refHandler);
}
}
@@ -789,53 +619,36 @@
* @param node the current node to be processed
* @param refHandler the {@code ReferenceNodeHandler}
*/
- private void insertNewChildNodes(final ImmutableNode node,
- final ReferenceNodeHandler refHandler)
- {
- final Collection subNodes =
- new LinkedList<>(refHandler.getChildren(node));
+ private void insertNewChildNodes(final ImmutableNode node, final ReferenceNodeHandler refHandler) {
+ final Collection subNodes = new LinkedList<>(refHandler.getChildren(node));
final Iterator children = subNodes.iterator();
ImmutableNode sibling1;
ImmutableNode nd = null;
- while (children.hasNext())
- {
+ while (children.hasNext()) {
// find the next new node
- do
- {
+ do {
sibling1 = nd;
nd = children.next();
- } while (refHandler.getReference(nd) != null
- && children.hasNext());
+ } while (refHandler.getReference(nd) != null && children.hasNext());
- if (refHandler.getReference(nd) == null)
- {
+ if (refHandler.getReference(nd) == null) {
// find all following new nodes
- final List newNodes =
- new LinkedList<>();
+ final List newNodes = new LinkedList<>();
newNodes.add(nd);
- while (children.hasNext())
- {
+ while (children.hasNext()) {
nd = children.next();
- if (refHandler.getReference(nd) == null)
- {
- newNodes.add(nd);
- }
- else
- {
+ if (refHandler.getReference(nd) != null) {
break;
}
+ newNodes.add(nd);
}
// Insert all new nodes
- final ImmutableNode sibling2 =
- refHandler.getReference(nd) == null ? null : nd;
- for (final ImmutableNode insertNode : newNodes)
- {
- if (refHandler.getReference(insertNode) == null)
- {
- insert(insertNode, node, sibling1, sibling2,
- refHandler);
+ final ImmutableNode sibling2 = refHandler.getReference(nd) == null ? null : nd;
+ for (final ImmutableNode insertNode : newNodes) {
+ if (refHandler.getReference(insertNode) == null) {
+ insert(insertNode, node, sibling1, sibling2, refHandler);
sibling1 = insertNode;
}
}
@@ -845,12 +658,10 @@
}
/**
- * A specialized visitor implementation which constructs the root node of a
- * configuration with all variables replaced by their interpolated values.
+ * A specialized visitor implementation which constructs the root node of a configuration with all variables replaced by
+ * their interpolated values.
*/
- private class InterpolatedVisitor extends
- ConfigurationNodeVisitorAdapter
- {
+ private class InterpolatedVisitor extends ConfigurationNodeVisitorAdapter {
/** A stack for managing node builder instances. */
private final List builderStack;
@@ -860,49 +671,33 @@
/**
* Creates a new instance of {@code InterpolatedVisitor}.
*/
- public InterpolatedVisitor()
- {
+ public InterpolatedVisitor() {
builderStack = new LinkedList<>();
}
/**
- * Returns the result of this builder: the root node of the interpolated
- * nodes hierarchy.
+ * Returns the result of this builder: the root node of the interpolated nodes hierarchy.
*
* @return the resulting root node
*/
- public ImmutableNode getInterpolatedRoot()
- {
+ public ImmutableNode getInterpolatedRoot() {
return interpolatedRoot;
}
@Override
- public void visitBeforeChildren(final ImmutableNode node,
- final NodeHandler handler)
- {
- if (isLeafNode(node, handler))
- {
+ public void visitBeforeChildren(final ImmutableNode node, final NodeHandler handler) {
+ if (isLeafNode(node, handler)) {
handleLeafNode(node, handler);
- }
- else
- {
- final ImmutableNode.Builder builder =
- new ImmutableNode.Builder(handler.getChildrenCount(
- node, null))
- .name(handler.nodeName(node))
- .value(interpolate(handler.getValue(node)))
- .addAttributes(
- interpolateAttributes(node, handler));
+ } else {
+ final ImmutableNode.Builder builder = new ImmutableNode.Builder(handler.getChildrenCount(node, null)).name(handler.nodeName(node))
+ .value(interpolate(handler.getValue(node))).addAttributes(interpolateAttributes(node, handler));
push(builder);
}
}
@Override
- public void visitAfterChildren(final ImmutableNode node,
- final NodeHandler handler)
- {
- if (!isLeafNode(node, handler))
- {
+ public void visitAfterChildren(final ImmutableNode node, final NodeHandler handler) {
+ if (!isLeafNode(node, handler)) {
final ImmutableNode newNode = pop().create();
storeInterpolatedNode(newNode);
}
@@ -913,8 +708,7 @@
*
* @param builder the builder
*/
- private void push(final ImmutableNode.Builder builder)
- {
+ private void push(final ImmutableNode.Builder builder) {
builderStack.add(0, builder);
}
@@ -923,8 +717,7 @@
*
* @return the element popped from the stack
*/
- private ImmutableNode.Builder pop()
- {
+ private ImmutableNode.Builder pop() {
return builderStack.remove(0);
}
@@ -933,65 +726,48 @@
*
* @return the top-level element from the stack
*/
- private ImmutableNode.Builder peek()
- {
+ private ImmutableNode.Builder peek() {
return builderStack.get(0);
}
/**
- * Returns a flag whether the given node is a leaf. This is the case if
- * it does not have children.
+ * Returns a flag whether the given node is a leaf. This is the case if it does not have children.
*
* @param node the node in question
* @param handler the {@code NodeHandler}
* @return a flag whether this is a leaf node
*/
- private boolean isLeafNode(final ImmutableNode node,
- final NodeHandler handler)
- {
+ private boolean isLeafNode(final ImmutableNode node, final NodeHandler handler) {
return handler.getChildren(node).isEmpty();
}
/**
- * Handles interpolation for a node with no children. If interpolation
- * does not change this node, it is copied as is to the resulting
- * structure. Otherwise, a new node is created with the interpolated
- * values.
+ * Handles interpolation for a node with no children. If interpolation does not change this node, it is copied as is to
+ * the resulting structure. Otherwise, a new node is created with the interpolated values.
*
* @param node the current node to be processed
* @param handler the {@code NodeHandler}
*/
- private void handleLeafNode(final ImmutableNode node,
- final NodeHandler handler)
- {
+ private void handleLeafNode(final ImmutableNode node, final NodeHandler handler) {
final Object value = interpolate(node.getValue());
- final Map interpolatedAttributes =
- new HashMap<>();
- final boolean attributeChanged =
- interpolateAttributes(node, handler, interpolatedAttributes);
- final ImmutableNode newNode =
- valueChanged(value, handler.getValue(node)) || attributeChanged ? new ImmutableNode.Builder()
- .name(handler.nodeName(node)).value(value)
- .addAttributes(interpolatedAttributes).create()
- : node;
+ final Map interpolatedAttributes = new HashMap<>();
+ final boolean attributeChanged = interpolateAttributes(node, handler, interpolatedAttributes);
+ final ImmutableNode newNode = valueChanged(value, handler.getValue(node)) || attributeChanged
+ ? new ImmutableNode.Builder().name(handler.nodeName(node)).value(value).addAttributes(interpolatedAttributes).create()
+ : node;
storeInterpolatedNode(newNode);
}
/**
- * Stores a processed node. Per default, the node is added to the
- * current builder on the stack. If no such builder exists, this is the
- * result node.
+ * Stores a processed node. Per default, the node is added to the current builder on the stack. If no such builder
+ * exists, this is the result node.
*
* @param node the node to be stored
*/
- private void storeInterpolatedNode(final ImmutableNode node)
- {
- if (builderStack.isEmpty())
- {
+ private void storeInterpolatedNode(final ImmutableNode node) {
+ if (builderStack.isEmpty()) {
interpolatedRoot = node;
- }
- else
- {
+ } else {
peek().addChild(node);
}
}
@@ -1002,21 +778,14 @@
* @param node the current node to be processed
* @param handler the {@code NodeHandler}
* @param interpolatedAttributes a map for storing the results
- * @return a flag whether an attribute value was changed by
- * interpolation
+ * @return a flag whether an attribute value was changed by interpolation
*/
- private boolean interpolateAttributes(final ImmutableNode node,
- final NodeHandler handler,
- final Map interpolatedAttributes)
- {
+ private boolean interpolateAttributes(final ImmutableNode node, final NodeHandler handler,
+ final Map interpolatedAttributes) {
boolean attributeChanged = false;
- for (final String attr : handler.getAttributes(node))
- {
- final Object attrValue =
- interpolate(handler.getAttributeValue(node, attr));
- if (valueChanged(attrValue,
- handler.getAttributeValue(node, attr)))
- {
+ for (final String attr : handler.getAttributes(node)) {
+ final Object attrValue = interpolate(handler.getAttributeValue(node, attr));
+ if (valueChanged(attrValue, handler.getAttributeValue(node, attr))) {
attributeChanged = true;
}
interpolatedAttributes.put(attr, attrValue);
@@ -1031,9 +800,7 @@
* @param handler the {@code NodeHandler}
* @return the map with interpolated attributes
*/
- private Map interpolateAttributes(final ImmutableNode node,
- final NodeHandler handler)
- {
+ private Map interpolateAttributes(final ImmutableNode node, final NodeHandler handler) {
final Map attributes = new HashMap<>();
interpolateAttributes(node, handler, attributes);
return attributes;
@@ -1046,8 +813,7 @@
* @param value the original value
* @return a flag whether the value was changed
*/
- private boolean valueChanged(final Object interpolatedValue, final Object value)
- {
+ private boolean valueChanged(final Object interpolatedValue, final Object value) {
return ObjectUtils.notEqual(interpolatedValue, value);
}
}
diff -Nru commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java
--- commons-configuration2-2.7/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java 2020-03-07 18:57:27.000000000 +0000
+++ commons-configuration2-2.8.0/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java 2022-03-31 14:41:23.000000000 +0000
@@ -48,44 +48,34 @@
* A hierarchical composite configuration class.
*
*