You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2021/09/09 19:36:53 UTC
[camel] branch main updated: [CAMEL-16939]XPathTransformTest only
check JDK ea version when it's 16-ea
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 73a7348 [CAMEL-16939]XPathTransformTest only check JDK ea version when it's 16-ea
73a7348 is described below
commit 73a7348fd68e9164c9eaa9541f22bfed94be7c75
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Thu Sep 9 15:36:16 2021 -0400
[CAMEL-16939]XPathTransformTest only check JDK ea version when it's 16-ea
---
.../apache/camel/builder/xml/XPathTransformTest.java | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTransformTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTransformTest.java
index e6cc956..4a7ccdb 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTransformTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTransformTest.java
@@ -117,15 +117,16 @@ public class XPathTransformTest extends ContextTestSupport {
if (version.startsWith("1.")) {
version = version.substring(2, 3);
} else {
- int dot = version.indexOf('.');
- if (dot != -1) {
- version = version.substring(0, dot);
+ int pos = version.indexOf('.');
+ if (pos != -1) {
+ version = version.substring(0, pos);
}
+ pos = version.indexOf('-');
+ if (pos != -1) {
+ version = version.substring(0, pos);
+ }
+
}
- if (version.equalsIgnoreCase("16-ea")) {
- return 16;
- } else {
- return Integer.parseInt(version);
- }
+ return Integer.parseInt(version);
}
}