< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java

Print this page
rev 3356 : [mq]: 8140281-deprecation-optional.get

@@ -337,11 +337,13 @@
                     .filter(m -> m != tree.modle)
                     .filter(cand -> visiblePackages.get(tree.packge.fullname) == syms.getPackage(cand, tree.packge.fullname))
                     .findAny();
 
             if (dependencyWithPackage.isPresent()) {
-                log.error(pd, Errors.PackageInOtherModule(dependencyWithPackage.get()));
+                @SuppressWarnings("deprecation")
+                ModuleSymbol moduleSymbol = dependencyWithPackage.get();
+                log.error(pd, Errors.PackageInOtherModule(moduleSymbol));
             }
 
             tree.packge.complete(); // Find all classes in package.
 
             Env<AttrContext> topEnv = topLevelEnv(tree);
< prev index next >