Rename ParserException to ParseException
This commit is contained in:
parent
1c08055637
commit
8fd8b46188
|
@ -30,7 +30,7 @@ package com.github.zafarkhaja.semver;
|
||||||
* @author Zafar Khaja <zafarkhaja@gmail.com>
|
* @author Zafar Khaja <zafarkhaja@gmail.com>
|
||||||
* @since 0.7.0
|
* @since 0.7.0
|
||||||
*/
|
*/
|
||||||
public class GrammarException extends ParserException {
|
public class GrammarException extends ParseException {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a {@code GrammarException} instance with an error message.
|
* Constructs a {@code GrammarException} instance with an error message.
|
||||||
|
|
|
@ -29,21 +29,21 @@ package com.github.zafarkhaja.semver;
|
||||||
* @author Zafar Khaja <zafarkhaja@gmail.com>
|
* @author Zafar Khaja <zafarkhaja@gmail.com>
|
||||||
* @since 0.7.0
|
* @since 0.7.0
|
||||||
*/
|
*/
|
||||||
public class ParserException extends RuntimeException {
|
public class ParseException extends RuntimeException {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a {@code ParserException} instance with an error message.
|
* Constructs a {@code ParseException} instance with an error message.
|
||||||
*
|
*
|
||||||
* @param message the error message
|
* @param message the error message
|
||||||
*/
|
*/
|
||||||
public ParserException(String message) {
|
public ParseException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a {@code ParserException} instance with no error message.
|
* Constructs a {@code ParseException} instance with no error message.
|
||||||
*/
|
*/
|
||||||
public ParserException() {
|
public ParseException() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
package com.github.zafarkhaja.semver.expr;
|
package com.github.zafarkhaja.semver.expr;
|
||||||
|
|
||||||
import com.github.zafarkhaja.semver.ParserException;
|
import com.github.zafarkhaja.semver.ParseException;
|
||||||
import com.github.zafarkhaja.semver.expr.Lexer.*;
|
import com.github.zafarkhaja.semver.expr.Lexer.*;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ import java.util.Arrays;
|
||||||
* @author Zafar Khaja <zafarkhaja@gmail.com>
|
* @author Zafar Khaja <zafarkhaja@gmail.com>
|
||||||
* @since 0.7.0
|
* @since 0.7.0
|
||||||
*/
|
*/
|
||||||
public class UnexpectedTokenException extends ParserException {
|
public class UnexpectedTokenException extends ParseException {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The unexpected token.
|
* The unexpected token.
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class VersionParserTest {
|
||||||
public void shouldNotAllowDigitsInPreReleaseVersion() {
|
public void shouldNotAllowDigitsInPreReleaseVersion() {
|
||||||
try {
|
try {
|
||||||
VersionParser.parsePreRelease("alpha.01");
|
VersionParser.parsePreRelease("alpha.01");
|
||||||
} catch (ParserException e) {
|
} catch (ParseException e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fail("Should not allow digits in pre-release version");
|
fail("Should not allow digits in pre-release version");
|
||||||
|
@ -96,7 +96,7 @@ public class VersionParserTest {
|
||||||
public void shouldAllowDigitsInBuildMetadata() {
|
public void shouldAllowDigitsInBuildMetadata() {
|
||||||
try {
|
try {
|
||||||
VersionParser.parseBuild("build.01");
|
VersionParser.parseBuild("build.01");
|
||||||
} catch (ParserException e) {
|
} catch (ParseException e) {
|
||||||
fail("Should allow digits in build metadata");
|
fail("Should allow digits in build metadata");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user