[Yanel-commits] rev 54957 -
public/yanel/contributions/realms/konakart-yanel-realm/res-types/image/src/java/org/wyona/yanel/resources/konakart/image
michi at wyona.com
michi at wyona.com
Thu Nov 25 11:46:21 CET 2010
Author: michi
Date: 2010-11-25 11:46:20 +0100 (Thu, 25 Nov 2010)
New Revision: 54957
Modified:
public/yanel/contributions/realms/konakart-yanel-realm/res-types/image/src/java/org/wyona/yanel/resources/konakart/image/KonakartImageResource.java
Log:
log if images cannot be found
Modified: public/yanel/contributions/realms/konakart-yanel-realm/res-types/image/src/java/org/wyona/yanel/resources/konakart/image/KonakartImageResource.java
===================================================================
--- public/yanel/contributions/realms/konakart-yanel-realm/res-types/image/src/java/org/wyona/yanel/resources/konakart/image/KonakartImageResource.java 2010-11-25 10:43:10 UTC (rev 54956)
+++ public/yanel/contributions/realms/konakart-yanel-realm/res-types/image/src/java/org/wyona/yanel/resources/konakart/image/KonakartImageResource.java 2010-11-25 10:46:20 UTC (rev 54957)
@@ -26,9 +26,11 @@
* @see org.wyona.yanel.core.api.attributes.ViewableV2#exists()
*/
public boolean exists() throws Exception {
- if (new File(getResourceConfigProperty(BASE_PATH_PROPERTY_NAME) + File.separator + getName()).isFile()) {
+ File file = new File(getResourceConfigProperty(BASE_PATH_PROPERTY_NAME) + File.separator + getName());
+ if (file.isFile()) {
return true;
} else {
+ log.warn("No such image: " + file + " (IMPORTANT: Please note that only the name of the image '" + getName() + "' is used, but not the path '" + getPath() + "' itself)");
return false;
}
}
More information about the Yanel-commits
mailing list