[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-27 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on TAMAYA-351:


Commit 1d735ca47c2825e71cff0a2e6661fef0337f0202 in 
incubator-tamaya-extensions's branch refs/heads/master from Alex
[ 
https://git-wip-us.apache.org/repos/asf?p=incubator-tamaya-extensions.git;h=1d735ca
 ]

TAMAYA-351


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-26 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user alexsuter commented on the issue:

https://github.com/apache/incubator-tamaya-extensions/pull/9
  
Hmm. Really not nice for this test case... 
Try to fix that this evening


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-25 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user peculater commented on the issue:

https://github.com/apache/incubator-tamaya-extensions/pull/9
  
Excellent.  I think that cleans up the code nicely.  Drop a license header 
in that Testresource3.txt file to get the tests passing and this should be good 
to merge. :+1: 


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-25 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user alexsuter commented on the issue:

https://github.com/apache/incubator-tamaya-extensions/pull/9
  
@peculater 
I use now java 7 features to load the hole file. so we won't have to handle 
the new line anymore.


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread Alexander Suter (JIRA)


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

Alexander Suter commented on TAMAYA-351:


[~hugo.hirsch]

I filed the ICLA today. Thanks for the link.

> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user alexsuter commented on the issue:

https://github.com/apache/incubator-tamaya-extensions/pull/9
  
Which Java Level do we have to support? Since Java 7 there are a lot of 
shortcut methods, to read a file: 
https://stackoverflow.com/questions/326390/how-do-i-create-a-java-string-from-the-contents-of-a-file



> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user peculater commented on the issue:

https://github.com/apache/incubator-tamaya-extensions/pull/9
  
Newlines are notoriously complex, and I see that you're assuming Unix style 
and not windows style. I'm comparing to the code in StringUtils in apache 
commons. Any chance we could cover the windows line ending case?

Great catch on the bug. :-) 


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user alexsuter commented on the issue:

https://github.com/apache/incubator-tamaya-extensions/pull/9
  
Fixed + Test added


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread Philipp Ottlinger (JIRA)


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

Philipp Ottlinger commented on TAMAYA-351:
--

[~alexsuter] feel free to start at:
 * [https://www.apache.org/licenses/#clas]

Basically it's all about:

[https://www.apache.org/licenses/icla.pdf]

Thanks for your help and contribution.

 

> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread Alexander Suter (JIRA)


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

Alexander Suter commented on TAMAYA-351:


Hello [~hugo.hirsch]

Can you please send me a link, how I can file a CLA? Or what I have to do?

> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user ottlinger commented on a diff in the pull request:


https://github.com/apache/incubator-tamaya-extensions/pull/9#discussion_r219938377
  
--- Diff: 
modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/FileResolver.java
 ---
@@ -86,7 +86,12 @@ public String evaluate(String expression) {
 builder.append(inputLine).append("\n");
 }
 
-return builder.toString();
+String content = builder.toString();
+if (content.endsWith("\n")) {
+content = content.substring(0, conent.length() - 2);   
 
--- End diff --

conent? Seems like a typo to me.

Is it possible to provide/augment a test case to verify the behaviour and 
prevent regressions in the future. Thanks.


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

Github user ottlinger commented on the issue:

https://github.com/apache/incubator-tamaya-extensions/pull/9
  
Thanks for your contributions - did you already file a CLA with 
ApacheSoftwareFoundation to properly license your commits? Thanks.


> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TAMAYA-351) Do not append newline (\n) at the end of a value when resolved with FileResolver

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on TAMAYA-351:
---

GitHub user alexsuter opened a pull request:

https://github.com/apache/incubator-tamaya-extensions/pull/9

TAMAYA-351 Do not append newline (\n) at the end of a value when resolved 
with FileResolver



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/alexsuter/incubator-tamaya-extensions patch-1

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-tamaya-extensions/pull/9.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 #9


commit aa5826799439ee7553c676da1f1edda076afac0f
Author: Alex 
Date:   2018-09-24T15:59:57Z

TAMAYA-351




> Do not append newline (\n) at the end of a value when resolved with 
> FileResolver
> 
>
> Key: TAMAYA-351
> URL: https://issues.apache.org/jira/browse/TAMAYA-351
> Project: Tamaya
>  Issue Type: Bug
>Reporter: Alexander Suter
>Priority: Major
>
> FileResolver always adds a new line (\n) at the end of the value. This leads 
> to the issue that the value will be postfixed with a new line, when I load an 
> value which has been resolved with the FileResolver,



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)