diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2021-01-17 18:24:31 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2021-01-17 18:24:31 +0000 |
commit | fd29c485ef3891705c8cd5242d195e8b9ce49372 (patch) | |
tree | 1ec9d0d5bfb57130d02778ee7bd67d7ab82d2363 /src | |
parent | 3778a3e9e24470499ebf0310a50848bdee266488 (diff) | |
download | poi-fd29c485ef3891705c8cd5242d195e8b9ce49372.tar.gz poi-fd29c485ef3891705c8cd5242d195e8b9ce49372.zip |
Bump versions to 5.0.1-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885616 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/examples/groovy/build.gradle | 4 | ||||
-rw-r--r-- | src/excelant/poi-ant-contrib/NextRelease.java | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/examples/groovy/build.gradle b/src/examples/groovy/build.gradle index 0abc2578e9..79bccbcdeb 100644 --- a/src/examples/groovy/build.gradle +++ b/src/examples/groovy/build.gradle @@ -23,8 +23,8 @@ repositories { } dependencies { compile 'org.codehaus.groovy:groovy-all:2.4.13' - compile 'org.apache.poi:poi:4.1.2' - compile 'org.apache.poi:poi-ooxml:4.1.2' + compile 'org.apache.poi:poi:5.0.0' + compile 'org.apache.poi:poi-ooxml:5.0.0' } // Our files are in the current directory diff --git a/src/excelant/poi-ant-contrib/NextRelease.java b/src/excelant/poi-ant-contrib/NextRelease.java index bd21b0e6cb..c0b6b3d864 100644 --- a/src/excelant/poi-ant-contrib/NextRelease.java +++ b/src/excelant/poi-ant-contrib/NextRelease.java @@ -21,6 +21,7 @@ import java.util.regex.Pattern; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; +@SuppressWarnings("unused") public class NextRelease extends Task { private final Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+).*"); private String property; @@ -30,7 +31,7 @@ public class NextRelease extends Task { this.property = property; } - public void increment(int increment) { + public void setIncrement(int increment) { this.increment = increment; } @@ -38,7 +39,8 @@ public class NextRelease extends Task { Project project = getProject(); String relCurr = project.getProperty("version.id"); Matcher m = pattern.matcher(relCurr); - m.find(); - project.setProperty(property, m.group(1)+"."+m.group(2)+"."+(Integer.parseInt(m.group(3))+increment)); + if (m.find()) { + project.setProperty(property, m.group(1) + "." + m.group(2) + "." + (Integer.parseInt(m.group(3)) + increment)); + } } } |