owenb       2002/09/20 08:11:16

  Modified:    java/src/org/apache/wsif/util WSIFUtils.java
  Log:
  Change getPackageNameFromNamespaceURI to allow www in package names
  and also to allow mixed case package names.
  
  Revision  Changes    Path
  1.16      +8 -9      xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java
  
  Index: WSIFUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- WSIFUtils.java    20 Sep 2002 08:46:54 -0000      1.15
  +++ WSIFUtils.java    20 Sep 2002 15:11:16 -0000      1.16
  @@ -905,8 +905,7 @@
   
                   // Turn segment into a valid package segment name
                   name = getPackageNameFromXMLName((String) segments.get(i));
  -                if (name.startsWith(WWW))
  -                    name = name.substring(3);
  +
                   // Reverse its components
                   StringTokenizer tokenizer = new StringTokenizer(name, ".");
                   List host = new ArrayList();
  @@ -942,7 +941,7 @@
               packageNameBuffer.append(name);
           }
           Trc.exit(packageNameBuffer.toString());
  -        return packageNameBuffer.toString().toLowerCase();
  +        return packageNameBuffer.toString();
       }
   
       public static String getJavaNameFromXMLName(
  @@ -1223,7 +1222,7 @@
           //   continue    goto       package       synchronized
           //  null        true       false         assert
       }
  -        
  +
       /**
        * Compares two strings taking acount of a wildcard.
        * The first string is compared to the second string taking 
  @@ -1232,11 +1231,11 @@
        * would return true.
        */
       public static boolean wildcardCompare(String s1, String s2, char wild) {
  -       if ( s1 == null ) {
  -          return false;
  -       }
  -       String w = wild + "";         
  -       return cmp( new StringTokenizer( s1, w, true ), s2, w );      
  +        if (s1 == null) {
  +            return false;
  +        }
  +        String w = wild + "";
  +        return cmp(new StringTokenizer(s1, w, true), s2, w);
       }
       
       private static boolean cmp(StringTokenizer st, String s, String wild) {
  
  
  


Reply via email to