xsddoc/src/net/sf/xframe/xsddoc/util FileUtil.java,1.6,1.7

Kurt Riede <[email protected]> Mon, 13 Dec 2004 13:25:13 +0000
Newsgroups gmane.text.xml.xframe.xsddoc.devel
Message-ID <[email protected]>
Update of /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10776/src/net/sf/xframe/xsddoc/util

Modified Files:
	FileUtil.java 
Log Message:
avoid Stack Overflow with circular includes

Index: FileUtil.java
===================================================================
RCS file: /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/util/FileUtil.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FileUtil.java	9 Dec 2004 12:42:18 -0000	1.6
--- FileUtil.java	13 Dec 2004 13:25:11 -0000	1.7
***************
*** 105,116 ****
          if (baseFile == null || file.indexOf(':') > 0) {
              return file;
-         } else {
-             final String parent = new File(baseFile).getParent();
-             if (parent == null) {
-                 return file;
-             } else {
-                 return parent + FILE_SEP + file;
-             }
          }
      }
  }
--- 105,114 ----
          if (baseFile == null || file.indexOf(':') > 0) {
              return file;
          }
+         final String parent = new File(baseFile).getParent();
+         if (parent == null) {
+             return file;
+         }
+         return parent + FILE_SEP + file;
      }
  }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/