You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by eb...@apache.org on 2014/12/17 15:19:01 UTC

svn commit: r1646251 - in /commons/proper/bcel/trunk/src/main/java/org/apache/bcel: classfile/JavaClass.java util/Class2HTML.java util/ClassPath.java

Author: ebourg
Date: Wed Dec 17 14:19:01 2014
New Revision: 1646251

URL: http://svn.apache.org/r1646251
Log:
Replaced System.getProperty("file|path.separator") with File.separator|pathSeparator (BCEL-182)

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java?rev=1646251&r1=1646250&r2=1646251&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java Wed Dec 17 14:19:01 2014
@@ -491,13 +491,7 @@ public class JavaClass extends AccessFla
         // Debugging ... on/off
         debug = Boolean.getBoolean("JavaClass.debug");
         // Get path separator either / or \ usually
-        String _sep = System.getProperty("file.separator");
-        if (_sep != null) {
-            try {
-                JavaClass.sep = _sep.charAt(0);
-            } catch (StringIndexOutOfBoundsException e) {
-            } // Never reached
-        }
+        sep = File.separatorChar;
     }
 
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java?rev=1646251&r1=1646250&r2=1646251&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java Wed Dec 17 14:19:01 2014
@@ -101,7 +101,7 @@ public class Class2HTML implements Const
         ClassParser parser = null;
         JavaClass java_class = null;
         String zip_file = null;
-        char sep = System.getProperty("file.separator").toCharArray()[0];
+        char sep = File.separatorChar;
         String dir = "." + sep; // Where to store HTML files
         try {
             /* Parse command line arguments.

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java?rev=1646251&r1=1646250&r2=1646251&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java Wed Dec 17 14:19:01 2014
@@ -72,8 +72,7 @@ public class ClassPath implements Serial
     public ClassPath(String class_path) {
         this.class_path = class_path;
         List<PathEntry> vec = new ArrayList<PathEntry>();
-        for (StringTokenizer tok = new StringTokenizer(class_path, System
-                .getProperty("path.separator")); tok.hasMoreTokens();) {
+        for (StringTokenizer tok = new StringTokenizer(class_path, File.pathSeparator); tok.hasMoreTokens();) {
             String path = tok.nextToken();
             if (!path.equals("")) {
                 File file = new File(path);