Author: dkulp
Date: Fri Mar 12 21:22:05 2010
New Revision: 922430
URL: http://svn.apache.org/viewvc?rev=922430&view=rev
Log:
Merged revisions 922429 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r922429 | dkulp | 2010-03-12 16:19:00 -0500 (Fri, 12 Mar 2010) | 2 lines
[CXF-2710] Check if params passed to javac are empty strings, not just
null.
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java?rev=922430&r1=922429&r2=922430&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
(original)
+++
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
Fri Mar 12 21:22:05 2010
@@ -63,7 +63,7 @@ public class Compiler {
outputDir = s.replace(File.pathSeparatorChar, '/');
}
public void setClassPath(String s) {
- classPath = s;
+ classPath = StringUtils.isEmpty(s) ? null : s;
}
private void addArgs(List<String> list) {
@@ -75,17 +75,21 @@ public class Compiler {
list.add(target);
}
- if (outputDir != null) {
+ if (!StringUtils.isEmpty(outputDir)) {
list.add("-d");
list.add(outputDir);
}
- if (classPath == null) {
+ if (StringUtils.isEmpty(classPath)) {
String javaClasspath = System.getProperty("java.class.path");
boolean classpathSetted = javaClasspath != null ? true : false;
if (!classpathSetted) {
- list.add("-extdirs");
-
list.add(getClass().getClassLoader().getResource(".").getFile() + "../lib/");
+ File f = new
File(getClass().getClassLoader().getResource(".").getFile());
+ f = new File(f, "../lib");
+ if (f.exists() && f.isDirectory()) {
+ list.add("-extdirs");
+ list.add(f.toString());
+ }
} else {
list.add("-classpath");
list.add(javaClasspath);