Hi Max Areshkau,
I'm curious why swallowing the exception is the right way to solve JBIDE-1568 -
can't we avoid the exception to be thrown in the first place?
/max
------- Forwarded message -------
From: jbosstools-commits(a)lists.jboss.org
To: jbosstools-commits(a)lists.jboss.org
Cc:
Subject: [jbosstools-commits] JBoss Tools SVN: r5733 -
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces.
Date: Wed, 16 Jan 2008 12:34:04 +0100
Author: mareshkau
Date: 2008-01-16 06:34:04 -0500 (Wed, 16 Jan 2008)
New Revision: 5733
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
Log:
code adjusment
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-01-16
10:36:39 UTC (rev 5732)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-01-16
11:34:04 UTC (rev 5733)
@@ -24,6 +24,7 @@
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
+import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -248,8 +249,13 @@
NamedNodeMap namedNodeMap = sourceNode.getAttributes();
for (int i = 0; i < namedNodeMap.getLength(); i++) {
Node attribute = namedNodeMap.item(i);
+ //added by Max Areshkau fix for JBIDE-1568
+ try {
visualElement.setAttribute(attribute.getNodeName(), attribute
.getNodeValue());
+ } catch(XPCOMException ex) {
+ //Just ignore this exception
+ }
}
}
_______________________________________________
jbosstools-commits mailing list
jbosstools-commits(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-commits
--
Using Opera's revolutionary e-mail client:
http://www.opera.com/mail/