On Fri, Apr 1, 2011 at 07:55, Marius Dumitru Florea
<mariusdumitru.florea(a)xwiki.com> wrote:
Hi Sergiu,
On 04/01/2011 03:53 AM, sdumitriu (SVN) wrote:
Author: sdumitriu
Date: 2011-04-01 02:53:38 +0200 (Fri, 01 Apr 2011)
New Revision: 36234
Modified:
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java
Log:
XWIKI-6212: Images not displayed in the administration of xwiki 3.0
Trying a workaround
Modified:
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java
===================================================================
---
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java
2011-03-31 23:39:50 UTC (rev 36233)
+++
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ImagePlugin.java
2011-04-01 00:53:38 UTC (rev 36234)
@@ -202,7 +202,12 @@
@Override
public XWikiAttachment downloadAttachment(XWikiAttachment attachment, XWikiContext
context)
{
- if (!this.imageProcessor.isMimeTypeSupported(attachment.getMimeType(context))) {
+ try {
+ if
(!this.imageProcessor.isMimeTypeSupported(attachment.getMimeType(context))) {
+ return attachment;
+ }
+ } catch (NoClassDefFoundError ex) {
+ // Happens on certain systems where the javax.imageio package is not
available
I'd like to more the try/catch inside the isMimeTypeSupported method. If
javax.imageio.ImageIO is missing I don't think we can process the image
anyway. WDYT?
Thanks,
Marius
return attachment;
}
_______________________________________________
notifications mailing list
notifications(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs