|
22 | 22 |
|
23 | 23 | import static com.github.javaparser.ParseStart.*; |
24 | 24 | import static com.github.javaparser.Problem.PROBLEM_BY_BEGIN_POSITION; |
| 25 | +import static com.github.javaparser.Providers.UTF8; |
25 | 26 | import static com.github.javaparser.Providers.provider; |
26 | 27 | import static com.github.javaparser.Providers.resourceProvider; |
27 | | -import static com.github.javaparser.Providers.UTF8; |
28 | 28 | import static com.github.javaparser.utils.Utils.assertNotNull; |
29 | 29 | import static java.util.stream.Collectors.toList; |
30 | 30 |
|
31 | 31 | import com.github.javaparser.ast.CompilationUnit; |
32 | 32 | import com.github.javaparser.ast.ImportDeclaration; |
33 | | -import com.github.javaparser.ast.StubUnit; |
34 | 33 | import com.github.javaparser.ast.Node; |
35 | 34 | import com.github.javaparser.ast.PackageDeclaration; |
| 35 | +import com.github.javaparser.ast.StubUnit; |
36 | 36 | import com.github.javaparser.ast.body.BodyDeclaration; |
37 | 37 | import com.github.javaparser.ast.body.MethodDeclaration; |
38 | 38 | import com.github.javaparser.ast.body.Parameter; |
@@ -224,7 +224,7 @@ public ParseResult<CompilationUnit> parse(final File file, final Charset encodin |
224 | 224 | * @throws FileNotFoundException the file was not found. |
225 | 225 | */ |
226 | 226 | public ParseResult<StubUnit> parseStubUnit(final File file, final Charset encoding) throws FileNotFoundException { |
227 | | - ParseResult<StubUnit> result = parse(STUB_UNIT, provider(file, encoding)); |
| 227 | + ParseResult<StubUnit> result = parse(STUB_UNIT, provider(file, encoding)); |
228 | 228 | result.getResult().ifPresent(cu -> cu.setStorage(file.toPath())); |
229 | 229 | return result; |
230 | 230 | } |
@@ -256,7 +256,7 @@ public ParseResult<CompilationUnit> parse(final File file) throws FileNotFoundEx |
256 | 256 | * @throws FileNotFoundException the file was not found. |
257 | 257 | */ |
258 | 258 | public ParseResult<StubUnit> parseStubUnit(final File file) throws FileNotFoundException { |
259 | | - ParseResult<StubUnit> result = parse(STUB_UNIT, provider(file)); |
| 259 | + ParseResult<StubUnit> result = parse(STUB_UNIT, provider(file)); |
260 | 260 | result.getResult().ifPresent(cu -> cu.setStorage(file.toPath())); |
261 | 261 | return result; |
262 | 262 | } |
@@ -417,7 +417,8 @@ public ParseResult<CompilationUnit> parseResource( |
417 | 417 | * @throws ParseProblemException if the source code has parser errors. |
418 | 418 | * @throws IOException the path could not be accessed. |
419 | 419 | */ |
420 | | - public ParseResult<StubUnit> parseResourceStubUnit(final ClassLoader classLoader, final String path, Charset encoding) throws IOException { |
| 420 | + public ParseResult<StubUnit> parseResourceStubUnit( |
| 421 | + final ClassLoader classLoader, final String path, Charset encoding) throws IOException { |
421 | 422 | return parse(STUB_UNIT, resourceProvider(classLoader, path, encoding)); |
422 | 423 | } |
423 | 424 |
|
|
0 commit comments