forked from airlift/airline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Missing required option doesn't throw
This is a proposed fix for: airlift#22 Tests still need to be fixed.
- Loading branch information
Showing
3 changed files
with
80 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.airlift.airline; | ||
|
||
import com.google.common.collect.ImmutableList; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class ParseResult { | ||
private List<ParseException> errors = Collections.emptyList(); | ||
|
||
public void addError(ParseException error) { | ||
errors.add(error); | ||
} | ||
|
||
public boolean hasErrors() { | ||
return errors.size() != 0; | ||
} | ||
|
||
public List<ParseException> getErrors() { | ||
return ImmutableList.copyOf(errors); | ||
} | ||
} |
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