@@ -81,19 +81,21 @@ public static ResourceRef toResourceRef(Resource folder) throws IOException {
8181 + Arrays .toString (modifiers ));
8282 }
8383 } else {
84- JarFile jarFile = new JarFile (rr .getResource ().getFile ());
85- Manifest manifest = jarFile .getManifest ();
86- if (manifest != null ) {
87- Attributes attributes = manifest .getMainAttributes ();
88- String attrValue = attributes .getValue ("rose" );
89- if (attrValue == null ) {
90- attrValue = attributes .getValue ("Rose" );
91- }
92- if (attrValue != null ) {
93- modifiers = StringUtils .split (attrValue , ", ;\n \r \t " );
94- if (logger .isDebugEnabled ()) {
95- logger .debug ("modifiers[by manifest.mf][" + rr .getResource ().getURI ()
96- + "]=" + Arrays .toString (modifiers ));
84+ if (rr .getResource ().getFile ().exists ()){
85+ JarFile jarFile = new JarFile (rr .getResource ().getFile ());
86+ Manifest manifest = jarFile .getManifest ();
87+ if (manifest != null ) {
88+ Attributes attributes = manifest .getMainAttributes ();
89+ String attrValue = attributes .getValue ("rose" );
90+ if (attrValue == null ) {
91+ attrValue = attributes .getValue ("Rose" );
92+ }
93+ if (attrValue != null ) {
94+ modifiers = StringUtils .split (attrValue , ", ;\n \r \t " );
95+ if (logger .isDebugEnabled ()) {
96+ logger .debug ("modifiers[by manifest.mf][" + rr .getResource ().getURI ()
97+ + "]=" + Arrays .toString (modifiers ));
98+ }
9799 }
98100 }
99101 }
0 commit comments