Author: jacopoc
Date: Tue Sep 20 15:20:19 2016
New Revision: 1761594
URL:
http://svn.apache.org/viewvc?rev=1761594&view=revLog:
Improved: removed some unused methods from the Classpath class.
Modified:
ofbiz/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/Classpath.java
Modified: ofbiz/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/Classpath.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/Classpath.java?rev=1761594&r1=1761593&r2=1761594&view=diff==============================================================================
--- ofbiz/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/Classpath.java (original)
+++ ofbiz/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/Classpath.java Tue Sep 20 15:20:19 2016
@@ -27,7 +27,6 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
-import java.util.StringTokenizer;
/**
* A class path accumulator.
@@ -47,27 +46,6 @@ public final class Classpath {
}
/**
- * Adds a class path string. The string may include multiple paths separated by
- * a path separator.
- *
- * @param path
- * @return <code>true</code> if any path elements were added
- * @throws IOException if there was a problem parsing the class path
- * @throws IllegalArgumentException if <code>path</code> is null or empty
- */
- public boolean addClassPath(String path) throws IOException {
- if (path == null || path.isEmpty()) {
- throw new IllegalArgumentException("path cannot be null or empty");
- }
- boolean added = false;
- StringTokenizer t = new StringTokenizer(path, File.pathSeparator);
- while (t.hasMoreTokens()) {
- added |= addComponent(t.nextToken());
- }
- return added;
- }
-
- /**
* Adds a class path component. The component may be a directory or a file.
* If <code>component</code> does not exist, the method does nothing.
*
@@ -152,33 +130,6 @@ public final class Classpath {
}
}
- /**
- * Adds a directory that contains native libraries.
- * If <code>path</code> does not exist, the method does nothing.
- *
- * @param path
- * @return
- * @throws IOException
- * @throws IllegalArgumentException if <code>path</code> is null
- */
- public boolean addNativeClassPath(File path) throws IOException {
- if (path == null) {
- throw new IllegalArgumentException("path cannot be null");
- }
- if (path.exists()) {
- File key = path.getCanonicalFile();
- synchronized (nativeFolders) {
- if (!nativeFolders.contains(key)) {
- nativeFolders.add(key);
- return true;
- }
- }
- } else {
- System.out.println("Warning : Module classpath component '" + path + "' is not valid and will be ignored...");
- }
- return false;
- }
-
private void appendPath(StringBuilder cp, String path) {
if (path.indexOf(' ') >= 0) {
cp.append('\"');