This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
The following commit(s) were added to refs/heads/master by this push: new 7a93bea Document "includeOptional" on the site. 7a93bea is described below commit 7a93beaa3e006fd97f8bed6c4aa8189aa8fa977f Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Thu Jul 18 09:27:19 2019 -0400 Document "includeOptional" on the site. --- src/changes/changes.xml | 5 +++- src/site/xdoc/userguide/howto_properties.xml | 37 ++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 80a9197..96df9b4 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -36,9 +36,12 @@ <action dev="ggregory" type="update" issue="CONFIGURATION-752" due-to="Gary Gregory"> Update Apache Commons VFS from 2.3 to 2.4. </action> - <action dev="ggregory" type="update" due-to="Gary Gregory"> + <action dev="ggregory" type="fix" due-to="Gary Gregory"> Fix Javadoc for org.apache.commons.configuration2.PropertiesConfiguration.getIncludeOptional(). </action> + <action dev="ggregory" type="add" due-to="Gary Gregory"> + Document "includeOptional" on the site. + </action> </release> <release version="2.5" date="2019-05-23" description="Minor release with new features and updated dependencies."> diff --git a/src/site/xdoc/userguide/howto_properties.xml b/src/site/xdoc/userguide/howto_properties.xml index a4200cb..4461b16 100644 --- a/src/site/xdoc/userguide/howto_properties.xml +++ b/src/site/xdoc/userguide/howto_properties.xml @@ -94,8 +94,14 @@ Dimension size = new Dimension(config.getInt("window.width"), <subsection name="Includes"> <p> If a property is named "<code>include</code>", and the value of that property is the - name of a file on the disk, that file will be included into the configuration. Here is - an example: + name of a file on the disk, that file will be included into the configuration. + </p> + <p> + The difference between "<code>include</code>" and "<code>includeOptional</code>" (below) is that if the file value + is absent, processing continues with "<code>includeOptional</code>" but stops with "<code>include</code>". + </p> + <p> + For example: </p> <source> # usergui.properties @@ -112,6 +118,33 @@ colors.background = #FFFFFF </subsection> + <subsection name="Oprional Includes"> + <p> + If a property is named "<code>includeOptional</code>", and the value of that property is the + name of a file on the disk, that file will be included into the configuration. + </p> + <p> + The difference between "<code>include</code>" (above) and "<code>includeOptional</code>" is that if the file value + is absent, processing continues with "<code>includeOptional</code>" but stops with "<code>include</code>". + </p> + <p> + For example: + </p> +<source> +# usergui.properties + +includeOptional = colors.properties +includeOptional = sizes.properties +</source> + +<source> +# colors.properties + +colors.background = #FFFFFF +</source> + + </subsection> + <subsection name="Lists and arrays"> <p> As was already pointed out in the section