You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2008/01/30 11:25:58 UTC
svn commit: r616713 - in /openejb/trunk/openejb3/container/openejb-core/src:
main/java/org/apache/openejb/util/SuperProperties.java
test/java/org/apache/openejb/util/SuperPropertiesTest.java
Author: jlaskowski
Date: Wed Jan 30 02:25:55 2008
New Revision: 616713
URL: http://svn.apache.org/viewvc?rev=616713&view=rev
Log:
Fix property handling on Windows
Modified:
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java
openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java
Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java?rev=616713&r1=616712&r2=616713&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/SuperProperties.java Wed Jan 30 02:25:55 2008
@@ -58,7 +58,7 @@
* @see java.lang.System#getProperties
*/
public class SuperProperties extends Properties {
- private static final String LINE_SEPARATOR = System.getProperty("line.separator");
+ private static final String LINE_SEPARATOR = "\n";
private static final String PROP_DTD_NAME = "http://java.sun.com/dtd/properties.dtd";
Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java?rev=616713&r1=616712&r2=616713&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/util/SuperPropertiesTest.java Wed Jan 30 02:25:55 2008
@@ -351,7 +351,7 @@
assertEquals(2, properties.getCommentIndent());
}
- protected String store(Properties properties) throws IOException {
+ protected String store(Properties properties) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
properties.store(out, null);
return new String(out.toByteArray());
Re: Super properties line separator (was svn commit: r616713)
Posted by David Blevins <da...@visi.com>.
On Jan 30, 2008, at 4:57 PM, David Blevins wrote:
>
> On Jan 30, 2008, at 1:34 PM, Jacek Laskowski wrote:
>
>> On Jan 30, 2008 9:34 PM, David Blevins <da...@visi.com>
>> wrote:
>>
>>> I'm not sure what issue you faced, but this fix is definitely broken
>>> too :)
>>
>> The tests failed with AssertionError: expected: foo[]bar was: foo[
>> ] bar (note the new line separator that got its way directly). I
>> didn't look into it too much, but just fix the code to suit the
>> test's
>
> Wow that test is full of foos and bars! Do you remember which line
> the failure happened in? Might be the test that's broken and not
> the code.
Never mind, I see the issue. It's all the test lines :) They all
assume unix line endings. Going to have the Properties use
"line.separator" by default, but then let the line ending be
explicitly set (then we can be lazy and leave all the tests the way
they are :).
-David
Re: Super properties line separator (was svn commit: r616713)
Posted by David Blevins <da...@visi.com>.
On Jan 30, 2008, at 1:34 PM, Jacek Laskowski wrote:
> On Jan 30, 2008 9:34 PM, David Blevins <da...@visi.com> wrote:
>
>> I'm not sure what issue you faced, but this fix is definitely broken
>> too :)
>
> The tests failed with AssertionError: expected: foo[]bar was: foo[
> ] bar (note the new line separator that got its way directly). I
> didn't look into it too much, but just fix the code to suit the test's
Wow that test is full of foos and bars! Do you remember which line
the failure happened in? Might be the test that's broken and not the
code.
-David
Re: Super properties line separator (was svn commit: r616713)
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Jan 30, 2008 9:34 PM, David Blevins <da...@visi.com> wrote:
> I'm not sure what issue you faced, but this fix is definitely broken
> too :)
The tests failed with AssertionError: expected: foo[]bar was: foo[
] bar (note the new line separator that got its way directly). I
didn't look into it too much, but just fix the code to suit the test's
requirements ;-)
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
Super properties line separator (was svn commit: r616713)
Posted by David Blevins <da...@visi.com>.
On Jan 30, 2008, at 2:25 AM, jlaskowski@apache.org wrote:
> Author: jlaskowski
> Date: Wed Jan 30 02:25:55 2008
> New Revision: 616713
>
> URL: http://svn.apache.org/viewvc?rev=616713&view=rev
> Log:
> Fix property handling on Windows
>
[..]
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/
> apache/openejb/util/SuperProperties.java (original)
> +++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/
> apache/openejb/util/SuperProperties.java Wed Jan 30 02:25:55 2008
> @@ -58,7 +58,7 @@
> * @see java.lang.System#getProperties
> */
> public class SuperProperties extends Properties {
> - private static final String LINE_SEPARATOR =
> System.getProperty("line.separator");
> + private static final String LINE_SEPARATOR = "\n";
>
I'm not sure what issue you faced, but this fix is definitely broken
too :)
Can you elaborate?
-David