From cccf1f920012d0f423ef45a79f3e5072b8ee0f78 Mon Sep 17 00:00:00 2001 From: Stephan Herrmann Date: Sat, 31 Aug 2024 21:14:10 +0200 Subject: [PATCH] + tiny clean-up removing dead code --- .../jdt/internal/compiler/ast/InstanceOfExpression.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java index 58405f5f6b5..9118d0b3ddb 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java @@ -371,17 +371,10 @@ private void checkForPrimitives(BlockScope scope, TypeBinding checkedType, TypeB } private void checkRefForPrimitivesAndAddSecretVariable(BlockScope scope, TypeBinding checkedType, TypeBinding expressionType) { - if (!(JavaFeature.PRIMITIVES_IN_PATTERNS.isSupported( - scope.compilerOptions().sourceLevel, - scope.compilerOptions().enablePreviewFeatures))) + if (!JavaFeature.PRIMITIVES_IN_PATTERNS.isSupported(scope.compilerOptions())) return; PrimitiveConversionRoute route = Pattern.findPrimitiveConversionRoute(checkedType, expressionType, scope); this.testContextRecord = new TestContextRecord(checkedType, expressionType, route); - if (route == PrimitiveConversionRoute.UNBOXING_CONVERSION - || route == PrimitiveConversionRoute.UNBOXING_AND_WIDENING_PRIMITIVE_CONVERSION - ) { - addSecretExpressionValue(scope, expressionType); - } } private void addSecretExpressionValue(BlockScope scope, TypeBinding expressionType) {