Author: mlusetti
Date: Wed Nov 2 14:43:31 2011
New Revision: 1196608
URL: http://svn.apache.org/viewvc?rev=1196608&view=rev
Log:
TAP5-1425 Throw an exception if asset is found but does not actually exists
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java?rev=1196608&r1=1196607&r2=1196608&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
Wed Nov 2 14:43:31 2011
@@ -133,7 +133,7 @@ public class AssetSourceImpl implements
{
Resource localized = locale == null ? unlocalized :
unlocalized.forLocale(locale);
- if (localized == null)
+ if (localized == null || !localized.exists())
throw new RuntimeException(String.format("Unable to locate asset
'%s' (the file does not exist).", unlocalized));
return getAssetForResource(localized);