Skip to content

Commit

Permalink
Adds TODO for the static methods to construct listeners and contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedquinn committed Oct 24, 2024
1 parent 5446fcd commit 7c389a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions partiql-spi/src/main/java/org/partiql/spi/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ default PErrorListener getErrorListener() {
* The default utilizes {@link PErrorListener#abortOnError()} for the {@link Context#getErrorListener()}.
* @return the default implementation of {@link Context}.
*/
// TODO: Should this be a static variable?
static Context standard() {
return new Context() {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ public interface PErrorListener {
* {@link PErrorException}.
* @return an {@link PErrorListener} that throws an {@link PErrorException} upon encountering an error.
*/
// TODO: Should this be a static variable?
@NotNull
static PErrorListener abortOnError() {
return new PErrorListener() {
@Override
public void report(@NotNull PError error) throws PErrorException {
if (error.severity.code() == Severity.ERROR) {
throw new PErrorException(error);
}
return error -> {
if (error.severity.code() == Severity.ERROR) {
throw new PErrorException(error);
}
};
}
Expand Down

0 comments on commit 7c389a1

Please sign in to comment.