You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2005/02/06 22:21:51 UTC
1.4 vs. 1.5 -- tests fail
I've been playing around with JDK 1.5 a little.
One thing I've noticed is that one test fails in 1.5 that works in 1.4.
Testcase: testEquivalence(org.apache.tapestry.junit.TestLocalizedProperties):
FAILED
The property content does not match expected:<{longer#=comment in the
middle of a continuation, weird= : test , longkey=test, yet
another=one, quoting=test , invalidxescap
e=nop╥e, first=property, and=another one, strange=: test, other=one,
just=another : one, single=, another=one, =empty key, longvalue=value
test }> but was:<{longer#=comment
in the middle of a continuation, weird= : test , longkey=test, yet
another=one, quoting=test , invalidxescape=nop╥e, first=property,
and=another one, strange=: test, other=on
e, just=another : one, single=, another=one, =empty key,
longvalue=value test }>
junit.framework.AssertionFailedError: The property content does not
match expected:<{longer#=comment in the middle of a continuation,
weird= : test , longkey=test, yet anothe
r=one, quoting=test , invalidxescape=nop╥e, first=property,
and=another one, strange=: test, other=one, just=another : one,
single=, another=one, =empty key, longvalue=val
ue test }> but was:<{longer#=comment in the middle of a
continuation, weird= : test , longkey=test, yet another=one,
quoting=test , invalidxescape=nop╥e, first=property, an
d=another one, strange=: test, other=one, just=another : one, single=,
another=one, =empty key, longvalue=value test }>
at org.apache.tapestry.junit.TestLocalizedProperties.ensureEquivalence(TestLocalizedProperties.java:64)
at org.apache.tapestry.junit.TestLocalizedProperties.ensureEquivalence(TestLocalizedProperties.java:33)
at org.apache.tapestry.junit.TestLocalizedProperties.testEquivalence(TestLocalizedProperties.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
I haven't started digging into this yet, does it ring anyone's bell?
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: 1.4 vs. 1.5 -- tests fail
Posted by Paul Ferraro <pm...@columbia.edu>.
I looked into this issue with Java 1.5 and the TestLocalizedProperties test.
If you look at the output from the test, the difference is apparent:
... quoting=test , invalidxescape=nop╥e ... [via Properties.load()]
vs.
... quoting=test , invalidxescape=nop╥e ... [via LocalizedProperties.load()]
Looking at the properties file from which this output was generated
there is this strange phenomenon:
...
longer\
# comment in the middle of a continuation
single
= empty key
quoting test \ # EOF !!!
... where the last name/value pair in the file uses a line continuation
character, but is the last line in the file!
Did this file get truncated? It would appear that the "quoting"
property was meant to test some sort of quoted condition - but I don't
see one.
Looking at the Java specification for Properties.load(), it says nothing
it particular about the behavior of a line continuation character at the
end of a file and it looks like Java 1.5 is consequently doing something
weird here. Is there a genuine need to test for this seemingly
undefined condition?
Paul
Howard Lewis Ship wrote:
>I've been playing around with JDK 1.5 a little.
>
>One thing I've noticed is that one test fails in 1.5 that works in 1.4.
>
>Testcase: testEquivalence(org.apache.tapestry.junit.TestLocalizedProperties):
> FAILED
>The property content does not match expected:<{longer#=comment in the
>middle of a continuation, weird= : test , longkey=test, yet
>another=one, quoting=test , invalidxescap
>e=nop╥e, first=property, and=another one, strange=: test, other=one,
>just=another : one, single=, another=one, =empty key, longvalue=value
>test }> but was:<{longer#=comment
>in the middle of a continuation, weird= : test , longkey=test, yet
>another=one, quoting=test , invalidxescape=nop╥e, first=property,
>and=another one, strange=: test, other=on
>e, just=another : one, single=, another=one, =empty key,
>longvalue=value test }>
>junit.framework.AssertionFailedError: The property content does not
>match expected:<{longer#=comment in the middle of a continuation,
>weird= : test , longkey=test, yet anothe
>r=one, quoting=test , invalidxescape=nop╥e, first=property,
>and=another one, strange=: test, other=one, just=another : one,
>single=, another=one, =empty key, longvalue=val
>ue test }> but was:<{longer#=comment in the middle of a
>continuation, weird= : test , longkey=test, yet another=one,
>quoting=test , invalidxescape=nop╥e, first=property, an
>d=another one, strange=: test, other=one, just=another : one, single=,
>another=one, =empty key, longvalue=value test }>
> at org.apache.tapestry.junit.TestLocalizedProperties.ensureEquivalence(TestLocalizedProperties.java:64)
> at org.apache.tapestry.junit.TestLocalizedProperties.ensureEquivalence(TestLocalizedProperties.java:33)
> at org.apache.tapestry.junit.TestLocalizedProperties.testEquivalence(TestLocalizedProperties.java:83)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>I haven't started digging into this yet, does it ring anyone's bell?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org