axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl Namespaces.java
Date Thu, 25 Oct 2001 01:18:20 GMT
butek       01/10/24 18:18:20

  Modified:    java/src/org/apache/axis/wsdl Namespaces.java
  Log:
  Fixed bug where outputDir was getting into the package name.
  
  Revision  Changes    Path
  1.4       +13 -10    xml-axis/java/src/org/apache/axis/wsdl/Namespaces.java
  
  Index: Namespaces.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Namespaces.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Namespaces.java	2001/10/25 00:28:00	1.3
  +++ Namespaces.java	2001/10/25 01:18:20	1.4
  @@ -116,12 +116,20 @@
        * Return the given package name in directory format (dots replaced by slashes).  If
pkg is null,
        * "" is returned.
        */
  -    public static String toDir(String pkg) {
  -        if (pkg == null || pkg.equals("")) {
  +    public String toDir(String pkg) {
  +        String dir = null;
  +        if (root == null) {
  +            dir = pkg;
  +        }
  +        else {
  +            dir = root + File.separatorChar + pkg;
  +        }
  +
  +        if (dir == null || dir.equals("")) {
               return "";
           }
           else {
  -            return pkg.replace('.', File.separatorChar) + File.separatorChar;
  +            return dir.replace('.', File.separatorChar) + File.separatorChar;
           }
       } // toDir
   
  @@ -132,13 +140,8 @@
       public Object put(Object key, Object value) {
           if (get(key) == null) {
               mkdir((String) value);
  -        }
  -        if (root == null) {
  -            return super.put(key, value);
  -        }
  -        else {
  -            return super.put(key, root.replace(File.separatorChar, '.') + '.' + value);
           }
  +        return super.put(key, value);
       } // put
   
       /**
  @@ -159,7 +162,7 @@
        */
       private void mkdir(String pkg) {
           String pkgDirString = toDir(pkg);
  -        File packageDir = root == null ? new File(pkgDirString) : new File(root, pkgDirString);
  +        File packageDir = new File(pkgDirString);
           packageDir.mkdirs();
       } // mkdir
   } // class Namespaces
  
  
  

Mime
View raw message