Skip to content

Commit

Permalink
Rename ParserInputFileObject to avoid classpath name conflict with th…
Browse files Browse the repository at this point in the history
…e java8 version of that class
  • Loading branch information
sambsnyd committed Oct 30, 2020
1 parent ba4d505 commit ecede9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public List<J.CompilationUnit> parseInputs(Iterable<Input> sourceFiles, @Nullabl
.register(meterRegistry)
.record(() -> {
try {
return compiler.parse(new ParserInputFileObject(input));
return compiler.parse(new Java11ParserInputFileObject(input));
} catch (IllegalStateException e) {
if (e.getMessage().equals("endPosTable already set")) {
throw new IllegalStateException("Call reset() on JavaParser before parsing another" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
* So that {@link JavaParser} can ingest source files from {@link InputStream} sources
* other than a file on disk.
*/
public class ParserInputFileObject implements JavaFileObject {
public class Java11ParserInputFileObject implements JavaFileObject {
private final Path path;
private final Parser.Input input;

public ParserInputFileObject(Parser.Input input) {
public Java11ParserInputFileObject(Parser.Input input) {
this.input = input;
this.path = input.getPath();
}
Expand Down Expand Up @@ -108,7 +108,7 @@ public Modifier getAccessLevel() {
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ParserInputFileObject that = (ParserInputFileObject) o;
Java11ParserInputFileObject that = (Java11ParserInputFileObject) o;
return path.equals(that.path);
}

Expand Down

0 comments on commit ecede9c

Please sign in to comment.