You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ch...@apache.org on 2005/07/15 22:41:15 UTC

svn commit: r219244 - /lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java

Author: chestnut
Date: Fri Jul 15 13:41:14 2005
New Revision: 219244

URL: http://svn.apache.org/viewcvs?rev=219244&view=rev
Log:
added check to see if resource.getMimeType() returns null, resolves Bug 35759

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java?rev=219244&r1=219243&r2=219244&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java Fri Jul 15 13:41:14 2005
@@ -50,7 +50,10 @@
             List selectedResources = new ArrayList();
             String mimeTypePrefix = getParameterAsString("mimeTypePrefix", "");
             for (int i = 0; i < resources.length; i++) {
-                if (resources[i].getMimeType().startsWith(mimeTypePrefix)) {
+                String resMimeType = resources[i].getMimeType();
+                if(resMimeType == null)
+                    resMimeType = "unknown";
+                if (resMimeType.startsWith(mimeTypePrefix)) {
                     selectedResources.add(resources[i]);
                 }
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org