[jsemver] 68/95: Refactor VersionParser.numericIdentifier()
Alexandre Viau
reazem-guest at moszumanska.debian.org
Mon Feb 16 14:58:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
reazem-guest pushed a commit to branch master
in repository jsemver.
commit 9b2ffbc29008d1af4fb72fc3a3ee71298d169e1e
Author: Zafar Khaja <zafarkhaja at gmail.com>
Date: Tue Jan 21 10:55:38 2014 +0400
Refactor VersionParser.numericIdentifier()
---
src/main/java/com/github/zafarkhaja/semver/VersionParser.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/main/java/com/github/zafarkhaja/semver/VersionParser.java b/src/main/java/com/github/zafarkhaja/semver/VersionParser.java
index cd686b3..db7ad6e 100644
--- a/src/main/java/com/github/zafarkhaja/semver/VersionParser.java
+++ b/src/main/java/com/github/zafarkhaja/semver/VersionParser.java
@@ -350,12 +350,7 @@ class VersionParser implements Parser<Version> {
*/
private String numericIdentifier() {
checkForLeadingZeroes();
- StringBuilder sb = new StringBuilder();
- sb.append(chars.consume(DIGIT));
- while (chars.positiveLookahead(DIGIT)) {
- sb.append(chars.consume());
- }
- return sb.toString();
+ return digits();
}
/**
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jsemver.git
More information about the pkg-java-commits
mailing list