├── .asf.yaml ├── .github ├── GH-ROBOTS.txt ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── codeql-analysis.yml │ ├── dependency-review.yml │ ├── maven.yml │ └── scorecards-analysis.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── NOTICE.txt ├── PROPOSAL.html ├── README.md ├── RELEASE-NOTES.txt ├── SECURITY.md ├── pom.xml └── src ├── changes ├── changes.xml └── release-notes.vm ├── conf ├── CommonsConfiguration.xsd ├── HEADER.txt ├── checkstyle-suppressions.xml ├── checkstyle.xml ├── cpd-exclusions.txt └── findbugs-exclude-filter.xml ├── main ├── assembly │ ├── bin.xml │ └── src.xml ├── java │ └── org │ │ └── apache │ │ └── commons │ │ └── configuration2 │ │ ├── AbstractConfiguration.java │ │ ├── AbstractHierarchicalConfiguration.java │ │ ├── AbstractYAMLBasedConfiguration.java │ │ ├── BaseConfiguration.java │ │ ├── BaseConfigurationXMLReader.java │ │ ├── BaseHierarchicalConfiguration.java │ │ ├── CombinedConfiguration.java │ │ ├── CompositeConfiguration.java │ │ ├── Configuration.java │ │ ├── ConfigurationComparator.java │ │ ├── ConfigurationConsumer.java │ │ ├── ConfigurationConverter.java │ │ ├── ConfigurationDecoder.java │ │ ├── ConfigurationLookup.java │ │ ├── ConfigurationMap.java │ │ ├── ConfigurationUtils.java │ │ ├── ConfigurationXMLReader.java │ │ ├── DataConfiguration.java │ │ ├── DatabaseConfiguration.java │ │ ├── DynamicCombinedConfiguration.java │ │ ├── EnvironmentConfiguration.java │ │ ├── FileBasedConfiguration.java │ │ ├── FindNodeVisitor.java │ │ ├── HierarchicalConfiguration.java │ │ ├── HierarchicalConfigurationConverter.java │ │ ├── HierarchicalConfigurationXMLReader.java │ │ ├── INIConfiguration.java │ │ ├── ImmutableConfiguration.java │ │ ├── ImmutableConfigurationInvocationHandler.java │ │ ├── ImmutableHierarchicalConfiguration.java │ │ ├── Initializable.java │ │ ├── JNDIConfiguration.java │ │ ├── JSONConfiguration.java │ │ ├── MapConfiguration.java │ │ ├── PatternSubtreeConfigurationWrapper.java │ │ ├── PrefixedKeysIterator.java │ │ ├── PropertiesConfiguration.java │ │ ├── PropertiesConfigurationLayout.java │ │ ├── StrictConfigurationComparator.java │ │ ├── SubnodeConfiguration.java │ │ ├── SubsetConfiguration.java │ │ ├── SystemConfiguration.java │ │ ├── XMLConfiguration.java │ │ ├── XMLDocumentHelper.java │ │ ├── XMLListReference.java │ │ ├── XMLPropertiesConfiguration.java │ │ ├── YAMLConfiguration.java │ │ ├── beanutils │ │ ├── BeanCreationContext.java │ │ ├── BeanDeclaration.java │ │ ├── BeanFactory.java │ │ ├── BeanHelper.java │ │ ├── CombinedBeanDeclaration.java │ │ ├── ConfigurationDynaBean.java │ │ ├── ConfigurationDynaClass.java │ │ ├── ConstructorArg.java │ │ ├── DefaultBeanFactory.java │ │ ├── XMLBeanDeclaration.java │ │ └── package-info.java │ │ ├── builder │ │ ├── AutoSaveListener.java │ │ ├── BasicBuilderParameters.java │ │ ├── BasicBuilderProperties.java │ │ ├── BasicConfigurationBuilder.java │ │ ├── BuilderConfigurationWrapperFactory.java │ │ ├── BuilderParameters.java │ │ ├── ConfigurationBuilder.java │ │ ├── ConfigurationBuilderEvent.java │ │ ├── ConfigurationBuilderResultCreatedEvent.java │ │ ├── CopyObjectDefaultHandler.java │ │ ├── DatabaseBuilderParametersImpl.java │ │ ├── DatabaseBuilderProperties.java │ │ ├── DefaultParametersHandler.java │ │ ├── DefaultParametersManager.java │ │ ├── DefaultReloadingDetectorFactory.java │ │ ├── EventListenerParameters.java │ │ ├── EventListenerProvider.java │ │ ├── FileBasedBuilderParametersImpl.java │ │ ├── FileBasedBuilderProperties.java │ │ ├── FileBasedConfigurationBuilder.java │ │ ├── HierarchicalBuilderParametersImpl.java │ │ ├── HierarchicalBuilderProperties.java │ │ ├── INIBuilderParametersImpl.java │ │ ├── INIBuilderProperties.java │ │ ├── JndiBuilderParametersImpl.java │ │ ├── JndiBuilderProperties.java │ │ ├── PropertiesBuilderParametersImpl.java │ │ ├── PropertiesBuilderProperties.java │ │ ├── ReloadingBuilderSupportListener.java │ │ ├── ReloadingDetectorFactory.java │ │ ├── ReloadingFileBasedConfigurationBuilder.java │ │ ├── XMLBuilderParametersImpl.java │ │ ├── XMLBuilderProperties.java │ │ ├── combined │ │ │ ├── BaseConfigurationBuilderProvider.java │ │ │ ├── CombinedBuilderParametersImpl.java │ │ │ ├── CombinedBuilderProperties.java │ │ │ ├── CombinedConfigurationBuilder.java │ │ │ ├── CombinedConfigurationBuilderProvider.java │ │ │ ├── ConfigurationBuilderProvider.java │ │ │ ├── ConfigurationDeclaration.java │ │ │ ├── FileExtensionConfigurationBuilderProvider.java │ │ │ ├── MultiFileBuilderParametersImpl.java │ │ │ ├── MultiFileBuilderProperties.java │ │ │ ├── MultiFileConfigurationBuilder.java │ │ │ ├── MultiFileConfigurationBuilderProvider.java │ │ │ ├── MultiWrapDynaBean.java │ │ │ ├── MultiWrapDynaClass.java │ │ │ ├── ReloadingCombinedConfigurationBuilder.java │ │ │ ├── ReloadingMultiFileConfigurationBuilder.java │ │ │ └── package-info.java │ │ ├── fluent │ │ │ ├── CombinedBuilderParameters.java │ │ │ ├── Configurations.java │ │ │ ├── DatabaseBuilderParameters.java │ │ │ ├── FileBasedBuilderParameters.java │ │ │ ├── HierarchicalBuilderParameters.java │ │ │ ├── INIBuilderParameters.java │ │ │ ├── JndiBuilderParameters.java │ │ │ ├── MultiFileBuilderParameters.java │ │ │ ├── Parameters.java │ │ │ ├── PropertiesBuilderParameters.java │ │ │ ├── XMLBuilderParameters.java │ │ │ └── package-info.java │ │ └── package-info.java │ │ ├── convert │ │ ├── AbstractListDelimiterHandler.java │ │ ├── ConversionHandler.java │ │ ├── DefaultConversionHandler.java │ │ ├── DefaultListDelimiterHandler.java │ │ ├── DisabledListDelimiterHandler.java │ │ ├── LegacyListDelimiterHandler.java │ │ ├── ListDelimiterHandler.java │ │ ├── PropertyConverter.java │ │ ├── ValueTransformer.java │ │ └── package-info.java │ │ ├── event │ │ ├── BaseEventSource.java │ │ ├── ConfigurationErrorEvent.java │ │ ├── ConfigurationEvent.java │ │ ├── Event.java │ │ ├── EventListener.java │ │ ├── EventListenerList.java │ │ ├── EventListenerRegistrationData.java │ │ ├── EventSource.java │ │ ├── EventType.java │ │ └── package-info.java │ │ ├── ex │ │ ├── ConfigurationException.java │ │ ├── ConfigurationRuntimeException.java │ │ ├── ConversionException.java │ │ └── package-info.java │ │ ├── interpol │ │ ├── ConfigurationInterpolator.java │ │ ├── ConstantLookup.java │ │ ├── DefaultLookups.java │ │ ├── DummyLookup.java │ │ ├── EnvironmentLookup.java │ │ ├── ExprLookup.java │ │ ├── InterpolatorSpecification.java │ │ ├── Lookup.java │ │ ├── StringLookupAdapter.java │ │ ├── SystemPropertiesLookup.java │ │ └── package-info.java │ │ ├── io │ │ ├── AbsoluteNameLocationStrategy.java │ │ ├── BasePathLocationStrategy.java │ │ ├── ClasspathLocationStrategy.java │ │ ├── CombinedLocationStrategy.java │ │ ├── ConfigurationLogger.java │ │ ├── DefaultFileSystem.java │ │ ├── FileBased.java │ │ ├── FileHandler.java │ │ ├── FileHandlerListener.java │ │ ├── FileHandlerListenerAdapter.java │ │ ├── FileLocationStrategy.java │ │ ├── FileLocator.java │ │ ├── FileLocatorAware.java │ │ ├── FileLocatorUtils.java │ │ ├── FileOptionsProvider.java │ │ ├── FileSystem.java │ │ ├── FileSystemLocationStrategy.java │ │ ├── FileUtils.java │ │ ├── HomeDirectoryLocationStrategy.java │ │ ├── InputStreamSupport.java │ │ ├── ProvidedURLLocationStrategy.java │ │ ├── URLConnectionOptions.java │ │ ├── VFSFileSystem.java │ │ ├── VerifiableOutputStream.java │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── plist │ │ ├── PropertyListConfiguration.java │ │ ├── XMLPropertyListConfiguration.java │ │ └── package-info.java │ │ ├── reloading │ │ ├── CombinedReloadingController.java │ │ ├── FileHandlerReloadingDetector.java │ │ ├── ManagedReloadingDetector.java │ │ ├── ManagedReloadingDetectorMBean.java │ │ ├── PeriodicReloadingTrigger.java │ │ ├── ReloadingController.java │ │ ├── ReloadingControllerSupport.java │ │ ├── ReloadingDetector.java │ │ ├── ReloadingEvent.java │ │ ├── VFSFileHandlerReloadingDetector.java │ │ └── package-info.java │ │ ├── resolver │ │ ├── CatalogResolver.java │ │ ├── DefaultEntityResolver.java │ │ ├── EntityRegistry.java │ │ ├── EntityResolverSupport.java │ │ └── package-info.java │ │ ├── spring │ │ ├── ConfigurationPropertiesFactoryBean.java │ │ ├── ConfigurationPropertySource.java │ │ └── package-info.java │ │ ├── sync │ │ ├── LockMode.java │ │ ├── NoOpSynchronizer.java │ │ ├── ReadWriteSynchronizer.java │ │ ├── Synchronizer.java │ │ ├── SynchronizerSupport.java │ │ └── package-info.java │ │ ├── tree │ │ ├── AbstractImmutableNodeHandler.java │ │ ├── ConfigurationNodeVisitor.java │ │ ├── ConfigurationNodeVisitorAdapter.java │ │ ├── DefaultConfigurationKey.java │ │ ├── DefaultExpressionEngine.java │ │ ├── DefaultExpressionEngineSymbols.java │ │ ├── ExpressionEngine.java │ │ ├── ImmutableNode.java │ │ ├── InMemoryNodeModel.java │ │ ├── InMemoryNodeModelSupport.java │ │ ├── MergeCombiner.java │ │ ├── ModelTransaction.java │ │ ├── NodeAddData.java │ │ ├── NodeCombiner.java │ │ ├── NodeHandler.java │ │ ├── NodeHandlerDecorator.java │ │ ├── NodeKeyResolver.java │ │ ├── NodeMatcher.java │ │ ├── NodeModel.java │ │ ├── NodeModelSupport.java │ │ ├── NodeNameMatchers.java │ │ ├── NodeSelector.java │ │ ├── NodeTracker.java │ │ ├── NodeTreeWalker.java │ │ ├── NodeUpdateData.java │ │ ├── OverrideCombiner.java │ │ ├── QueryResult.java │ │ ├── ReferenceNodeHandler.java │ │ ├── ReferenceTracker.java │ │ ├── TrackedNodeHandler.java │ │ ├── TrackedNodeModel.java │ │ ├── TreeData.java │ │ ├── TreeUtils.java │ │ ├── UnionCombiner.java │ │ ├── package-info.java │ │ └── xpath │ │ │ ├── AbstractConfigurationNodeIterator.java │ │ │ ├── ConfigurationAttributePointer.java │ │ │ ├── ConfigurationNodeIteratorAttribute.java │ │ │ ├── ConfigurationNodeIteratorChildren.java │ │ │ ├── ConfigurationNodePointer.java │ │ │ ├── ConfigurationNodePointerFactory.java │ │ │ ├── XPathContextFactory.java │ │ │ ├── XPathExpressionEngine.java │ │ │ └── package-info.java │ │ └── web │ │ ├── AppletConfiguration.java │ │ ├── BaseWebConfiguration.java │ │ ├── JakartaServletConfiguration.java │ │ ├── JakartaServletContextConfiguration.java │ │ ├── JakartaServletFilterConfiguration.java │ │ ├── JakartaServletRequestConfiguration.java │ │ ├── ServletConfiguration.java │ │ ├── ServletContextConfiguration.java │ │ ├── ServletFilterConfiguration.java │ │ ├── ServletRequestConfiguration.java │ │ └── package-info.java ├── javacc │ └── PropertyListParser.jj └── resources │ ├── PropertyList-1.0.dtd │ └── properties.dtd ├── site ├── resources │ ├── download_configuration.cgi │ ├── images │ │ ├── logo.png │ │ └── logo.xcf │ ├── profile.jacoco │ └── profile.japicmp ├── site.xml └── xdoc │ ├── building.xml │ ├── dependencies.xml │ ├── download_configuration.xml │ ├── index.xml │ ├── issue-tracking.xml │ ├── javadocarchive.xml │ ├── mail-lists.xml │ ├── security.xml │ ├── userguide │ ├── howto_basicfeatures.xml │ ├── howto_beans.xml │ ├── howto_builders.xml │ ├── howto_combinedbuilder.xml │ ├── howto_combinedconfiguration.xml │ ├── howto_compositeconfiguration.xml │ ├── howto_concurrency.xml │ ├── howto_events.xml │ ├── howto_filebased.xml │ ├── howto_hierarchical.xml │ ├── howto_multitenant.xml │ ├── howto_properties.xml │ ├── howto_reloading.xml │ ├── howto_utilities.xml │ ├── howto_xml.xml │ ├── overview.xml │ ├── quick_start.xml │ ├── upgradeto2_0.xml │ ├── upgradeto2_x.xml │ └── user_guide.xml │ └── userguide_v1.10 │ ├── howto_basicfeatures.xml │ ├── howto_beans.xml │ ├── howto_combinedconfiguration.xml │ ├── howto_compositeconfiguration.xml │ ├── howto_configurationbuilder.xml │ ├── howto_events.xml │ ├── howto_filebased.xml │ ├── howto_filesystems.xml │ ├── howto_multitenant.xml │ ├── howto_properties.xml │ ├── howto_utilities.xml │ ├── howto_xml.xml │ ├── overview.xml │ └── user_guide.xml └── test ├── java └── org │ └── apache │ └── commons │ └── configuration2 │ ├── BaseNonStringProperties.java │ ├── ConfigurationAssert.java │ ├── DatabaseConfigurationTestHelper.java │ ├── EnumFixture.java │ ├── FileURLStreamHandler.java │ ├── InterpolationTestHelper.java │ ├── Logging.java │ ├── MockInitialContextFactory.java │ ├── NonCloneableConfiguration.java │ ├── NonStringTestHolder.java │ ├── SynchronizerTestImpl.java │ ├── TempDirUtils.java │ ├── TestAbstractConfiguration.java │ ├── TestAbstractConfigurationBasicFeatures.java │ ├── TestAbstractConfigurationSynchronization.java │ ├── TestAbstractHierarchicalConfiguration.java │ ├── TestBaseConfiguration.java │ ├── TestBaseConfigurationXMLReader.java │ ├── TestBaseHierarchicalConfigurationSynchronization.java │ ├── TestBaseNullConfiguration.java │ ├── TestCatalogResolver.java │ ├── TestCombinedConfiguration.java │ ├── TestCompositeConfiguration.java │ ├── TestCompositeConfigurationNonStringProperties.java │ ├── TestConfigurationConverter.java │ ├── TestConfigurationLookup.java │ ├── TestConfigurationMap.java │ ├── TestConfigurationSet.java │ ├── TestConfigurationUtils.java │ ├── TestDataConfiguration.java │ ├── TestDatabaseConfiguration.java │ ├── TestDefaultImmutableConfiguration.java │ ├── TestDynamicCombinedConfiguration.java │ ├── TestEnvironmentConfiguration.java │ ├── TestEqualBehavior.java │ ├── TestEqualsProperty.java │ ├── TestHierarchicalConfiguration.java │ ├── TestHierarchicalConfigurationXMLReader.java │ ├── TestHierarchicalXMLConfiguration.java │ ├── TestINIConfiguration.java │ ├── TestImmutableConfiguration.java │ ├── TestJNDIConfiguration.java │ ├── TestJNDIEnvironmentValues.java │ ├── TestJSONConfiguration.java │ ├── TestMapConfiguration.java │ ├── TestNonStringProperties.java │ ├── TestNullCompositeConfiguration.java │ ├── TestNullJNDIEnvironmentValues.java │ ├── TestPatternSubtreeConfiguration.java │ ├── TestPatternSubtreeConfigurationWrapper.java │ ├── TestPropertiesConfiguration.java │ ├── TestPropertiesConfigurationLayout.java │ ├── TestPropertiesSequence.java │ ├── TestStrictConfigurationComparator.java │ ├── TestSubnodeConfiguration.java │ ├── TestSubsetConfiguration.java │ ├── TestSubsetConfiguration848.java │ ├── TestSystemConfiguration.java │ ├── TestThreesomeConfiguration.java │ ├── TestXMLConfiguration.java │ ├── TestXMLConfiguration605.java │ ├── TestXMLDocumentHelper.java │ ├── TestXMLListHandling.java │ ├── TestXMLPropertiesConfiguration.java │ ├── TestYAMLConfiguration.java │ ├── beanutils │ ├── BeanCreationTestBean.java │ ├── BeanCreationTestBeanWithListChild.java │ ├── BeanCreationTestCtorBean.java │ ├── BeanDeclarationTestImpl.java │ ├── TestBeanHelper.java │ ├── TestCombinedBeanDeclaration.java │ ├── TestConfigurationDynaBean.java │ ├── TestConfigurationDynaBeanXMLConfig.java │ ├── TestConstructorArg.java │ ├── TestDefaultBeanFactory.java │ └── TestXMLBeanDeclaration.java │ ├── builder │ ├── BuilderEventListenerImpl.java │ ├── ParametersBeanTestImpl.java │ ├── TestAutoSaveListener.java │ ├── TestBasicBuilderParameters.java │ ├── TestBasicConfigurationBuilder.java │ ├── TestBasicConfigurationBuilderEvents.java │ ├── TestBuilderConfigurationWrapperFactory.java │ ├── TestCopyObjectDefaultHandler.java │ ├── TestDatabaseBuilderParametersImpl.java │ ├── TestDefaultParametersManager.java │ ├── TestDefaultReloadingDetectorFactory.java │ ├── TestEventListenerParameters.java │ ├── TestFileBasedBuilderParameters.java │ ├── TestFileBasedConfigurationBuilder.java │ ├── TestHierarchicalBuilderParametersImpl.java │ ├── TestJndiBuilderParametersImpl.java │ ├── TestPropertiesBuilderParametersImpl.java │ ├── TestReloadingBuilderSupportListener.java │ ├── TestReloadingFileBasedConfigurationBuilder.java │ ├── TestXMLBuilderParametersImpl.java │ ├── combined │ │ ├── AbstractMultiFileConfigurationBuilderTest.java │ │ ├── TestBaseConfigurationBuilderProvider.java │ │ ├── TestCombinedBuilderParametersImpl.java │ │ ├── TestCombinedConfigurationBuilder.java │ │ ├── TestCombinedConfigurationBuilderVFS.java │ │ ├── TestConfigurationDeclaration.java │ │ ├── TestFileExtensionConfigurationBuilderProvider.java │ │ ├── TestMultiFileBuilderParametersImpl.java │ │ ├── TestMultiFileConfigurationBuilder.java │ │ ├── TestMultiWrapDynaBean.java │ │ ├── TestReloadingCombinedConfigurationBuilder.java │ │ ├── TestReloadingCombinedConfigurationBuilderFileBased.java │ │ └── TestReloadingMultiFileConfigurationBuilder.java │ └── fluent │ │ ├── TestConfigurations.java │ │ └── TestParameters.java │ ├── convert │ ├── MyNumber.java │ ├── TestDefaultConversionHandler.java │ ├── TestDefaultListDelimiterHandler.java │ ├── TestDisabledListDelimiterHandler.java │ └── TestPropertyConverter.java │ ├── event │ ├── AbstractEventListenerTestImpl.java │ ├── AbstractTestConfigurationEvents.java │ ├── ErrorListenerTestImpl.java │ ├── EventListenerTestImpl.java │ ├── TestConfigurationEventTypes.java │ ├── TestDatabaseConfigurationEvents.java │ ├── TestEvent.java │ ├── TestEventListenerList.java │ ├── TestEventSource.java │ ├── TestEventType.java │ ├── TestHierarchicalConfigurationEvents.java │ ├── TestMapConfigurationEvents.java │ ├── TestPropertiesConfigurationEvents.java │ ├── TestSubsetConfigurationEvents.java │ └── TestXMLConfigurationEvents.java │ ├── interpol │ ├── TestConfigurationInterpolator.java │ ├── TestConstantLookup.java │ ├── TestDummyLookup.java │ ├── TestEnvironmentLookup.java │ ├── TestExprLookup.java │ ├── TestInterpolatorSpecification.java │ └── TestSystemPropertiesLookup.java │ ├── io │ ├── TestAbsoluteNameLocationStrategy.java │ ├── TestBasePathLocationStrategy.java │ ├── TestClasspathLocationStrategy.java │ ├── TestCombinedLocationStrategy.java │ ├── TestConfigurationLogger.java │ ├── TestDefaultFileSystem.java │ ├── TestFileHandler.java │ ├── TestFileLocator.java │ ├── TestFileLocatorUtils.java │ ├── TestFileSystemLocationStrategy.java │ ├── TestHomeDirectoryLocationStrategy.java │ └── TestProvidedURLLocationStrategy.java │ ├── plist │ ├── AbstractTestPListEvents.java │ ├── TestPropertyListConfiguration.java │ ├── TestPropertyListConfigurationEvents.java │ ├── TestPropertyListParser.java │ ├── TestXMLPropertyListConfiguration.java │ └── TestXMLPropertyListConfigurationEvents.java │ ├── reloading │ ├── AlwaysReloadingDetector.java │ ├── RandomReloadingDetector.java │ ├── TestCombinedReloadingController.java │ ├── TestFileHandlerReloadingDetector.java │ ├── TestManagedReloadingDetector.java │ ├── TestPeriodicReloadingTrigger.java │ ├── TestReloadingController.java │ └── TestVFSFileHandlerReloadingDetector.java │ ├── spring │ ├── TestConfigurationPropertiesFactoryBean.java │ └── TestConfigurationPropertySource.java │ ├── sync │ └── TestReadWriteSynchronizer.java │ ├── test │ └── HsqlDB.java │ ├── tree │ ├── AbstractCombinerTest.java │ ├── AbstractImmutableNodeHandlerTest.java │ ├── NodeStructureHelper.java │ ├── TestDefaultConfigurationKey.java │ ├── TestDefaultExpressionEngine.java │ ├── TestDefaultExpressionEngineSymbols.java │ ├── TestImmutableNode.java │ ├── TestInMemoryNodeModel.java │ ├── TestInMemoryNodeModelReferences.java │ ├── TestInMemoryNodeModelTrackedNodes.java │ ├── TestMergeCombiner.java │ ├── TestNodeAddData.java │ ├── TestNodeHandlerDecorator.java │ ├── TestNodeNameMatchers.java │ ├── TestNodeSelector.java │ ├── TestNodeTreeWalker.java │ ├── TestNodeUpdateData.java │ ├── TestOverrideCombiner.java │ ├── TestQueryResult.java │ ├── TestTrackedNodeHandler.java │ ├── TestTrackedNodeModel.java │ ├── TestTreeData.java │ ├── TestUnionCombiner.java │ └── xpath │ │ ├── AbstractXPathTest.java │ │ ├── TestConfigurationAttributePointer.java │ │ ├── TestConfigurationIteratorAttributes.java │ │ ├── TestConfigurationNodeIteratorChildren.java │ │ ├── TestConfigurationNodePointer.java │ │ ├── TestConfigurationNodePointerFactory.java │ │ ├── TestXPathContextFactory.java │ │ ├── TestXPathExpressionEngine.java │ │ └── TestXPathExpressionEngineInConfig.java │ └── web │ ├── TestAppletConfiguration.java │ ├── TestJakartaServletConfiguration.java │ ├── TestJakartaServletContextConfiguration.java │ ├── TestJakartaServletFilterConfiguration.java │ ├── TestJakartaServletRequestConfiguration.java │ ├── TestServletConfiguration.java │ ├── TestServletContextConfiguration.java │ ├── TestServletFilterConfiguration.java │ └── TestServletRequestConfiguration.java └── resources ├── 01 └── testMultiConfiguration_1001.xml ├── catalog.xml ├── catalog2.xml ├── config ├── deep │ ├── deepinclude.properties │ ├── deeptest.properties │ ├── deeptestinvalid.properties │ ├── test.properties │ ├── testEqualDeep.properties │ └── testFileFromClasspath.xml ├── test.properties └── testMultiInclude.properties ├── configA.xml ├── configB.xml ├── dataset.xml ├── include-cyclical-back-to-root.properties ├── include-cyclical-reference.properties ├── include-cyclical-root.properties ├── include-cyclical-step.properties ├── include-include-cyclical-reference.properties ├── include-include-not-found.properties ├── include-interpol.properties ├── include-load-exception.properties ├── include-not-found.properties ├── include.properties ├── includeoptional-target.properties ├── includeoptional.properties ├── jndi.properties ├── jup-test.properties ├── log4j-test.xml ├── org └── apache │ └── commons │ └── configuration2 │ └── test.jar ├── resolver.dtd ├── sample.xml ├── sample.xsd ├── sample_1001.xml ├── test-configuration-848.json ├── test.ini ├── test.json ├── test.plist ├── test.plist.xml ├── test.properties ├── test.properties.xml ├── test.xml ├── test.yaml ├── test2.plist.xml ├── test2.properties ├── testCCCombinedChildBuilder.xml ├── testCCCustomProvider.xml ├── testCCEntityResolver.xml ├── testCCEnvProperties.xml ├── testCCFileSystem.xml ├── testCCFileSystemSubConfig.xml ├── testCCLookup.xml ├── testCCMultiTenent.xml ├── testCCMultiTenentReloading.xml ├── testCCReloading.xml ├── testCCReloadingNested.xml ├── testCCResultClass.xml ├── testCCResultInitialization.xml ├── testCCSystemProperties.xml ├── testChildNamespace.xml ├── testClasspath.properties ├── testComplexInitialization.xml ├── testConfigurationFactoryBean.file ├── testConfigurationInterpolatorUpdate.xml ├── testConfigurationProvider.xml ├── testConfigurationXMLDocument.xml ├── testDigesterBadXML.xml ├── testDigesterConfiguration.xml ├── testDigesterConfiguration2.xml ├── testDigesterConfiguration3.xml ├── testDigesterConfigurationBasePath.xml ├── testDigesterConfigurationInclude1.xml ├── testDigesterConfigurationInclude2.properties ├── testDigesterConfigurationNamespaceAware.xml ├── testDigesterConfigurationOverwrite.properties ├── testDigesterConfigurationReverseOrder.xml ├── testDigesterConfigurationSysProps.xml ├── testDigesterConfigurationWithProps.xml ├── testDigesterCreateObject.xml ├── testDigesterOptionalConfiguration.xml ├── testDigesterOptionalConfigurationEx.xml ├── testDtd.xml ├── testDtdPublic.xml ├── testEncoding.xml ├── testEqual.properties ├── testEqualDigester.xml ├── testExpression.xml ├── testExtendedClass.xml ├── testExtendedXMLConfigurationProvider.xml ├── testFactoryPropertiesInclude.xml ├── testFileReloadConfigurationBuilder.xml ├── testFileReloadConfigurationBuilder2.xml ├── testFileSystem.xml ├── testGlobalLookup.xml ├── testHierarchicalXMLConfiguration.xml ├── testHierarchicalXMLConfiguration2.xml ├── testInterpolation.properties ├── testInterpolation.xml ├── testInterpolationBuilder.xml ├── testMultiConfiguration.xsd ├── testMultiConfiguration_1001.xml ├── testMultiConfiguration_1002.xml ├── testMultiConfiguration_1003.xml ├── testMultiConfiguration_1004.xml ├── testMultiConfiguration_2001.xml ├── testMultiConfiguration_2002.xml ├── testMultiConfiguration_3001.xml ├── testMultiConfiguration_3002.xml ├── testMultiConfiguration_default.xml ├── testMultiDynamic_default.xml ├── testMultiDynamic_default2.xml ├── testMultiTenentConfigurationBuilder.xml ├── testMultiTenentConfigurationBuilder2.xml ├── testMultiTenentConfigurationBuilder3.xml ├── testMultiTenentConfigurationBuilder4.xml ├── testMultiTenentConfigurationBuilder5.xml ├── testPatternSubtreeConfig.xml ├── testResolver.xml ├── testRootNamespace.xml ├── testSequence.properties ├── testSequenceDigester.xml ├── testSystemProperties.xml ├── testVFSMultiTenentConfigurationBuilder1.xml ├── testVFSMultiTenentConfigurationBuilder2.xml ├── testValidateInvalid.xml ├── testValidateValid.xml ├── testValidation.xml ├── testValidation2.xml ├── testValidation3.xml ├── test_invalid_date.plist.xml ├── testcombine1.xml ├── testcombine2.xml ├── testdb.script └── threesome.properties /.asf.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | github: 17 | description: "Apache Commons Configuration" 18 | homepage: https://commons.apache.org/configuration/ 19 | 20 | notifications: 21 | commits: commits@commons.apache.org 22 | issues: issues@commons.apache.org 23 | pullrequests: issues@commons.apache.org 24 | jira_options: link label 25 | jobs: notifications@commons.apache.org 26 | issues_bot_dependabot: notifications@commons.apache.org 27 | pullrequests_bot_dependabot: notifications@commons.apache.org 28 | issues_bot_codecov-commenter: notifications@commons.apache.org 29 | pullrequests_bot_codecov-commenter: notifications@commons.apache.org 30 | -------------------------------------------------------------------------------- /.github/GH-ROBOTS.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Keeps on creating FUD PRs in test code 17 | # Does not follow Apache disclosure policies 18 | User-agent: JLLeitschuh/security-research 19 | Disallow: * 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | version: 2 17 | updates: 18 | - package-ecosystem: "maven" 19 | directory: "/" 20 | schedule: 21 | interval: "weekly" 22 | day: "friday" 23 | - package-ecosystem: "github-actions" 24 | directory: "/" 25 | schedule: 26 | interval: "weekly" 27 | day: "friday" 28 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Thanks for your contribution to [Apache Commons](https://commons.apache.org/)! Your help is appreciated! 21 | 22 | Before you push a pull request, review this list: 23 | 24 | - [ ] Read the [contribution guidelines](CONTRIBUTING.md) for this project. 25 | - [ ] Run a successful build using the default [Maven](https://maven.apache.org/) goal with `mvn`; that's `mvn` on the command line by itself. 26 | - [ ] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible but is a best-practice. 27 | - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. 28 | - [ ] Each commit in the pull request should have a meaningful subject line and body. Note that commits might be squashed by a maintainer on merge. 29 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: 'Dependency Review' 19 | on: [pull_request] 20 | 21 | permissions: 22 | contents: read 23 | 24 | jobs: 25 | dependency-review: 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: 'Checkout Repository' 29 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 30 | - name: 'Dependency Review PR' 31 | uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Maven build files 2 | target 3 | *.log 4 | maven-eclipse.xml 5 | build.properties 6 | site-content 7 | *~ 8 | 9 | # IntelliJ IDEA files 10 | .idea 11 | .iws 12 | *.iml 13 | *.ipr 14 | 15 | # Eclipse files 16 | .settings 17 | .classpath 18 | .project 19 | .externalToolBuilders 20 | .checkstyle 21 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 17 | The Apache code of conduct page is [https://www.apache.org/foundation/policies/conduct.html](https://www.apache.org/foundation/policies/conduct.html). 18 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Apache Commons Configuration 2 | Copyright 2001-2025 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (https://www.apache.org/). 6 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 17 | The Apache Commons security page is [https://commons.apache.org/security.html](https://commons.apache.org/security.html). 18 | -------------------------------------------------------------------------------- /src/conf/HEADER.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | -------------------------------------------------------------------------------- /src/conf/cpd-exclusions.txt: -------------------------------------------------------------------------------- 1 | org.apache.commons.configuration2.web.JakartaServletRequestConfiguration,org.apache.commons.configuration2.web.ServletRequestConfiguration 2 | -------------------------------------------------------------------------------- /src/main/assembly/bin.xml: -------------------------------------------------------------------------------- 1 | 17 | 20 | bin 21 | 22 | tar.gz 23 | zip 24 | 25 | ${artifactId}-${commons.release.version} 26 | 27 | 28 | 29 | LICENSE* 30 | NOTICE* 31 | RELEASE-NOTES* 32 | 33 | 34 | 35 | target 36 | 37 | 38 | *.jar 39 | 40 | 41 | 42 | target/site/apidocs 43 | apidocs 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/main/assembly/src.xml: -------------------------------------------------------------------------------- 1 | 17 | 20 | src 21 | 22 | tar.gz 23 | zip 24 | 25 | ${artifactId}-${commons.release.version}-src 26 | 27 | 28 | 29 | LICENSE* 30 | NOTICE* 31 | RELEASE-NOTES* 32 | pom.xml 33 | CONTRIBUTING.md 34 | README.md 35 | 36 | 37 | 38 | conf 39 | 40 | 41 | src 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/ConfigurationComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2; 19 | 20 | /** 21 | * Comparator for configurations interface. 22 | * 23 | * @since 1.0 24 | */ 25 | public interface ConfigurationComparator { 26 | /** 27 | * Compare two configuration objects. 28 | * 29 | * @param a the first configuration 30 | * @param b the second configuration 31 | * @return true if the two configurations are identical according to the implemented rules 32 | */ 33 | boolean compare(Configuration a, Configuration b); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/ConfigurationConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2; 19 | 20 | import org.apache.commons.configuration2.ex.ConfigurationException; 21 | 22 | /** 23 | * A Configuration task that may throw a ConfigurationException. 24 | * 25 | * @param the type of the input to the operation. 26 | * @since 2.6 27 | */ 28 | @FunctionalInterface 29 | public interface ConfigurationConsumer { 30 | 31 | /** 32 | * Performs this operation on the given argument. 33 | * 34 | * @param t the input argument 35 | * @throws ConfigurationException May be thrown while performing a Configuration operation. 36 | */ 37 | void accept(T t) throws ConfigurationException; 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/FileBasedConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2; 18 | 19 | import org.apache.commons.configuration2.io.FileBased; 20 | 21 | /** 22 | *

