@@ -28,7 +28,6 @@ public NginxBridge start(Map<String, String> properties) {
28
28
29
29
String libDirs = properties .get (BRIDGE_LIB_DIRS );
30
30
String cpDirs = properties .get (BRIDGE_LIB_CP );
31
- String loaderKey = libDirs +"\n " + cpDirs ;
32
31
ClassLoader bootstrapLoader = null ;
33
32
34
33
for (Entry <String , String > en : properties .entrySet ()) {
@@ -39,11 +38,27 @@ public NginxBridge start(Map<String, String> properties) {
39
38
}
40
39
41
40
String bridgeImp = properties .get (BRIDGE_IMP );
41
+
42
+ NginxClojureRT .getLog ().info ("%s.boot() with bridge.lib.dirs : [%s]" , bridgeImp , libDirs );
43
+ NginxClojureRT .getLog ().info ("%s.boot() with bridge.lib.cp : [%s]" , bridgeImp , cpDirs );
42
44
43
45
List <URL > urlList = new ArrayList <URL >();
44
46
if (libDirs != null ) {
45
47
for (String dir : libDirs .split (File .pathSeparator )) {
46
- for (File f : new File (dir ).listFiles ()) {
48
+ File [] fileList = new File (dir ).listFiles ();
49
+
50
+ if (fileList == null ) {
51
+ NginxClojureRT .getLog ().warn ("%s.boot() no jar/dir in path : [%s]" , bridgeImp , dir );
52
+ continue ;
53
+ }
54
+
55
+ for (File f : fileList ) {
56
+
57
+ if (!f .canRead ()) {
58
+ NginxClojureRT .getLog ().warn ("%s.boot() [%s] is not readable or we have no read permission" , bridgeImp , f .getAbsolutePath ());
59
+ continue ;
60
+ }
61
+
47
62
try {
48
63
if (f .isFile () && f .getName ().endsWith (".jar" )) {
49
64
urlList .add (f .toURI ().toURL ());
@@ -59,6 +74,12 @@ public NginxBridge start(Map<String, String> properties) {
59
74
if (cpDirs != null ) {
60
75
for (String dir : cpDirs .split (File .pathSeparator )) {
61
76
File f = new File (dir );
77
+
78
+ if (!f .canRead ()) {
79
+ NginxClojureRT .getLog ().warn ("%s.boot() [%s] is not readable or we have no read permission" , bridgeImp , f .getAbsolutePath ());
80
+ continue ;
81
+ }
82
+
62
83
try {
63
84
if (f .isFile () && f .getName ().endsWith (".jar" )) {
64
85
urlList .add (f .toURI ().toURL ());
0 commit comments