aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/javac/java7/CommentCollectingScannerFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/lombok/javac/java7/CommentCollectingScannerFactory.java')
-rw-r--r--src/utils/lombok/javac/java7/CommentCollectingScannerFactory.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/lombok/javac/java7/CommentCollectingScannerFactory.java b/src/utils/lombok/javac/java7/CommentCollectingScannerFactory.java
index 2032e494..626d3d63 100644
--- a/src/utils/lombok/javac/java7/CommentCollectingScannerFactory.java
+++ b/src/utils/lombok/javac/java7/CommentCollectingScannerFactory.java
@@ -50,7 +50,8 @@ public class CommentCollectingScannerFactory extends ScannerFactory {
// * Leave the return types as 'j.l.Object'.
// * Leave both make methods intact; deleting one has no effect on javac6- / javac7+, but breaks the other. Hard to test for.
// * Do not stub com.sun.tools.javac.util.Context or any of its inner types, like Factory.
- context.put(scannerFactoryKey, new Context.Factory() {
+ @SuppressWarnings("all")
+ class MyFactory implements Context.Factory {
// This overrides the javac6- version of make.
public Object make() {
return new CommentCollectingScannerFactory(context);
@@ -60,7 +61,9 @@ public class CommentCollectingScannerFactory extends ScannerFactory {
public Object make(Context c) {
return new CommentCollectingScannerFactory(c);
}
- });
+ }
+ @SuppressWarnings("unchecked") Context.Factory<ScannerFactory> factory = new MyFactory();
+ context.put(scannerFactoryKey, factory);
}
}