23 | * An interface which combines the {@code FileBased} and {@code Configuration} interfaces. 24 | *

25 | *

26 | * This interface is used to parameterize {@code ConfigurationBuilder} implementations which produce configurations read 27 | * from a {@code FileHandler}. 28 | *

29 | * 30 | * @since 2.0 31 | */ 32 | public interface FileBasedConfiguration extends FileBased, Configuration { 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/beanutils/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * In this package a {@code Configuration} implementation can be found that implements the {@code DynaBean} interface. 21 | * It allows to access or modify a configuration using the classes from the Commons Beanutils package. There are also 22 | * classes for declaring beans in configuration files, from which then instances can be created. 23 | *

24 | */ 25 | package org.apache.commons.configuration2.beanutils; 26 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/builder/combined/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * A package containing the implementation of the builder for combined configurations. 21 | *

22 | *

23 | * The {@code CombinedConfigurationBuilder} class defined in this package can create a {@code CombinedConfiguration} 24 | * object from various configuration sources that are declared in a so-called configuration definition file. 25 | * This is a convenient means to collect distributed configuration information and access them as a single logic source. 26 | *

27 | *

28 | * In addition, the {@code MultiFileConfigurationBuilder} class is located in this package. This builder class selects 29 | * one file-based configuration out of a set based on dynamic variable substitution. A typical use case would be the 30 | * definition of multiple configuration files for the different stages of a project: development, integration test, 31 | * production, etc. 32 | *

33 | */ 34 | package org.apache.commons.configuration2.builder.combined; 35 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/builder/fluent/CombinedBuilderParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.builder.fluent; 18 | 19 | import org.apache.commons.configuration2.builder.BasicBuilderProperties; 20 | import org.apache.commons.configuration2.builder.BuilderParameters; 21 | import org.apache.commons.configuration2.builder.combined.CombinedBuilderProperties; 22 | 23 | /** 24 | *

25 | * Definition of a parameters interface providing a fluent API for setting all properties of a builder for a combined 26 | * configuration. 27 | *

28 | *

29 | * Important note: This interface is not intended to be implemented by client code! It defines a set of 30 | * available properties and may be extended even in minor releases. 31 | *

32 | * 33 | * @since 2.0 34 | */ 35 | public interface CombinedBuilderParameters 36 | extends BasicBuilderProperties, CombinedBuilderProperties, BuilderParameters { 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/builder/fluent/DatabaseBuilderParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.builder.fluent; 18 | 19 | import org.apache.commons.configuration2.builder.BasicBuilderProperties; 20 | import org.apache.commons.configuration2.builder.BuilderParameters; 21 | import org.apache.commons.configuration2.builder.DatabaseBuilderProperties; 22 | 23 | /** 24 | *

25 | * Definition of a parameters interface providing a fluent API for setting all properties for a database configuration. 26 | *

27 | *

28 | * Important note: This interface is not intended to be implemented by client code! It defines a set of 29 | * available properties and may be extended even in minor releases. 30 | *

31 | * 32 | * @since 2.0 33 | */ 34 | public interface DatabaseBuilderParameters 35 | extends BasicBuilderProperties, DatabaseBuilderProperties, BuilderParameters { 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/builder/fluent/FileBasedBuilderParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.builder.fluent; 18 | 19 | import org.apache.commons.configuration2.builder.BasicBuilderProperties; 20 | import org.apache.commons.configuration2.builder.BuilderParameters; 21 | import org.apache.commons.configuration2.builder.FileBasedBuilderProperties; 22 | 23 | /** 24 | *

25 | * Definition of a parameters interface providing a fluent API for setting all properties of a configuration of a 26 | * file-based configuration builder. 27 | *

28 | *

29 | * Important note: This interface is not intended to be implemented by client code! It defines a set of 30 | * available properties and may be extended even in minor releases. 31 | *

32 | * 33 | * @since 2.0 34 | */ 35 | public interface FileBasedBuilderParameters 36 | extends BasicBuilderProperties, FileBasedBuilderProperties, BuilderParameters { 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/builder/fluent/JndiBuilderParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.builder.fluent; 18 | 19 | import org.apache.commons.configuration2.builder.BasicBuilderProperties; 20 | import org.apache.commons.configuration2.builder.BuilderParameters; 21 | import org.apache.commons.configuration2.builder.JndiBuilderProperties; 22 | 23 | /** 24 | *

25 | * Definition of a parameters interface providing a fluent API for setting all properties for a JNDI configuration. 26 | *

27 | *

28 | * Important note: This interface is not intended to be implemented by client code! It defines a set of 29 | * available properties and may be extended even in minor releases. 30 | *

31 | * 32 | * @since 2.0 33 | */ 34 | public interface JndiBuilderParameters extends BasicBuilderProperties, JndiBuilderProperties, BuilderParameters { 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/builder/fluent/MultiFileBuilderParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.builder.fluent; 18 | 19 | import org.apache.commons.configuration2.builder.BasicBuilderProperties; 20 | import org.apache.commons.configuration2.builder.BuilderParameters; 21 | import org.apache.commons.configuration2.builder.combined.MultiFileBuilderProperties; 22 | 23 | /** 24 | *

25 | * Definition of a parameters interface providing a fluent API for setting all properties of a builder managing multiple 26 | * file-based configurations. 27 | *

28 | *

29 | * Important note: This interface is not intended to be implemented by client code! It defines a set of 30 | * available properties and may be extended even in minor releases. 31 | *

32 | * 33 | * @since 2.0 34 | */ 35 | public interface MultiFileBuilderParameters 36 | extends BasicBuilderProperties, MultiFileBuilderProperties, BuilderParameters { 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/convert/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * This package contains interfaces and classes related to data type conversions. 21 | *

22 | *

23 | * An {@code AbstractConfiguration} object is associated with an object responsible for data type conversions. Each 24 | * conversion is done by this object. By replacing the default conversion handler by a custom version, client 25 | * applications can adapt and extend the type conversions available. 26 | *

27 | *

28 | * Related to data type conversion is also the topic of list delimiter parsing and splitting; before a string value can 29 | * be converted to a target data type, it must be clear whether it is to be interpreted as a single value or as a list 30 | * containing multiple values. In this package there are classes implementing different strategies for list delimiter 31 | * handling. Client code can choose the one which is most suitable for the current use case. 32 | *

33 | */ 34 | package org.apache.commons.configuration2.convert; 35 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/event/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * This package contains interfaces and classes for receiving notifications about changes at configurations. 21 | *

22 | */ 23 | package org.apache.commons.configuration2.event; 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/ex/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * This package contains all exception classes used by this library. 21 | *

22 | *

23 | * Commons Configuration defines a small number of exception classes. Because these classes are referenced by 24 | * multiple other packages, they are located in their own package to avoid cyclic dependencies. 25 | *

26 | */ 27 | package org.apache.commons.configuration2.ex; 28 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/interpol/DummyLookup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.interpol; 18 | 19 | /** 20 | *

21 | * A simple dummy {@code Lookup} implementation. 22 | *

23 | *

24 | * This implementation always returns null for a passed in variable indicating that it cannot resolve that 25 | * variable. This is useful for instance as an application of the null object pattern. 26 | *

27 | *

28 | * This class does not define any state, therefore a single instance can be shared. To enforce usage of only a single 29 | * instance this class is actually an enumeration. 30 | *

31 | * 32 | * @since 2.0 33 | */ 34 | public enum DummyLookup implements Lookup { 35 | /** The single instance of this class. */ 36 | INSTANCE; 37 | 38 | /** 39 | * {@inheritDoc} This implementation always returns null. 40 | */ 41 | @Override 42 | public Object lookup(final String variable) { 43 | return null; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/interpol/StringLookupAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.interpol; 18 | 19 | import java.util.Objects; 20 | 21 | import org.apache.commons.text.lookup.StringLookup; 22 | 23 | /** 24 | * Wraps an Apache Commons Text {@link StringLookup} as an Apache Commons Configuration {@link Lookup}. 25 | * 26 | * @since 2.4 27 | */ 28 | final class StringLookupAdapter implements Lookup { 29 | 30 | /** 31 | * The StringLookup delegate. 32 | */ 33 | private final StringLookup stringLookup; 34 | 35 | StringLookupAdapter(final StringLookup stringLookup) { 36 | this.stringLookup = Objects.requireNonNull(stringLookup, "stringLookup"); 37 | } 38 | 39 | @Override 40 | public Object lookup(final String key) { 41 | return stringLookup.lookup(key); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/interpol/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * A package with helper classes used for interpolation (variable substitution). 21 | *

22 | */ 23 | package org.apache.commons.configuration2.interpol; 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/io/VerifiableOutputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.io; 18 | 19 | import java.io.IOException; 20 | import java.io.OutputStream; 21 | 22 | /** 23 | * OutputStream that can be checked for errors after it is written to. 24 | * 25 | * @since 1.7 26 | */ 27 | public abstract class VerifiableOutputStream extends OutputStream { 28 | public abstract void verify() throws IOException; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/io/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * A package with classes related to I/O operations. 21 | *

22 | *

23 | * Most of the interfaces and classes contained in this package are related to file-based configurations. For instance, 24 | * the basic interfaces for reading and writing data or for managing a reference to a file are defined here. This 25 | * package also contains various strategy classes for locating files. They can be used to construct a location strategy 26 | * for the configuration sources of a specific application. 27 | *

28 | */ 29 | package org.apache.commons.configuration2.io; 30 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * The Configuration main package. It contains the definition of the {@code Configuration} interface and frequently used 21 | * implementations like {@code PropertiesConfiguration} (dealing with {@code .properties} files) or 22 | * {@code XMLConfiguration} that can load XML documents. 23 | *

24 | */ 25 | package org.apache.commons.configuration2; 26 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/plist/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * Configuration classes supporting NeXT / OpenStep /GNUStep style configuration. 21 | *

22 | */ 23 | package org.apache.commons.configuration2.plist; 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/reloading/ManagedReloadingDetectorMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2.reloading; 19 | 20 | /** 21 | * MBean definition for managing configuration reload. 22 | */ 23 | public interface ManagedReloadingDetectorMBean { 24 | /** 25 | * Management method to force configuration reload. 26 | */ 27 | void refresh(); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/reloading/ReloadingControllerSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.reloading; 18 | 19 | /** 20 | *

21 | * Definition of an interface to be implemented by components which support reloading operations managed by a 22 | * {@link ReloadingController}. 23 | *

24 | *

25 | * Classes implementing this interface have to provide access to a {@link ReloadingController} instance. This object can 26 | * then be used to trigger reloading checks. 27 | *

28 | * 29 | * @since 2.0 30 | */ 31 | public interface ReloadingControllerSupport { 32 | /** 33 | * Gets the {@code ReloadingController} associated with this object. 34 | * 35 | * @return the associated {@code ReloadingController} 36 | */ 37 | ReloadingController getReloadingController(); 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/reloading/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * This package contains classes and interfaces related to the reloading mechanism. 21 | *

22 | *

23 | * Using these classes it is possible to monitor configuration sources for external changes. When a change is detected 24 | * notifications are sent out. In collaboration with a configuration builder reloading can happen transparently 25 | * in background. 26 | *

27 | */ 28 | package org.apache.commons.configuration2.reloading; 29 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/resolver/EntityResolverSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.resolver; 18 | 19 | import org.xml.sax.EntityResolver; 20 | 21 | /** 22 | * Interface that identifies the class as using an EntityResolver 23 | * 24 | * @since 1.7 25 | */ 26 | public interface EntityResolverSupport { 27 | /** 28 | * Gets the EntityResolver associated with the class. 29 | * 30 | * @return The EntityResolver. 31 | */ 32 | EntityResolver getEntityResolver(); 33 | 34 | /** 35 | * Sets the EntityResolver to associate with this class. 36 | * 37 | * @param resolver The EntityResolver 38 | */ 39 | void setEntityResolver(EntityResolver resolver); 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/resolver/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * A package containing EntityResolvers. 21 | *

22 | */ 23 | package org.apache.commons.configuration2.resolver; 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/spring/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * A package containing integrations for the Spring Framework. 21 | *

22 | */ 23 | package org.apache.commons.configuration2.spring; 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/sync/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * A package containing interfaces and classes related to synchronization of configurations. 21 | *

22 | *

23 | * Whether a configuration object has to be thread-safe or not is application-specific. Therefore, this library allows 24 | * an application to adapt configuration objects to their requirements regarding thread-safety by assigning them 25 | * so-called {@code Synchronizer} objects. A configuration invokes its {@code Synchronizer} every time it is accessed 26 | * (in read or write mode). If configurations are not accessed concurrently by multiple threads, a simple dummy 27 | * {@code Synchronizer} can be used - this is also the default setting. To ensure thread-safety, a fully functional 28 | * implementation has to be set. 29 | *

30 | */ 31 | package org.apache.commons.configuration2.sync; 32 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModelSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.tree; 18 | 19 | /** 20 | *

21 | * A specialized version of the {@code NodeModelSupport} interface which allows querying an {@link InMemoryNodeModel}. 22 | *

23 | *

24 | * This interface is needed by some special node model implementations used by in-memory configurations. Such 25 | * implementations require the extended capabilities of an {@code InMemoryNodeModel}. 26 | *

27 | * 28 | * @since 2.0 29 | */ 30 | public interface InMemoryNodeModelSupport extends NodeModelSupport { 31 | /** 32 | * {@inheritDoc} This variant specializes the return type to {@code InMemoryNodeModel}. 33 | */ 34 | @Override 35 | InMemoryNodeModel getNodeModel(); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/tree/NodeModelSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.tree; 18 | 19 | /** 20 | *

21 | * An interface to be implemented by objects that support a {@link NodeModel}. 22 | *

23 | *

24 | * This interface defines a single method for querying a {@code NodeModel}. 25 | *

26 | * 27 | * @param the type of the supported {@code NodeModel} 28 | * @since 2.0 29 | */ 30 | public interface NodeModelSupport { 31 | /** 32 | * Gets the {@code NodeModel} supported by this object. 33 | * 34 | * @return the {@code NodeModel} 35 | */ 36 | NodeModel getNodeModel(); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/tree/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * A package with helper and utility classes used by hierarchical configurations. 21 | *

22 | */ 23 | package org.apache.commons.configuration2.tree; 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/tree/xpath/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * This package contains the {@code XPathExpressionEngine} class which enables XPATH support for querying configuration 21 | * properties. 22 | *

23 | */ 24 | package org.apache.commons.configuration2.tree.xpath; 25 | -------------------------------------------------------------------------------- /src/main/java/org/apache/commons/configuration2/web/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | *

20 | * This package contains some implementations of the {@code Configuration} interface that are useful in web 21 | * environments. 22 | *

23 | */ 24 | package org.apache.commons.configuration2.web; 25 | -------------------------------------------------------------------------------- /src/main/resources/properties.dtd: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/site/resources/download_configuration.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Just call the standard mirrors.cgi script. It will use download.html 3 | # as the input template. 4 | exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* -------------------------------------------------------------------------------- /src/site/resources/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/commons-configuration/c0b578ae34d6b030ef8f39879cca023a2d705491/src/site/resources/images/logo.png -------------------------------------------------------------------------------- /src/site/resources/images/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/commons-configuration/c0b578ae34d6b030ef8f39879cca023a2d705491/src/site/resources/images/logo.xcf -------------------------------------------------------------------------------- /src/site/resources/profile.jacoco: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ----------------------------------------------------------------------------- 16 | # 17 | # Empty file used to automatically trigger JaCoCo profile from commons parent pom 18 | -------------------------------------------------------------------------------- /src/site/resources/profile.japicmp: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ----------------------------------------------------------------------------- 16 | # 17 | # Empty file used to automatically trigger japicmp profile from commons parent pom -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/EnumFixture.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2; 19 | 20 | public enum EnumFixture { 21 | 22 | JAVA, SMALLTALK, SCALA 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/TestEqualsProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2; 19 | 20 | import static org.junit.jupiter.api.Assertions.assertEquals; 21 | 22 | import org.apache.commons.configuration2.io.FileHandler; 23 | import org.junit.jupiter.api.Test; 24 | 25 | /** 26 | * test if properties that contain a "=" will be loaded correctly. 27 | */ 28 | public class TestEqualsProperty { 29 | /** The File that we test with */ 30 | private final String testProperties = ConfigurationAssert.getTestFile("test.properties").getAbsolutePath(); 31 | 32 | @Test 33 | public void testEquals() throws Exception { 34 | final PropertiesConfiguration conf = new PropertiesConfiguration(); 35 | final FileHandler handler = new FileHandler(conf); 36 | handler.setFileName(testProperties); 37 | handler.load(); 38 | 39 | final String equals = conf.getString("test.equals"); 40 | assertEquals("value=one", equals); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/TestNonStringProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2; 19 | 20 | import org.apache.commons.configuration2.io.FileHandler; 21 | import org.junit.jupiter.api.BeforeEach; 22 | 23 | /** 24 | * Test if non-string properties are handled correctly. 25 | */ 26 | public class TestNonStringProperties extends BaseNonStringProperties { 27 | /** The File that we test with */ 28 | private final String testProperties = ConfigurationAssert.getTestFile("test.properties").getAbsolutePath(); 29 | 30 | @BeforeEach 31 | public void setUp() throws Exception { 32 | final PropertiesConfiguration c = new PropertiesConfiguration(); 33 | final FileHandler handler = new FileHandler(c); 34 | handler.setFileName(testProperties); 35 | handler.load(); 36 | conf = c; 37 | nonStringTestHolder.setConfiguration(conf); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/TestPatternSubtreeConfigurationWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2; 19 | 20 | import static org.junit.jupiter.api.Assertions.assertThrows; 21 | 22 | import org.junit.jupiter.api.Test; 23 | 24 | /** 25 | */ 26 | public class TestPatternSubtreeConfigurationWrapper { 27 | /** 28 | * Tests a read operation if the wrapped configuration does not implement FileBased. 29 | */ 30 | @Test 31 | public void testReadNotFileBased() { 32 | assertThrows(NullPointerException.class, () -> { 33 | new PatternSubtreeConfigurationWrapper(null, ""); 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/beanutils/BeanCreationTestBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.beanutils; 18 | 19 | /** 20 | * A simple bean class used for testing bean creation operations. 21 | */ 22 | public class BeanCreationTestBean { 23 | private String stringValue; 24 | 25 | private int intValue; 26 | 27 | private BeanCreationTestBean buddy; 28 | 29 | public BeanCreationTestBean getBuddy() { 30 | return buddy; 31 | } 32 | 33 | public int getIntValue() { 34 | return intValue; 35 | } 36 | 37 | public String getStringValue() { 38 | return stringValue; 39 | } 40 | 41 | public void setBuddy(final BeanCreationTestBean buddy) { 42 | this.buddy = buddy; 43 | } 44 | 45 | public void setIntValue(final int intValue) { 46 | this.intValue = intValue; 47 | } 48 | 49 | public void setStringValue(final String stringValue) { 50 | this.stringValue = stringValue; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/beanutils/BeanCreationTestCtorBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.beanutils; 18 | 19 | /** 20 | * Another test bean class for bean creation operations which defines some constructors. 21 | */ 22 | public class BeanCreationTestCtorBean extends BeanCreationTestBean { 23 | public BeanCreationTestCtorBean() { 24 | } 25 | 26 | public BeanCreationTestCtorBean(final BeanCreationTestBean buddy) { 27 | setBuddy(buddy); 28 | } 29 | 30 | public BeanCreationTestCtorBean(final String s) { 31 | setStringValue(s); 32 | } 33 | 34 | public BeanCreationTestCtorBean(final String s, final int i) { 35 | this(s); 36 | setIntValue(i); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBeanXMLConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.commons.configuration2.beanutils; 19 | 20 | import org.apache.commons.configuration2.Configuration; 21 | import org.apache.commons.configuration2.XMLConfiguration; 22 | 23 | /** 24 | * An additional test class for ConfigurationDynaBean. This test class performs the same tests as the default test 25 | * class, but uses a XMLConfiguration as underlying configuration object. 26 | */ 27 | public class TestConfigurationDynaBeanXMLConfig extends TestConfigurationDynaBean { 28 | /** 29 | * Creates the underlying configuration object. This implementation will create a XMLConfiguration. 30 | * 31 | * @return the underlying configuration 32 | */ 33 | @Override 34 | protected Configuration createConfiguration() { 35 | return new XMLConfiguration(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/event/TestEventType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.event; 18 | 19 | import static org.junit.jupiter.api.Assertions.assertEquals; 20 | 21 | import org.junit.jupiter.api.BeforeEach; 22 | import org.junit.jupiter.api.Test; 23 | 24 | /** 25 | * Test class for {@code EventType}. 26 | */ 27 | public class TestEventType { 28 | /** The event type to be tested. */ 29 | private EventType eventType; 30 | 31 | @BeforeEach 32 | public void setUp() throws Exception { 33 | eventType = new EventType<>(null, "TEST"); 34 | } 35 | 36 | /** 37 | * Tests the string representation. 38 | */ 39 | @Test 40 | public void testToString() { 41 | final String s = eventType.toString(); 42 | assertEquals("EventType [ TEST ]", s); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/event/TestMapConfigurationEvents.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.event; 18 | 19 | import java.util.HashMap; 20 | 21 | import org.apache.commons.configuration2.AbstractConfiguration; 22 | import org.apache.commons.configuration2.MapConfiguration; 23 | 24 | /** 25 | * Test class for the events generated by MapConfiguration. 26 | */ 27 | public class TestMapConfigurationEvents extends AbstractTestConfigurationEvents { 28 | @Override 29 | protected AbstractConfiguration createConfiguration() { 30 | return new MapConfiguration(new HashMap<>()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/event/TestPropertiesConfigurationEvents.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.event; 18 | 19 | import org.apache.commons.configuration2.AbstractConfiguration; 20 | import org.apache.commons.configuration2.PropertiesConfiguration; 21 | 22 | /** 23 | * Test class for the events generated by properties configurations. This class also tests reload events. 24 | */ 25 | public class TestPropertiesConfigurationEvents extends AbstractTestConfigurationEvents { 26 | @Override 27 | protected AbstractConfiguration createConfiguration() { 28 | return new PropertiesConfiguration(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/event/TestSubsetConfigurationEvents.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.event; 18 | 19 | import java.util.HashMap; 20 | 21 | import org.apache.commons.configuration2.AbstractConfiguration; 22 | import org.apache.commons.configuration2.MapConfiguration; 23 | import org.apache.commons.configuration2.SubsetConfiguration; 24 | 25 | /** 26 | * Test class for the events generated by SubsetConfiguration. 27 | */ 28 | public class TestSubsetConfigurationEvents extends AbstractTestConfigurationEvents { 29 | @Override 30 | protected AbstractConfiguration createConfiguration() { 31 | return (SubsetConfiguration) new MapConfiguration(new HashMap<>()).subset("test"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/event/TestXMLConfigurationEvents.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.event; 18 | 19 | import org.apache.commons.configuration2.AbstractConfiguration; 20 | import org.apache.commons.configuration2.XMLConfiguration; 21 | 22 | /** 23 | * Test class for events generated by XMLConfiguration. 24 | */ 25 | public class TestXMLConfigurationEvents extends TestHierarchicalConfigurationEvents { 26 | @Override 27 | protected AbstractConfiguration createConfiguration() { 28 | return new XMLConfiguration(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/interpol/TestDummyLookup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.interpol; 18 | 19 | import static org.junit.jupiter.api.Assertions.assertNull; 20 | 21 | import org.junit.jupiter.api.Test; 22 | 23 | /** 24 | * Test class for {@code DummyLookup}. 25 | */ 26 | public class TestDummyLookup { 27 | /** 28 | * Tests the lookup() method. 29 | */ 30 | @Test 31 | public void testLookup() { 32 | assertNull(DummyLookup.INSTANCE.lookup("someVariable")); 33 | assertNull(DummyLookup.INSTANCE.lookup(null)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/reloading/AlwaysReloadingDetector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.reloading; 18 | 19 | /** 20 | * A reloading detector implementation which always indicates that a reload is required. This is used by some test 21 | * classes. 22 | */ 23 | public class AlwaysReloadingDetector implements ReloadingDetector { 24 | /** 25 | * {@inheritDoc} This implementation always returns true. 26 | */ 27 | @Override 28 | public boolean isReloadingRequired() { 29 | return true; 30 | } 31 | 32 | /** 33 | * Empty dummy implementation of this interface method. 34 | */ 35 | @Override 36 | public void reloadingPerformed() { 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/reloading/RandomReloadingDetector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.reloading; 18 | 19 | import java.util.Random; 20 | 21 | /** 22 | * An implementation of {@code ReloadingDetector} which randomly returns true or false. 23 | */ 24 | public class RandomReloadingDetector implements ReloadingDetector { 25 | /** The random object. */ 26 | private final Random random = new Random(); 27 | 28 | @Override 29 | public boolean isReloadingRequired() { 30 | return random.nextBoolean(); 31 | } 32 | 33 | @Override 34 | public void reloadingPerformed() { 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/org/apache/commons/configuration2/tree/TestTreeData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.configuration2.tree; 18 | 19 | /** 20 | * Test class for {@code TreeData} 21 | */ 22 | public class TestTreeData extends AbstractImmutableNodeHandlerTest { 23 | /** 24 | * {@inheritDoc} This implementation creates a TreeData object initialized with the given root node. 25 | */ 26 | @Override 27 | protected NodeHandler createHandler(final ImmutableNode root) { 28 | final InMemoryNodeModel model = new InMemoryNodeModel(root); 29 | return model.getTreeData(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/resources/01/testMultiConfiguration_1001.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | #808080 21 | #000000 22 |
#008000
23 | 24 | ${colors.header} 25 |
26 | 15 27 | 28 | OK,Cancel,Help 29 | 30 | 31 | 32 | 33 | My Channel 34 | 35 | 36 | more test 2 data 37 | 38 | 39 |
40 | -------------------------------------------------------------------------------- /src/test/resources/catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 22 | 24 | 25 | -------------------------------------------------------------------------------- /src/test/resources/catalog2.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 22 | 24 | 26 | -------------------------------------------------------------------------------- /src/test/resources/config/deep/deepinclude.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | deepinclude=true 16 | -------------------------------------------------------------------------------- /src/test/resources/config/deep/deeptest.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include=deepinclude.properties 16 | 17 | deeptest=true 18 | -------------------------------------------------------------------------------- /src/test/resources/config/deep/deeptestinvalid.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Tries to include a non existing file 17 | include=nonexisting.properties 18 | 19 | deeptestinvalid=true 20 | -------------------------------------------------------------------------------- /src/test/resources/config/deep/test.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | somekey=somevalue -------------------------------------------------------------------------------- /src/test/resources/config/deep/testEqualDeep.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | property.a = a 16 | property.b = b 17 | property.c = 100 18 | 19 | # 20 | # Value set twice 21 | property.a = aa 22 | 23 | clear.property = delete me 24 | 25 | existing.property = i exist 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/config/deep/testFileFromClasspath.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/config/test.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | boolean=true 16 | overwrite=80 17 | key=jndivalue 18 | key2=jndivalue2 19 | jndi=only_jndi 20 | byte=10 21 | double=10.25 22 | float=20.25 23 | integer=10 24 | long=1000000 25 | short=1 -------------------------------------------------------------------------------- /src/test/resources/config/testMultiInclude.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | top = topValue 17 | include = ../include.properties 18 | include = ../testEqual.properties 19 | -------------------------------------------------------------------------------- /src/test/resources/configA.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/configB.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | test 19 | -------------------------------------------------------------------------------- /src/test/resources/include-cyclical-back-to-root.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = src/test/resources/include-cyclical-root.properties 16 | keyA = valueA 17 | -------------------------------------------------------------------------------- /src/test/resources/include-cyclical-reference.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = src/test/resources/include-cyclical-reference.properties 16 | keyA = valueA 17 | -------------------------------------------------------------------------------- /src/test/resources/include-cyclical-root.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = src/test/resources/include-cyclical-step.properties 16 | keyA = valueA 17 | -------------------------------------------------------------------------------- /src/test/resources/include-cyclical-step.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = src/test/resources/include-cyclical-back-to-root.properties 16 | keyA = valueA 17 | -------------------------------------------------------------------------------- /src/test/resources/include-include-cyclical-reference.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = src/test/resources/include-cyclical-reference.properties 16 | keyA = valueA 17 | -------------------------------------------------------------------------------- /src/test/resources/include-include-not-found.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = include-not-found.properties 16 | keyB = valueB 17 | -------------------------------------------------------------------------------- /src/test/resources/include-interpol.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include.interpol.loaded = true 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/include-load-exception.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = http://this-file-does-not-and-should-not-exist.txt 16 | keyA = valueA 17 | -------------------------------------------------------------------------------- /src/test/resources/include-not-found.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include = this-file-does-not-and-should-not-exist.txt 16 | keyA = valueA 17 | -------------------------------------------------------------------------------- /src/test/resources/include.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | include.loaded = true 16 | 17 | packages = packageb, packagec 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/includeoptional-target.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | includeoptional.loaded = true 16 | -------------------------------------------------------------------------------- /src/test/resources/includeoptional.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | includeoptional = this-file-does-not-and-should-not-exist.txt 16 | includeoptional = includeoptional-target.properties 17 | -------------------------------------------------------------------------------- /src/test/resources/jndi.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | java.naming.factory.initial=org.osjava.jndi.PropertiesFactory 16 | org.osjava.jndi.root=classpath://config 17 | org.osjava.jndi.delimiter=/ 18 | -------------------------------------------------------------------------------- /src/test/resources/log4j-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/commons/configuration2/test.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/commons-configuration/c0b578ae34d6b030ef8f39879cca023a2d705491/src/test/resources/org/apache/commons/configuration2/test.jar -------------------------------------------------------------------------------- /src/test/resources/resolver.dtd: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/resources/sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 555121211 23 | John Doe 24 | 1975-05-15 25 | Exempt 26 | 100000 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/sample.xsd: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/test/resources/sample_1001.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | Jane Doe 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/test-configuration-848.json: -------------------------------------------------------------------------------- 1 | { 2 | "key1": "value1", 3 | "key2": { 4 | "key3": "value23" 5 | }, 6 | "key4": { 7 | "key5": [ 8 | "col1", 9 | "col2" 10 | ] 11 | }, 12 | "very": { 13 | "nested": { 14 | "properties": [ 15 | "nested1", 16 | "nested2", 17 | "nested3" 18 | ] 19 | } 20 | }, 21 | "int1": 37, 22 | "martin": { 23 | "name": "Martin D'vloper", 24 | "job": "Developer", 25 | "skill": "Elite" 26 | }, 27 | "capitals": [ 28 | { 29 | "country": "USA", 30 | "capital": "Washington" 31 | }, 32 | { 33 | "country": "UK", 34 | "capital": "London" 35 | } 36 | ], 37 | "books": [ 38 | { 39 | "details": { 40 | "title": "No Longer Human", 41 | "author": "Osamu Dazai" 42 | } 43 | }, 44 | { 45 | "details": { 46 | "title": "White Nights", 47 | "author": "Fyodor Dostoevsky" 48 | } 49 | } 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /src/test/resources/test.ini: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ; Test ini file to be included by a configuration definition 16 | [testini] 17 | loaded=yes 18 | -------------------------------------------------------------------------------- /src/test/resources/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "key1": "value1", 3 | "key2": { 4 | "key3": "value23" 5 | }, 6 | "key4": { 7 | "key5": [ 8 | "col1", 9 | "col2" 10 | ] 11 | }, 12 | "very": { 13 | "nested": { 14 | "properties": [ 15 | "nested1", 16 | "nested2", 17 | "nested3" 18 | ] 19 | } 20 | }, 21 | "int1": 37, 22 | "martin": { 23 | "name": "Martin D'vloper", 24 | "job": "Developer", 25 | "skill": "Elite" 26 | }, 27 | "capitals": [ 28 | { 29 | "country": "USA", 30 | "capital": "Washington" 31 | }, 32 | { 33 | "country": "UK", 34 | "capital": "London" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /src/test/resources/test.plist: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | { 18 | simple-string = string1; 19 | quoted-string = "string2"; 20 | quoted-string2 = "this is a string"; 21 | "complex-string" = "this is a \"complex\" string {(=,;)}"; 22 | 23 | // This is a test single-line comment 24 | array = ( "value1", "value2", "value3" ); 25 | 26 | empty-array = (); 27 | 28 | nested-arrays = ( (a , b) , (c, d) ); 29 | 30 | dictionary-array = 31 | ( 32 | { foo = bar }, 33 | { key = value } 34 | ) 35 | 36 | dictionary = 37 | { 38 | foo1 = bar1; 39 | foo2 = bar2; 40 | } 41 | 42 | empty-dictionary = { }; 43 | 44 | nested-dictionaries = 45 | { 46 | foo = 47 | { 48 | bar = 49 | { 50 | "key" = "value"; 51 | } 52 | } 53 | } 54 | 55 | date = <*D2002-03-22 11:30:00 +0100>; 56 | 57 | data = <666F6f 20 626172>; 58 | 59 | empty-data = < >; 60 | } 61 | -------------------------------------------------------------------------------- /src/test/resources/test.properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | Description of the property list 21 | value1 22 | value2 23 | value3 24 | 25 | -------------------------------------------------------------------------------- /src/test/resources/test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | key1: 3 | value1 4 | 5 | key2: 6 | key3: value23 7 | 8 | key4: 9 | key5: 10 | - col1 11 | - col2 12 | 13 | very: 14 | nested: 15 | properties: 16 | - nested1 17 | - nested2 18 | - nested3 19 | 20 | int1: 21 | 37 22 | 23 | martin: 24 | name: Martin D'vloper 25 | job: Developer 26 | skill: Elite 27 | 28 | key5: 29 | example: [ '', '', value] -------------------------------------------------------------------------------- /src/test/resources/test2.plist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | http://www.google.com/search?hl=en&client=safari&rls=en&q=RFC822MessageDatasPboardType&btnG=Search&aq=f&oq=&aqi= 23 | 24 | 25 | RFC822MessageDatasPboardType - Google Search 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/test/resources/test2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | configuration.loaded = true 16 | 17 | packages = override.packages 18 | propertyInOrder=test2.properties 19 | 20 | 21 | # 22 | # Other test properties 23 | # 24 | 25 | test.equals = value=one 26 | 27 | test.empty= 28 | 29 | # 30 | # Non String Properties 31 | # 32 | 33 | test.boolean = true 34 | test.boolean.array = false 35 | test.boolean.array = true 36 | 37 | test.byte = 10 38 | test.byte.array = 20 39 | test.byte.array = 30 40 | 41 | test.double = 10.25 42 | test.double.array = 20.35 43 | test.double.array = 30.45 44 | 45 | test.float = 20.25 46 | test.float.array = 30.35 47 | test.float.array = 40.45 48 | 49 | test.integer = 10 50 | test.integer.array = 20 51 | test.integer.array = 30 52 | 53 | test.long = 1000000 54 | test.long.array = 2000000 55 | test.long.array = 3000000 56 | 57 | test.short = 1 58 | test.short.array = 2 59 | test.short.array = 3 60 | -------------------------------------------------------------------------------- /src/test/resources/testCCCombinedChildBuilder.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 22 | 23 | 24 |
25 | 26 | 27 |
28 | 30 | 31 | -------------------------------------------------------------------------------- /src/test/resources/testCCCustomProvider.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 |
21 | 22 | 25 | 26 |
27 | 28 |
-------------------------------------------------------------------------------- /src/test/resources/testCCEntityResolver.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 |
24 | 26 |
27 | 28 |
29 | -------------------------------------------------------------------------------- /src/test/resources/testCCEnvProperties.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/testCCFileSystem.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 |
24 | 26 |
27 | 28 |
29 | -------------------------------------------------------------------------------- /src/test/resources/testCCFileSystemSubConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 |
24 | 26 |
27 | 28 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /src/test/resources/testCCLookup.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 22 | 23 |
24 | 25 | 27 | 28 |
29 | 30 | 31 | 32 | --> 33 | 34 | 35 |
-------------------------------------------------------------------------------- /src/test/resources/testCCMultiTenentReloading.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 |
23 | 25 | 26 |
27 | 28 | 31 | 32 |
-------------------------------------------------------------------------------- /src/test/resources/testCCReloading.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/testCCReloadingNested.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 | 25 | 26 | -------------------------------------------------------------------------------- /src/test/resources/testCCResultClass.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 |
24 | 26 | 27 | 28 |
29 | 30 |
31 | -------------------------------------------------------------------------------- /src/test/resources/testCCSystemProperties.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/test/resources/testChildNamespace.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/commons-configuration/c0b578ae34d6b030ef8f39879cca023a2d705491/src/test/resources/testChildNamespace.xml -------------------------------------------------------------------------------- /src/test/resources/testClasspath.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | configuration.loaded = true 16 | 17 | packages = packagea 18 | 19 | include = include.properties 20 | 21 | # 22 | # Other test properties 23 | # 24 | 25 | test.equals = value=one 26 | 27 | test.empty= 28 | 29 | # 30 | # Test a property that uses a previous property 31 | # 32 | base=base 33 | base.reference=${base}extra 34 | 35 | # 36 | # Non String Properties 37 | # 38 | 39 | test.boolean = true 40 | test.boolean.array = false 41 | test.boolean.array = true 42 | 43 | test.byte = 10 44 | test.byte.array = 20 45 | test.byte.array = 30 46 | 47 | test.double = 10.25 48 | test.double.array = 20.35 49 | test.double.array = 30.45 50 | 51 | test.float = 20.25 52 | test.float.array = 30.35 53 | test.float.array = 40.45 54 | 55 | test.integer = 10 56 | test.integer.array = 20 57 | test.integer.array = 30 58 | 59 | test.long = 1000000 60 | test.long.array = 2000000 61 | test.long.array = 3000000 62 | 63 | test.short = 1 64 | test.short.array = 2 65 | test.short.array = 3 66 | 67 | test.overwrite = 1 -------------------------------------------------------------------------------- /src/test/resources/testConfigurationFactoryBean.file: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | robin=hood 17 | java=duke 18 | -------------------------------------------------------------------------------- /src/test/resources/testConfigurationXMLDocument.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterBadXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfiguration.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfiguration2.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfiguration3.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationBasePath.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationInclude1.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | tasks 22 | 23 | 24 | taskid 25 | long 26 | 27 | 28 | name 29 | java.lang.String 30 | 31 | 32 | description 33 | java.lang.String 34 | 35 | 36 | responsibleID 37 | long 38 | 39 | 40 | creatorID 41 | long 42 | 43 | 44 | startDate 45 | java.util.Date 46 | 47 | 48 | endDate 49 | java.util.Date 50 | 51 | 52 |
53 |
-------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationInclude2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Properties for Email configuration 17 | 18 | host.smtp = smtp.mydomain.org 19 | host.pop = pop3.mydomain.org 20 | account.user = postmaster 21 | account.psswd = secret 22 | account.type = pop3 23 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationNamespaceAware.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationOverwrite.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Properties for Email configuration 17 | 18 | mail.account.user = masterOfPost 19 | mail.account.psswd = topsecret 20 | 21 | test.configuration = enhanced factory 22 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationReverseOrder.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationSysProps.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterConfigurationWithProps.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterCreateObject.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterOptionalConfiguration.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/test/resources/testDigesterOptionalConfigurationEx.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/testDtd.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | value1 22 | value2 23 | -------------------------------------------------------------------------------- /src/test/resources/testDtdPublic.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 23 | 24 | value 25 | 26 | -------------------------------------------------------------------------------- /src/test/resources/testEncoding.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/commons-configuration/c0b578ae34d6b030ef8f39879cca023a2d705491/src/test/resources/testEncoding.xml -------------------------------------------------------------------------------- /src/test/resources/testEqual.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | property.a = a 16 | property.b = b 17 | property.c = 100 18 | 19 | # 20 | # Value set twice 21 | property.a = aa 22 | 23 | clear.property = delete me 24 | 25 | existing.property = i exist 26 | 27 | -------------------------------------------------------------------------------- /src/test/resources/testEqualDigester.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/testFactoryPropertiesInclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/test/resources/testHierarchicalXMLConfiguration2.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | Case1Text 24 | 25 | 26 | 27 | 28 | 29 | Case2Text 30 | 31 | 32 | 33 | 34 | 37 | 38 | 39 | 40 | 41 | 42 | Case4Text 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/test/resources/testInterpolation.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # A test configuration file for testing variable substitution across multiple 17 | # configuration sources created by a DefaultConfigurationBuilder. 18 | # This properties configuration defines a property which is referenced by 19 | # another configuration source. 20 | myvar=abc 21 | testXmlFile=testInterpolation.xml 22 | 23 | -------------------------------------------------------------------------------- /src/test/resources/testInterpolation.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 25 | 26 | 27 | 28 | ${myvar}-product 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/test/resources/testInterpolationBuilder.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_1001.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | #808080 21 | #000000 22 |
#008000
23 | 24 | ${colors.header} 25 |
26 | 15 27 | 28 | OK,Cancel,Help 29 | 30 | 31 | 32 | 33 | My Channel 34 | 35 | 36 | more test 2 data 37 | 38 | 39 |
40 | -------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_1002.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | #2222222 21 | #000000 22 |
#222222
23 | 24 | ${colors.header3} 25 |
26 | 25 27 | 28 | OK-2,Cancel-2,Help-2 29 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_1003.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | #333333 21 | #FFFFFF 22 |
#333333
23 | 24 | ${colors.header3} 25 |
26 | 35 27 | 28 | OK-3,Cancel-3,Help-3 29 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_1004.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | ${colors.header4} 21 | 22 | 23 | OK-1,Cancel-2,Help-3 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_2001.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | This will throw a schema exception 23 | 24 | 25 | OK-1,Cancel-2,Help-3 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_2002.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | #2222222 23 | #000000 24 |
#222222
25 | 26 | ${colors.header3} 27 |
28 | 25 29 | 30 | OK-2,Cancel-2,Help-2 31 | 32 | 33 |
-------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_3001.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | #808080 22 | #000000 23 |
#008000
24 | 25 | ${colors.header} 26 |
27 | 15 28 | 29 | OK,Cancel,Help 30 | 31 | 32 | 33 | 34 | My Channel 35 | 36 | 37 | more test 2 data 38 | 39 | 40 |
41 | -------------------------------------------------------------------------------- /src/test/resources/testMultiConfiguration_3002.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | #2222222 22 | #000000 23 |
#222222
24 | 25 | ${colors.header3} 26 |
27 | 25 28 | 29 | OK-2,Cancel-2,Help-2 30 | 31 | 32 |
33 | -------------------------------------------------------------------------------- /src/test/resources/testResolver.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/testRootNamespace.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/commons-configuration/c0b578ae34d6b030ef8f39879cca023a2d705491/src/test/resources/testRootNamespace.xml -------------------------------------------------------------------------------- /src/test/resources/testSequence.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | prefix.Fa.postfix=value.Fa 16 | prefix.Po.postfix=value.Po 17 | prefix.Ru.postfix=value.Ru 18 | prefix.Se.postfix=value.Se 19 | prefix.As.postfix=value.As 20 | prefix.Gl.postfix=value.Gl 21 | prefix.Pu.postfix=value.Pu 22 | prefix.Te.postfix=value.Te 23 | prefix.Ve.postfix=value.Ve 24 | -------------------------------------------------------------------------------- /src/test/resources/testSequenceDigester.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/resources/testSystemProperties.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
26 | 27 | 29 | 31 | 32 |
-------------------------------------------------------------------------------- /src/test/resources/testValidateInvalid.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | ]> 35 | 36 | 37 | customers 38 | 39 | 40 | custID 41 | java.lang.Long 42 | 43 | 44 | custName 45 | 46 | 47 |
48 |
-------------------------------------------------------------------------------- /src/test/resources/testValidateValid.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ]> 31 | 32 | 33 | 34 | customers 35 | 36 | 37 | custID 38 | java.lang.Long 39 | 40 | 41 | custName 42 | java.lang.String 43 | 44 | 45 |
46 |
-------------------------------------------------------------------------------- /src/test/resources/testValidation.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 30 | 31 | 32 |
-------------------------------------------------------------------------------- /src/test/resources/testValidation2.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 30 | 31 | 32 |
-------------------------------------------------------------------------------- /src/test/resources/test_invalid_date.plist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 22 | 23 | 24 | string 25 | value1 26 | 27 | date 28 | not a valid date 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/test/resources/threesome.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | test.threesome.one = aaa 16 | test.threesome.one = bbb, ccc 17 | 18 | test.threesome.two = aaa, bbb, ccc 19 | 20 | test.threesome.three = aaa 21 | test.threesome.three = bbb 22 | test.threesome.three = ccc 23 | --------------------------------------------------------------------------------