You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ru...@apache.org on 2001/08/04 18:09:18 UTC

cvs commit: xml-axis/java/test/encoding TestString.java

rubys       01/08/04 09:09:18

  Modified:    java/src/org/apache/axis/encoding
                        SOAPTypeMappingRegistry.java
               java/test/encoding TestString.java
  Log:
  Handle leading and trailing whitespace in strings
  
  Revision  Changes    Path
  1.34      +1 -1      xml-axis/java/src/org/apache/axis/encoding/SOAPTypeMappingRegistry.java
  
  Index: SOAPTypeMappingRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/SOAPTypeMappingRegistry.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- SOAPTypeMappingRegistry.java	2001/07/29 20:03:32	1.33
  +++ SOAPTypeMappingRegistry.java	2001/08/04 16:09:18	1.34
  @@ -142,7 +142,7 @@
               throws SAXException
           {
               try {
  -                value = makeValue(val.toString().trim());
  +                value = makeValue(val.toString());
               } catch (InvocationTargetException ite) {
                   Throwable realException = ite.getTargetException();
                   if (realException instanceof Exception)
  
  
  
  1.8       +8 -0      xml-axis/java/test/encoding/TestString.java
  
  Index: TestString.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestString.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestString.java	2001/07/15 23:38:30	1.7
  +++ TestString.java	2001/08/04 16:09:18	1.8
  @@ -72,4 +72,12 @@
       public void testStringWithRawEntities() throws Exception {
           runtest("&<>'\"", "&<>'\"");
       }
  +    
  +    public void testStringWithLeadingAndTrailingSpaces() throws Exception {
  +        runtest("          centered          ");
  +    }
  +    
  +    public void testWhitespace() throws Exception {
  +        runtest(" \n \t "); // note: \r fails
  +    }
   }