Skip to content

Commit

Permalink
+ tiny clean-up removing dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-herrmann committed Aug 31, 2024
1 parent 7f70a85 commit cccf1f9
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cccf1f9

Please sign in to comment.