Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit d9dd84f

Browse files
committed
Remove unwanted option
1 parent 5bc098f commit d9dd84f

File tree

3 files changed

+0
-113
lines changed

3 files changed

+0
-113
lines changed

spring-graalvm-native-feature/src/main/java/org/springframework/graalvm/support/ConfigOptions.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public abstract class ConfigOptions {
4040

4141
private static List<String> BUILD_TIME_PROPERTIES_CHECKS;
4242

43-
private static List<String> IGNORED_TYPES;
44-
4543
private final static boolean BUILD_TIME_PROPERTIES_MATCH_IF_MISSING;
4644

4745
private final static boolean REMOVE_UNUSED_AUTOCONFIG;
@@ -75,16 +73,6 @@ public abstract class ConfigOptions {
7573
private static Boolean SPRING_INIT_ACTIVE = null;
7674

7775
static {
78-
String ignoredTypes = System.getProperty("spring.native.ignore-types");
79-
if (ignoredTypes != null) {
80-
String[] splits = ignoredTypes.split(",");
81-
if (splits != null) {
82-
IGNORED_TYPES = new ArrayList<>();
83-
for (String split: splits) {
84-
IGNORED_TYPES.add(split);
85-
}
86-
}
87-
}
8876
String propChecks = System.getProperty("spring.native.build-time-properties-checks");
8977
if (propChecks != null) {
9078
// default-include-all/default-exclude-all and then a series of patterns
@@ -384,27 +372,4 @@ public static boolean buildTimeCheckableProperty(String key) {
384372
return true;
385373
}
386374
}
387-
388-
public static List<String> getIgnoredTypes() {
389-
return IGNORED_TYPES;
390-
}
391-
392-
public static boolean shouldIgnoreType(String typename) {
393-
if (IGNORED_TYPES==null) {
394-
return false;
395-
}
396-
for (String ignoredType: IGNORED_TYPES) {
397-
if (ignoredType.endsWith(".")) {
398-
// its a package
399-
if (typename.startsWith(ignoredType)) {
400-
return true;
401-
}
402-
} else {
403-
if (ignoredType.equals(typename)) {
404-
return true;
405-
}
406-
}
407-
}
408-
return false;
409-
}
410375
}

spring-graalvm-native-feature/src/main/java/org/springframework/graalvm/support/ResourcesHandler.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,33 +1046,6 @@ private boolean checkJmxConstraint(Type type, ProcessingContext pc) {
10461046
}
10471047

10481048

1049-
private boolean checkConditionalOnClass(Type type) {
1050-
boolean isOK = type.testAnyConditionalOnClass();
1051-
if (!isOK) {
1052-
SpringFeature.log(type.getDottedName()+" FAILED ConditionalOnClass check - returning FALSE");
1053-
return false;
1054-
}
1055-
return true;
1056-
}
1057-
1058-
private boolean checkConditionalOnBean(Type type) {
1059-
boolean isOK = type.testAnyConditionalOnBean();
1060-
if (!isOK) {
1061-
SpringFeature.log(type.getDottedName()+" FAILED ConditionalOnBean check - returning FALSE");
1062-
return false;
1063-
}
1064-
return true;
1065-
}
1066-
1067-
private boolean checkConditionalOnMissingBean(Type type) {
1068-
boolean isOK = type.testAnyConditionalOnMissingBean();
1069-
if (!isOK) {
1070-
SpringFeature.log(type.getDottedName()+" FAILED ConditionalOnMissingBean check - returning FALSE");
1071-
return false;
1072-
}
1073-
return true;
1074-
}
1075-
10761049
// private boolean checkConditionalOnEnabledMetricsExport(Type type) {
10771050
// boolean isOK = type.testAnyConditionalOnEnabledMetricsExport();
10781051
// if (!isOK) {

spring-graalvm-native-feature/src/main/java/org/springframework/graalvm/type/Type.java

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,57 +2570,6 @@ private AnnotationNode getAnnotation(String Ldescriptor) {
25702570
return null;
25712571
}
25722572

2573-
public boolean testAnyConditionalOnBean() {
2574-
// Examples:
2575-
// @ConditionalOnBean({ CacheMeterBinderProvider.class, MeterRegistry.class })
2576-
AnnotationNode annotation = getAnnotation(AtConditionalOnBean);
2577-
if (annotation != null) {
2578-
List<String> classDescriptors = findConditionalOnBeanValue(); // Lfoo/Bar;
2579-
for (String classDescriptor: classDescriptors) {
2580-
String typename = fromLdescriptorToDotted(classDescriptor);
2581-
Type resolved = typeSystem.resolveDotted(typename,true);
2582-
if (/*resolved==null ||*/ ConfigOptions.shouldIgnoreType(typename)) {
2583-
return false;
2584-
}
2585-
}
2586-
}
2587-
return true;
2588-
}
2589-
2590-
public boolean testAnyConditionalOnMissingBean() {
2591-
// Examples:
2592-
// @ConditionalOnMissingBean({ CacheMeterBinderProvider.class, MeterRegistry.class })
2593-
AnnotationNode annotation = getAnnotation(AtConditionalOnMissingBean);
2594-
if (annotation != null) {
2595-
List<String> classDescriptors = findConditionalOnBeanValue(); // Lfoo/Bar;
2596-
for (String classDescriptor: classDescriptors) {
2597-
String typename = fromLdescriptorToDotted(classDescriptor);
2598-
Type resolved = typeSystem.resolveDotted(typename,true);
2599-
if (/*resolved==null ||*/ ConfigOptions.shouldIgnoreType(typename)) {
2600-
return false;
2601-
}
2602-
}
2603-
}
2604-
return true;
2605-
}
2606-
2607-
public boolean testAnyConditionalOnClass() {
2608-
// Examples:
2609-
// @ConditionalOnClass(MeterRegistry.class)
2610-
AnnotationNode annotation = getAnnotation(AtConditionalOnClass);
2611-
if (annotation != null) {
2612-
List<String> classDescriptors = findConditionalOnClassValue(); // Lfoo/Bar;
2613-
for (String classDescriptor: classDescriptors) {
2614-
String typename = fromLdescriptorToDotted(classDescriptor);
2615-
Type resolved = typeSystem.resolveDotted(typename,true);
2616-
if (/*resolved==null ||*/ ConfigOptions.shouldIgnoreType(typename)) {
2617-
return false;
2618-
}
2619-
}
2620-
}
2621-
return true;
2622-
}
2623-
26242573
/**
26252574
* Find any @ConditionalOnProperty and see if the specified property should be checked at build time. If it should be and
26262575
* fails the check, return the property name in question.

0 commit comments

Comments
 (0)