private void analyzeExceptions() { ExceptionHandlingFlowContext ehfc; try { this.body.analyseCode(this.scope, ehfc = new ExceptionInferenceFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)); this.thrownExceptions = ehfc.extendedExceptions == null ? Collections.emptySet() : new HashSet<TypeBinding>(ehfc.extendedExceptions); } catch (Exception e) { // drop silently. } } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
/** * Answer the problem reporter to use for raising new problems. * * Note that as a side-effect, this updates the current reference context * (unit, type or method) in case the problem handler decides it is necessary * to abort. */ public ProblemReporter problemReporter() { MethodScope outerMethodScope; if ((outerMethodScope = outerMostMethodScope()) == this) { ProblemReporter problemReporter = referenceCompilationUnit().problemReporter; problemReporter.referenceContext = this.referenceContext; return problemReporter; } return outerMethodScope.problemReporter(); }
private void analyzeExceptions() { ExceptionHandlingFlowContext ehfc; try { this.body.analyseCode(this.scope, ehfc = new ExceptionInferenceFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)); this.thrownExceptions = ehfc.extendedExceptions == null ? Collections.emptySet() : new HashSet<TypeBinding>(ehfc.extendedExceptions); } catch (Exception e) { // drop silently. } } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
private void analyzeExceptions() { ExceptionHandlingFlowContext ehfc; try { this.body.analyseCode(this.scope, ehfc = new ExceptionInferenceFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)); this.thrownExceptions = ehfc.extendedExceptions == null ? Collections.emptySet() : new HashSet<TypeBinding>(ehfc.extendedExceptions); } catch (Exception e) { // drop silently. } } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
private void analyzeExceptions() { ExceptionHandlingFlowContext ehfc; CompilerOptions compilerOptions = this.scope.compilerOptions(); boolean oldAnalyseResources = compilerOptions.analyseResourceLeaks; compilerOptions.analyseResourceLeaks = false; try { this.body.analyseCode(this.scope, ehfc = new ExceptionInferenceFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)); this.thrownExceptions = ehfc.extendedExceptions == null ? Collections.emptySet() : new HashSet<TypeBinding>(ehfc.extendedExceptions); } catch (Exception e) { // drop silently. } finally { compilerOptions.analyseResourceLeaks = oldAnalyseResources; } } @Override
private void analyzeExceptions() { ExceptionHandlingFlowContext ehfc; CompilerOptions compilerOptions = this.scope.compilerOptions(); boolean oldAnalyseResources = compilerOptions.analyseResourceLeaks; compilerOptions.analyseResourceLeaks = false; try { this.body.analyseCode(this.scope, ehfc = new ExceptionInferenceFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)); this.thrownExceptions = ehfc.extendedExceptions == null ? Collections.emptySet() : new HashSet<TypeBinding>(ehfc.extendedExceptions); } catch (Exception e) { // drop silently. } finally { compilerOptions.analyseResourceLeaks = oldAnalyseResources; } } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
private boolean doesNotCompleteNormally() { try { return this.body.analyseCode(this.scope, new ExceptionHandlingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)) == FlowInfo.DEAD_END; } catch (RuntimeException e) { this.scope.problemReporter().lambdaShapeComputationError(this); return this.valueCompatible; } } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
private boolean doesNotCompleteNormally() { try { return this.body.analyseCode(this.scope, new ExceptionHandlingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)) == FlowInfo.DEAD_END; } catch (RuntimeException e) { this.scope.problemReporter().lambdaShapeComputationError(this); return this.valueCompatible; } } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
private boolean doesNotCompleteNormally() { try { return this.body.analyseCode(this.scope, new ExceptionHandlingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(this.scope.outerMostMethodScope().analysisIndex, this.scope.referenceType().maxFieldCount)) == FlowInfo.DEAD_END; } catch (RuntimeException e) { this.scope.problemReporter().lambdaShapeComputationError(this); return this.valueCompatible; } } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {