diff --git a/java-frontend/src/main/java/org/sonar/plugins/java/api/JavaFileScannerContext.java b/java-frontend/src/main/java/org/sonar/plugins/java/api/JavaFileScannerContext.java index b40b00eb81d..25d8e9dedb3 100644 --- a/java-frontend/src/main/java/org/sonar/plugins/java/api/JavaFileScannerContext.java +++ b/java-frontend/src/main/java/org/sonar/plugins/java/api/JavaFileScannerContext.java @@ -45,7 +45,7 @@ public interface JavaFileScannerContext extends InputFileScannerContext { * @return SemanticModel if semantic analysis was successful, null otherwise. */ @Nullable - Sema getSemanticModel(); + Object getSemanticModel(); /** * Checks if file has been parsed correctly. diff --git a/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/se/ExplodedGraphWalker.java b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/se/ExplodedGraphWalker.java index 98b82eeb409..7db73e5adbc 100644 --- a/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/se/ExplodedGraphWalker.java +++ b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/se/ExplodedGraphWalker.java @@ -191,7 +191,7 @@ public ExplodedGraphWalker(BehaviorCache behaviorCache, JavaFileScannerContext c this.alwaysTrueOrFalseExpressionCollector = new AlwaysTrueOrFalseExpressionCollector(); this.checkerDispatcher = new CheckerDispatcher(this, checks, context); this.behaviorCache = behaviorCache; - this.semanticModel = context.getSemanticModel(); + this.semanticModel = (Sema) context.getSemanticModel(); } @VisibleForTesting @@ -205,7 +205,7 @@ protected ExplodedGraphWalker(List seChecks, BehaviorCache behaviorCach this.alwaysTrueOrFalseExpressionCollector = new AlwaysTrueOrFalseExpressionCollector(); this.checkerDispatcher = new CheckerDispatcher(this, seChecks, context); this.behaviorCache = behaviorCache; - this.semanticModel = context.getSemanticModel(); + this.semanticModel = (Sema) context.getSemanticModel(); } public MethodBehavior visitMethod(MethodTree tree) {