https://bz.apache.org/bugzilla/show_bug.cgi?id=65100
Bug ID: 65100
Summary: matches string problem with pattern ^ on z/OS
Product: Ant
Version: 1.10.9
Hardware: PC
OS: other
Status: NEW
Severity: normal
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
If the pattern contains ^, it cannot find a match with ant v1.10.9 on z/OS.
Below is a simple test case:
<?xml version="1.0"?>
<project name="test" default="build" basedir=".">
<taskdef resource='net/sf/antcontrib/antlib.xml'/>
<target name="build" >
<if>
<matches string="11" pattern="^(8|9|10|11)$$" />
<then>
<echo>string 11: matched with ^(8|9|10|11)$$</echo>
</then>
</if>
<if>
<matches string="11" pattern="(8|9|10|11)$$" />
<then>
<echo>string 11: matched with (8|9|10|11)$$</echo>
</then>
</if>
</target>
</project>
On Mac, the output is expected:
$ ant -f test.xml
Buildfile: /private/tmp/test.xml
build:
[echo] string 11: matched with ^(8|9|10|11)$
[echo] string 11: matched with (8|9|10|11)$
On z/OS, only the second if block is matched:
Buildfile: /home/jenkins/workspace/Grinder/openjdk-tests/TKG/test.xml
build:
[echo] string 11: matched with (8|9|10|11)$
Ant info on z/OS:
Apache Ant(TM) version 1.10.9 compiled on September 27 2020
Buildfile: /home/jenkins/workspace/Grinder/openjdk-tests/TKG/test.xml
Detected Java version: 1.8 in: /home/jenkins/openj9_resources/J8.0_64
Detected OS: z/OS
parsing buildfile /home/jenkins/workspace/Grinder/openjdk-tests/TKG/test.xml
with URI = file:/home/jenkins/workspace/l
Project base dir set to: /home/jenkins/workspace/Grinder/openjdk-tests/TKG
parsing buildfile
jar:file:/home/jenkins/openj9_resources/apache-ant-1.10.9/lib/ant.jar!/org/apache/tools/ant/antlib.e
parsing buildfile
jar:file:/home/jenkins/openj9_resources/apache-ant-1.10.9/lib/ant-contrib.jar!/net/sf/antcontrib/ane
Java version:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 8.0.5.20 -
pmz6480sr5fp20-20180802_01(SR5 FP20))
IBM J9 VM (build 2.9, JRE 1.8.0 z/OS s390x-64-Bit Compressed References
20180731_393394 (JIT enabled, AOT enabled)
OpenJ9 - bd23af8
OMR - ca1411c
IBM - 98805ca)
JCL - 20180719_01 based on Oracle jdk8u181-b12
We only see this issue with ant v1.10.9 on z/OS. This test works fine with ant
v1.9.9 on z/OS. Also, ant v1.10.9 does not seem to have this problem on other
platforms.
--
You are receiving this mail because:
You are the assignee for the bug.