You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ha...@apache.org on 2002/03/28 17:51:23 UTC
cvs commit: jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ant AltrmiProxyTask.java
hammant 02/03/28 08:51:23
Modified: altrmi/src/java/org/apache/commons/altrmi/generator/ant
AltrmiProxyTask.java
Log:
file handling more robust now
Revision Changes Path
1.2 +11 -13 jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ant/AltrmiProxyTask.java
Index: AltrmiProxyTask.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ant/AltrmiProxyTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AltrmiProxyTask.java 26 Mar 2002 11:24:06 -0000 1.1
+++ AltrmiProxyTask.java 28 Mar 2002 16:51:23 -0000 1.2
@@ -30,14 +30,14 @@
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class AltrmiProxyTask extends Task {
protected String[] mInterfacesToExpose;
protected String[] mAdditionalFacades;
- protected String mSrcGenDir;
- protected String mClassGenDir;
+ protected File mSrcGenDir;
+ protected File mClassGenDir;
protected String mGenName;
protected Path mClasspath;
protected String mVerbose = "false";
@@ -98,9 +98,8 @@
* @param srcGenDir
*
*/
- public void setSrcgendir(String srcGenDir) {
- mSrcGenDir = srcGenDir.replace('/', File.separatorChar);
- mSrcGenDir = mSrcGenDir.replace('\\', File.separatorChar);
+ public void setSrcgendir(File srcGenDir) {
+ mSrcGenDir = srcGenDir;
}
/**
@@ -110,9 +109,8 @@
* @param classGenDir
*
*/
- public void setClassgendir(String classGenDir) {
- mClassGenDir = classGenDir.replace('/', File.separatorChar);
- mClassGenDir = mClassGenDir.replace('\\', File.separatorChar);
+ public void setClassgendir(File classGenDir) {
+ mClassGenDir = classGenDir;
}
/**
@@ -217,8 +215,8 @@
}
try {
- sg.setSrcGenDir(new File(mSrcGenDir).getAbsolutePath());
- sg.setClassGenDir(new File(mClassGenDir).getAbsolutePath());
+ sg.setSrcGenDir(mSrcGenDir.getAbsolutePath());
+ sg.setClassGenDir(mClassGenDir.getAbsolutePath());
sg.setGenName(mGenName);
sg.verbose(Boolean.valueOf(mVerbose).booleanValue());
sg.setClasspath(mClasspath.concatSystemClasspath("ignore").toString());
@@ -256,9 +254,9 @@
sg.generateSrc(cL);
sg.generateClass(cL);
} catch (ClassNotFoundException cnfe) {
- throw new BuildException(cnfe.getMessage());
+ throw new BuildException("Class not found : " + cnfe.getMessage());
} catch (ProxyGenerationException sge) {
- throw new BuildException(sge.getMessage());
+ throw new BuildException("Proxy Gerneation error : " + sge.getMessage());
}
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>