Author: dennyxu
Date: 2008-06-20 04:33:37 -0400 (Fri, 20 Jun 2008)
New Revision: 8859
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
Log:
JBIDE-2387: code refactor
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2008-06-20
06:34:33 UTC (rev 8858)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2008-06-20
08:33:37 UTC (rev 8859)
@@ -66,18 +66,10 @@
command += " -k " + args + " " + model.getWsdlURI();
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(command, null, new File(commandLocation));
- InputStreamReader ir = new InputStreamReader(proc.getErrorStream());
- LineNumberReader input = new LineNumberReader(ir);
- String str = input.readLine();
- StringBuffer result = new StringBuffer();
- while(str != null){
- result.append(str).append("\t\r");
- str = input.readLine();
-
- }
int exitValue = proc.waitFor();
+
if(exitValue != 0){
- return StatusUtils.errorStatus(result.toString());
+ return
StatusUtils.errorStatus(convertInputStreamToString(proc.getErrorStream()));
}
// log the result of the command execution
Show replies by date