if (contextName != null) {
if (!path.startsWith(contextName + "/")) {
return;
- } else {
- path = path.substring(contextName.length());
}
+ path = path.substring(contextName.length());
}
}
object = context.lookup(path);
try {
connect();
} catch (IOException e) {
+ // Ignore
}
}
Date lmDate = (Date) lastModified.get();
return lmDate.getTime();
} catch (Exception e) {
+ // Ignore
}
}
try {
connect();
} catch (IOException e) {
+ //Ignore
}
}
try {
connect();
} catch (IOException e) {
+ // Ignore
}
}
public Object getContent(Class[] classes)
throws IOException {
- Object object = getContent();
+ Object obj = getContent();
for (int i = 0; i < classes.length; i++) {
- if (classes[i].isInstance(object))
- return object;
+ if (classes[i].isInstance(obj))
+ return obj;
}
return null;
if (resource == null) {
throw new FileNotFoundException();
- } else {
- // Reopen resource
- try {
- resource = (Resource) context.lookup(getURL().getFile());
- } catch (NamingException e) {
- }
+ }
+
+ // Reopen resource
+ try {
+ resource = (Resource) context.lookup(getURL().getFile());
+ } catch (NamingException e) {
+ // Ignore
}
return (resource.streamContent());