[jira] [Commented] (TAMAYA-181) Warning-"Flood" from SimplePropertySource

2016-10-23 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15599717#comment-15599717
 ] 

John D. Ament commented on TAMAYA-181:
--

The tests are wrong.  The warning he's seeing is because the name isn't set, 
and the missing properties are because the name isn't set.  I'll fix the tests.

> Warning-"Flood" from SimplePropertySource
> -
>
> Key: TAMAYA-181
> URL: https://issues.apache.org/jira/browse/TAMAYA-181
> Project: Tamaya
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.2-incubating
> Environment: any
>Reporter: Jürg Spiess
>Priority: Minor
> Fix For: 0.3-incubating
>
>
> If the constructor
> {code}public SimplePropertySource(URL propertiesLocation){code} is used, 
> STDOUT is flooded with warnings about "missing name".
> Solution:
> {code}
> public SimplePropertySource(URL propertiesLocation) {
> super(0);
> // switch the next 2 lines: name should be set BEFORE load(...)!
> this.properties = load(propertiesLocation);
> this.name = propertiesLocation.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TAMAYA-181) Warning-"Flood" from SimplePropertySource

2016-10-17 Thread Philipp Ottlinger (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15583151#comment-15583151
 ] 

Philipp Ottlinger commented on TAMAYA-181:
--

The failing tests concern the number of entries:

{code}
Failed tests: 
  PropertiesFilePropertySourceTest.testGetProperties:52 expected:<5> but 
was:<10>
  
SimplePropertySourceTest.successfulCreationWithPropertiesFromSimplePropertiesFile:86
 
Expected: a map with size <5>
 but: map size was <10>
  
SimplePropertySourceTest.successfulCreationWithPropertiesFromXMLPropertiesFile:42
 
Expected: a map with size <2>
 but: map size was <4>
  JavaConfigurationProviderTest.loadsSimpleAndXMLPropertyFilesProper:47 
Expected: a collection with size <5>
 but: collection size was <10>
{code}


> Warning-"Flood" from SimplePropertySource
> -
>
> Key: TAMAYA-181
> URL: https://issues.apache.org/jira/browse/TAMAYA-181
> Project: Tamaya
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.2-incubating
> Environment: any
>Reporter: Jürg Spiess
>Priority: Minor
> Fix For: 0.3-incubating
>
>
> If the constructor
> {code}public SimplePropertySource(URL propertiesLocation){code} is used, 
> STDOUT is flooded with warnings about "missing name".
> Solution:
> {code}
> public SimplePropertySource(URL propertiesLocation) {
> super(0);
> // switch the next 2 lines: name should be set BEFORE load(...)!
> this.properties = load(propertiesLocation);
> this.name = propertiesLocation.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TAMAYA-181) Warning-"Flood" from SimplePropertySource

2016-10-17 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581865#comment-15581865
 ] 

John D. Ament commented on TAMAYA-181:
--

I agree, the looks of it is that name needs to be populated before the 
properties loaded.  If tests fail because of that, we need to look closely to 
see if the tests are accurate.  Are they checking for null behavior perhaps?  
We can leverage {{Objects.requireNonNull}} ?

> Warning-"Flood" from SimplePropertySource
> -
>
> Key: TAMAYA-181
> URL: https://issues.apache.org/jira/browse/TAMAYA-181
> Project: Tamaya
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.2-incubating
> Environment: any
>Reporter: Jürg Spiess
>Priority: Minor
> Fix For: 0.3-incubating
>
>
> If the constructor
> {code}public SimplePropertySource(URL propertiesLocation){code} is used, 
> STDOUT is flooded with warnings about "missing name".
> Solution:
> {code}
> public SimplePropertySource(URL propertiesLocation) {
> super(0);
> // switch the next 2 lines: name should be set BEFORE load(...)!
> this.properties = load(propertiesLocation);
> this.name = propertiesLocation.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TAMAYA-181) Warning-"Flood" from SimplePropertySource

2016-10-16 Thread JIRA

[ 
https://issues.apache.org/jira/browse/TAMAYA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581281#comment-15581281
 ] 

Jürg Spiess commented on TAMAYA-181:


So the tests are not identical for
public SimplePropertySource(URL ...)
and
public SimplePropertySource(File ...) ?

The constructors use different order of intializiaton.

