File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
operator-framework/src/main/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
import io .javaoperatorsdk .operator .api .ResourceController ;
7
7
import org .apache .commons .lang3 .ClassUtils ;
8
8
9
+ import java .io .BufferedReader ;
9
10
import java .io .IOException ;
11
+ import java .io .InputStreamReader ;
10
12
import java .net .URL ;
11
13
import java .nio .file .Files ;
12
14
import java .nio .file .Path ;
@@ -25,9 +27,12 @@ public class ControllerUtils {
25
27
final Enumeration <URL > customResourcesMetadaList = ControllerUtils .class .getClassLoader ().getResources (CONTROLLERS_RESOURCE_PATH );
26
28
for (Iterator <URL > it = customResourcesMetadaList .asIterator (); it .hasNext (); ) {
27
29
URL url = it .next ();
28
- final List <String > classNamePairs = Files .lines (Path .of (url .getPath ()))
29
- .collect (Collectors .toList ());
30
30
31
+ List <String > classNamePairs = new BufferedReader (
32
+ new InputStreamReader (
33
+ url .openStream ()
34
+ )
35
+ ).lines ().collect (Collectors .toList ());
31
36
classNamePairs .forEach (clazzPair -> {
32
37
try {
33
38
You can’t perform that action at this time.
0 commit comments