IMO, it would be better to use \u notation in your String to avoid such problems. I'm using UTF-8 encoding as a default on my IDE, and if one developer is using something different (ie, ISO8859-1, for instance), that will be a big problem.

In this case, the code should be :

assertFailureOpeningElementName("<&()\u00c2§$%/>");




[email protected] wrote:
Author: berndf
Date: Thu May 14 15:22:39 2009
New Revision: 774819

URL: http://svn.apache.org/viewvc?rev=774819&view=rev
Log:
[vysper] restore garbled chars from r774707

Modified:
    
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java

Modified: 
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java?rev=774819&r1=774818&r2=774819&view=diff
==============================================================================
--- 
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java
 (original)
+++ 
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java
 Thu May 14 15:22:39 2009
@@ -39,7 +39,7 @@
public void testWrongOpeningElementName() {
         assertFailureOpeningElementName("<>");
-        assertFailureOpeningElementName("<&()�$%/>");
+        assertFailureOpeningElementName("<&()§$%/>");
         assertFailureOpeningElementName("< space-prefixed />");
         assertFailureOpeningElementName("<-prefixed>");
}




--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to