myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r499397 - /myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
Date Wed, 24 Jan 2007 13:26:07 GMT
Author: imario
Date: Wed Jan 24 05:26:07 2007
New Revision: 499397

URL: http://svn.apache.org/viewvc?view=rev&rev=499397
Log:
avoid npe in case of resource not found

Modified:
    myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java

Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java?view=diff&rev=499397&r1=499396&r2=499397
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
(original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
Wed Jan 24 05:26:07 2007
@@ -856,6 +856,11 @@
 		InputStream in = null;
 		try {
 			in = ctx.getExternalContext().getResourceAsStream(file);
+			if (in == null)
+			{
+				return null;
+			}
+
 			byte[] fileBuffer = new byte[10240];
 			int read;
 			while ((read = in.read(fileBuffer)) > -1)



Mime
View raw message