commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <>
Subject [jira] [Resolved] (CONFIGURATION-595) need optional include without exception
Date Fri, 27 May 2016 18:48:12 GMT


Oliver Heger resolved CONFIGURATION-595.
    Resolution: Won't Fix

...according to the comments for this ticket.

> need optional include without exception
> ---------------------------------------
>                 Key: CONFIGURATION-595
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: Expression engine
>    Affects Versions: 2.x, 1.10
>            Reporter: ryenus
> I'm trying to include a server local properties file during initialization of a distributed
> The file to be included might not exist on some of the servers, and this should be fine
in terms of our application logic.
> But this is not possible with commons configuration, inside org.apache.commons.configuration.PropertiesConfiguration.loadIncludeFile(String),
when an included file doesn't exist, namely the resolved url would be null, it always throws
a ConfigurationException. 
> See:
> This might be good to ensure configuration integrity, but looking around, for bash, ~/.bashrc
is optional, for maven, ~/.m2/settings.xml is optional, I wish there could be a way to do
the same in commons configurations.
> One way is to skip the exception, and print a warning to stderr (or some better logging
> Alternatively, an `optionalInclude` key can be introduced to serve this purpose.
> Thanks!

This message was sent by Atlassian JIRA

View raw message