@@ -73,12 +73,12 @@ public static ImportCandidates load(Class<?> annotation, ClassLoader classLoader
73
73
ClassLoader classLoaderToUse = decideClassloader (classLoader );
74
74
String location = String .format (LOCATION , annotation .getName ());
75
75
Enumeration <URL > urls = findUrlsInClasspath (classLoaderToUse , location );
76
- List <String > autoConfigurations = new ArrayList <>();
76
+ List <String > importCandidates = new ArrayList <>();
77
77
while (urls .hasMoreElements ()) {
78
78
URL url = urls .nextElement ();
79
- autoConfigurations .addAll (readAutoConfigurations (url ));
79
+ importCandidates .addAll (readCandidateConfigurations (url ));
80
80
}
81
- return new ImportCandidates (autoConfigurations );
81
+ return new ImportCandidates (importCandidates );
82
82
}
83
83
84
84
private static ClassLoader decideClassloader (ClassLoader classLoader ) {
@@ -93,28 +93,27 @@ private static Enumeration<URL> findUrlsInClasspath(ClassLoader classLoader, Str
93
93
return classLoader .getResources (location );
94
94
}
95
95
catch (IOException ex ) {
96
- throw new IllegalArgumentException ("Failed to load autoconfigurations from location [" + location + "]" ,
97
- ex );
96
+ throw new IllegalArgumentException ("Failed to load configurations from location [" + location + "]" , ex );
98
97
}
99
98
}
100
99
101
- private static List <String > readAutoConfigurations (URL url ) {
100
+ private static List <String > readCandidateConfigurations (URL url ) {
102
101
try (BufferedReader reader = new BufferedReader (
103
102
new InputStreamReader (new UrlResource (url ).getInputStream (), StandardCharsets .UTF_8 ))) {
104
- List <String > autoConfigurations = new ArrayList <>();
103
+ List <String > candidates = new ArrayList <>();
105
104
String line ;
106
105
while ((line = reader .readLine ()) != null ) {
107
106
line = stripComment (line );
108
107
line = line .trim ();
109
108
if (line .isEmpty ()) {
110
109
continue ;
111
110
}
112
- autoConfigurations .add (line );
111
+ candidates .add (line );
113
112
}
114
- return autoConfigurations ;
113
+ return candidates ;
115
114
}
116
115
catch (IOException ex ) {
117
- throw new IllegalArgumentException ("Unable to load autoconfigurations from location [" + url + "]" , ex );
116
+ throw new IllegalArgumentException ("Unable to load configurations from location [" + url + "]" , ex );
118
117
}
119
118
}
120
119
0 commit comments