[jsemver] 66/95: Rename VersionParser.Char to VersionParser.CharType

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 a284c5edf297206788ae6e98ec9a422d603cb5f8
Author: Zafar Khaja <zafarkhaja at gmail.com>
Date:   Tue Dec 3 22:16:48 2013 +0400

    Rename VersionParser.Char to VersionParser.CharType
---
 .../java/com/github/zafarkhaja/semver/VersionParser.java   | 14 +++++++-------
 ...nParserCharTest.java => VersionParserCharTypeTest.java} |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/github/zafarkhaja/semver/VersionParser.java b/src/main/java/com/github/zafarkhaja/semver/VersionParser.java
index 11f85ed..06f5bba 100644
--- a/src/main/java/com/github/zafarkhaja/semver/VersionParser.java
+++ b/src/main/java/com/github/zafarkhaja/semver/VersionParser.java
@@ -27,7 +27,7 @@ import com.github.zafarkhaja.semver.util.Stream;
 import com.github.zafarkhaja.semver.util.UnexpectedElementException;
 import java.util.ArrayList;
 import java.util.List;
-import static com.github.zafarkhaja.semver.VersionParser.Char.*;
+import static com.github.zafarkhaja.semver.VersionParser.CharType.*;
 
 /**
  * A parser for the SemVer Version.
@@ -40,7 +40,7 @@ class VersionParser implements Parser<Version> {
     /**
      * Valid character types.
      */
-    static enum Char implements Stream.ElementType<Character> {
+    static enum CharType implements Stream.ElementType<Character> {
 
         DIGIT {
             /**
@@ -279,8 +279,8 @@ class VersionParser implements Parser<Version> {
      * @throws GrammarException if the pre-release version has empty identifier(s)
      */
     private MetadataVersion parsePreRelease() {
-        Char end = closestEndpoint(PLUS, EOL);
-        Char before = closestEndpoint(DOT, end);
+        CharType end = closestEndpoint(PLUS, EOL);
+        CharType before = closestEndpoint(DOT, end);
         List<String> idents = new ArrayList<String>();
         while (!chars.positiveLookahead(end)) {
             if (before == DOT) {
@@ -320,8 +320,8 @@ class VersionParser implements Parser<Version> {
      * @throws GrammarException if the build metadata has empty identifier(s)
      */
     private MetadataVersion parseBuild() {
-        Char end = EOL;
-        Char before = closestEndpoint(DOT, end);
+        CharType end = EOL;
+        CharType before = closestEndpoint(DOT, end);
         List<String> idents = new ArrayList<String>();
         while (!chars.positiveLookahead(end)) {
             if (before == DOT) {
@@ -417,7 +417,7 @@ class VersionParser implements Parser<Version> {
      * @param orThis the character to fallback to
      * @return the closest character
      */
-    private Char closestEndpoint(Char tryThis, Char orThis) {
+    private CharType closestEndpoint(CharType tryThis, CharType orThis) {
         if (chars.positiveLookaheadBefore(orThis, tryThis)) {
             return tryThis;
         }
diff --git a/src/test/java/com/github/zafarkhaja/semver/VersionParserCharTest.java b/src/test/java/com/github/zafarkhaja/semver/VersionParserCharTypeTest.java
similarity index 96%
rename from src/test/java/com/github/zafarkhaja/semver/VersionParserCharTest.java
rename to src/test/java/com/github/zafarkhaja/semver/VersionParserCharTypeTest.java
index d6ccd1b..a979436 100644
--- a/src/test/java/com/github/zafarkhaja/semver/VersionParserCharTest.java
+++ b/src/test/java/com/github/zafarkhaja/semver/VersionParserCharTypeTest.java
@@ -24,14 +24,14 @@
 package com.github.zafarkhaja.semver;
 
 import org.junit.Test;
-import static com.github.zafarkhaja.semver.VersionParser.Char.*;
+import static com.github.zafarkhaja.semver.VersionParser.CharType.*;
 import static org.junit.Assert.*;
 
 /**
  *
  * @author Zafar Khaja <zafarkhaja at gmail.com>
  */
-public class VersionParserCharTest {
+public class VersionParserCharTypeTest {
 
     @Test
     public void shouldBeMatchedByDigit() {

-- 
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