-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring to support reverse variable matching for issue #2
- Loading branch information
Showing
14 changed files
with
366 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/damnhandy/uri/template/IllegalOperatorException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* | ||
* | ||
*/ | ||
package com.damnhandy.uri.template; | ||
|
||
/** | ||
* A IllegalOperatorException. | ||
* | ||
* @author <a href="[email protected]">Ryan J. McDonough</a> | ||
* @version $Revision: 1.1 $ | ||
*/ | ||
public class IllegalOperatorException extends Exception | ||
{ | ||
|
||
/** The serialVersionUID */ | ||
private static final long serialVersionUID = 7874128076415224267L; | ||
|
||
|
||
/** | ||
* Create a new IllegalOperatorException. | ||
* | ||
* @param message | ||
*/ | ||
public IllegalOperatorException(String message) | ||
{ | ||
super(message); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
/** | ||
* Raised when the the template processor encounters an issue parsing the URI template string. It indicates | ||
* the template contains an expression that is malformed. | ||
* the either the template itself is malformed, or an expression within the template is malformed. | ||
* | ||
* @author <a href="[email protected]">Ryan J. McDonough</a> | ||
* @version $Revision: 1.1 $ | ||
|
@@ -29,25 +29,32 @@ public class MalformedUriTemplateException extends Exception | |
/** The serialVersionUID */ | ||
private static final long serialVersionUID = 5883174281977078450L; | ||
|
||
private int location; | ||
/** | ||
* Create a new UriTemplateParseException. | ||
* | ||
* @param message | ||
* @param cause | ||
*/ | ||
public MalformedUriTemplateException(String message, Throwable cause) | ||
public MalformedUriTemplateException(String message, int location, Throwable cause) | ||
{ | ||
super(message, cause); | ||
this.location = location; | ||
} | ||
|
||
/** | ||
* Create a new UriTemplateParseException. | ||
* | ||
* @param message | ||
*/ | ||
public MalformedUriTemplateException(String message) | ||
public MalformedUriTemplateException(String message, int location) | ||
{ | ||
super(message); | ||
this.location = location; | ||
} | ||
|
||
public int getLocation() | ||
{ | ||
return this.location; | ||
} | ||
} |
Oops, something went wrong.
33c81a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see advances in this direction!