You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/02 12:53:03 UTC
[jira] [Commented] (DELTASPIKE-1278) PropertyFileConfig does not
respect optional on external resources
[ https://issues.apache.org/jira/browse/DELTASPIKE-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16071623#comment-16071623 ]
ASF GitHub Bot commented on DELTASPIKE-1278:
--------------------------------------------
GitHub user DennisRippinger opened a pull request:
https://github.com/apache/deltaspike/pull/74
DELTASPIKE-1278: Added an additonal check
This PR adds an additional check to ensure that a given file url does exist. This allows the `EnvironmentPropertyConfigSourceProvider` to respect a positive optional flag. It is still to question how to handle other non `file:\\` urls. I also thought about making optional handling part of `PropertyFileUtils#loadProperties`but wasn't sure if this brings problems to other places.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/DennisRippinger/deltaspike DELTASPIKE-1278
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/deltaspike/pull/74.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #74
----
commit 158acc70d729328b3c507bd9809de2e5de685c1d
Author: Dennis Rippinger <de...@gmail.com>
Date: 2017-07-02T12:43:31Z
DELTASPIKE-1278: Added an additonal check to ensure local resources do exist to respect optional flag.
----
> PropertyFileConfig does not respect optional on external resources
> ------------------------------------------------------------------
>
> Key: DELTASPIKE-1278
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1278
> Project: DeltaSpike
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.8.0
> Reporter: Dennis Rippinger
>
> Adding a property file from an external location (e.g. local file system) marked as optional is not respected by {{PropertyFileUtils}}. It creates a list of possible resource URLs, but does not check for their existence in all branches of its logic. This results in a list of possible nonexistent resources which could be optional, leading to an IllegalStateException.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)