Merge pull request #261 from liblit/warning-fixes-deprecated-AST-JLS8

Suppress deprecation warnings about requesting an old AST version
This commit is contained in:
Julian Dolby 2017-11-19 17:41:59 -05:00 committed by GitHub
commit 5faae993e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -184,6 +184,7 @@ public class ECJSourceModuleTranslator implements SourceModuleTranslator {
}
String[] sourceFiles = sources.toArray(new String[ sources.size() ]);
@SuppressWarnings("deprecation")
final ASTParser parser = ASTParser.newParser(AST.JLS8);
parser.setResolveBindings(true);
parser.setEnvironment(libs, this.sources, null, false);

View File

@ -172,6 +172,7 @@ public class JDTSourceModuleTranslator implements SourceModuleTranslator {
projectsFiles.get(proj).put(JavaCore.createCompilationUnitFrom(entry.getIFile()), entry);
}
@SuppressWarnings("deprecation")
final ASTParser parser = ASTParser.newParser(AST.JLS8);
for (final Map.Entry<IProject,Map<ICompilationUnit,EclipseSourceFileModule>> proj : projectsFiles.entrySet()) {