Author: objectiser
Date: 2010-07-16 04:20:27 -0400 (Fri, 16 Jul 2010)
New Revision: 884
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
branches/RiftSaw-ODE-2.1.x/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
Log:
Fix for JBIDE-6617 - parsing int instead of long.
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
===================================================================
---
branches/ODE/RiftSaw-ODE-trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java 2010-07-16
04:39:41 UTC (rev 883)
+++
branches/ODE/RiftSaw-ODE-trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java 2010-07-16
08:20:27 UTC (rev 884)
@@ -635,10 +635,13 @@
public static long getVersion(String dirName) {
try {
- return Integer.parseInt(dirName.substring(dirName.lastIndexOf("-")
+ 1));
+ if (dirName.lastIndexOf("-") != -1) {
+ return Long.parseLong(dirName.substring(dirName.lastIndexOf("-") +
1));
+ }
} catch (Throwable t) {
- return 0;
+ __log.debug("Unable to parse version '"+dirName+"'",
t);
}
+ return 0;
}
/**
Modified:
branches/RiftSaw-ODE-2.1.x/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
===================================================================
---
branches/RiftSaw-ODE-2.1.x/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java 2010-07-16
04:39:41 UTC (rev 883)
+++
branches/RiftSaw-ODE-2.1.x/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java 2010-07-16
08:20:27 UTC (rev 884)
@@ -635,10 +635,13 @@
public static long getVersion(String dirName) {
try {
- return Integer.parseInt(dirName.substring(dirName.lastIndexOf("-")
+ 1));
+ if (dirName.lastIndexOf("-") != -1) {
+ return Long.parseLong(dirName.substring(dirName.lastIndexOf("-") +
1));
+ }
} catch (Throwable t) {
- return 0;
+ __log.debug("Unable to parse version '"+dirName+"'",
t);
}
+ return 0;
}
/**
Show replies by date