> Warning-"Flood" from SimplePropertySource
> -
>
> Key: TAMAYA-181
> URL: https://issues.apache.org/jira/browse/TAMAYA-181
> Project: Tamaya
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.2-incubating
> Environment: any
>Reporter: Jürg Spiess
>Priority: Minor
> Fix For: 0.3-incubating
>
>
> If the constructor
> {code}public SimplePropertySource(URL propertiesLocation){code} is used, 
> STDOUT is flooded with warnings about "missing name".
> Solution:
> {code}
> public SimplePropertySource(URL propertiesLocation) {
> super(0);
> // switch the next 2 lines: name should be set BEFORE load(...)!
> this.properties = load(propertiesLocation);
> this.name = propertiesLocation.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TAMAYA-181) Warning-"Flood" from SimplePropertySource

2016-10-13 Thread Philipp Ottlinger (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15573004#comment-15573004
 ] 

Philipp Ottlinger commented on TAMAYA-181:
--

I tried the following patch:
{code}
diff --git 
a/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java
 
b/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java
index e875d8c..0ecba4f 100644
--- 
a/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java
+++ 
b/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java
@@ -70,8 +70,8 @@ public class SimplePropertySource extends BasePropertySource {
  */
 public SimplePropertySource(URL propertiesLocation) {
 super(0);
-this.properties = load(propertiesLocation);
 this.name = propertiesLocation.toString();
+this.properties = load(propertiesLocation);
 }
 
 /**
{code}
resulting in many test failures.

Not sure if that's what you mean, but it's not without side effects :-(

> Warning-"Flood" from SimplePropertySource
> -
>
> Key: TAMAYA-181
> URL: https://issues.apache.org/jira/browse/TAMAYA-181
> Project: Tamaya
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.2-incubating
> Environment: any
>Reporter: Jürg Spiess
>Priority: Minor
> Fix For: 0.3-incubating
>
>
> If the constructor
> {code}public SimplePropertySource(URL propertiesLocation){code} is used, 
> STDOUT is flooded with warnings about "missing name".
> Solution:
> {code}
> public SimplePropertySource(URL propertiesLocation) {
> super(0);
> // switch the next 2 lines: name should be set BEFORE load(...)!
> this.properties = load(propertiesLocation);
> this.name = propertiesLocation.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TAMAYA-181) Warning-"Flood" from SimplePropertySource

2016-10-12 Thread JIRA

[ 
https://issues.apache.org/jira/browse/TAMAYA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15570887#comment-15570887
 ] 

Jürg Spiess commented on TAMAYA-181:


The constructor above the one I mentioned has the 2 lines switched. The only 
difference: It uses a File instead of a URL for the location.

> Warning-"Flood" from SimplePropertySource
> -
>
> Key: TAMAYA-181
> URL: https://issues.apache.org/jira/browse/TAMAYA-181
> Project: Tamaya
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.2-incubating
> Environment: any
>Reporter: Jürg Spiess
>Priority: Minor
> Fix For: 0.3-incubating
>
>
> If the constructor
> {code}public SimplePropertySource(URL propertiesLocation){code} is used, 
> STDOUT is flooded with warnings about "missing name".
> Solution:
> {code}
> public SimplePropertySource(URL propertiesLocation) {
> super(0);
> // switch the next 2 lines: name should be set BEFORE load(...)!
> this.properties = load(propertiesLocation);
> this.name = propertiesLocation.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TAMAYA-181) Warning-"Flood" from SimplePropertySource

2016-10-12 Thread Philipp Ottlinger (JIRA)

[ 
https://issues.apache.org/jira/browse/TAMAYA-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15569895#comment-15569895
 ] 

Philipp Ottlinger commented on TAMAYA-181:
--

Thanks for mentioning this - switching the 2 lines has side effects as it 
doubles the number of entries in target properties. I assume the order has been 
there for a reason.

> Warning-"Flood" from SimplePropertySource
> -
>
> Key: TAMAYA-181
> URL: https://issues.apache.org/jira/browse/TAMAYA-181
> Project: Tamaya
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.2-incubating
> Environment: any
>Reporter: Jürg Spiess
>Priority: Minor
> Fix For: 0.3-incubating
>
>
> If the constructor
> {code}public SimplePropertySource(URL propertiesLocation){code} is used, 
> STDOUT is flooded with warnings about "missing name".
> Solution:
> {code}
> public SimplePropertySource(URL propertiesLocation) {
> super(0);
> // switch the next 2 lines: name should be set BEFORE load(...)!
> this.properties = load(propertiesLocation);
> this.name = propertiesLocation.toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)