Suppress deprecation warnings about requesting an old AST version

Near as I can tell, the requests for deprecated versions here are
intentional.  The non-deprecated version (AST.JLS9) is the latest and
greatest, but as far as I can tell we really do want the older version
here.

This is similar to 6caecce3e7, though in
that case JLS8 was the non-reprecated latest version and we were still
asking for JLS3.
This commit is contained in:
Ben Liblit 2017-11-19 15:43:45 -06:00
parent 1d239dac52
commit d79707e137
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()) {