Author: dgolovin
Date: 2008-08-25 14:06:25 -0400 (Mon, 25 Aug 2008)
New Revision: 9883
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/AnyElementForm.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/TabbedPreferencesPage.java
Log:
PMD violations fix
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/AnyElementForm.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/AnyElementForm.java 2008-08-25
16:14:29 UTC (rev 9882)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/AnyElementForm.java 2008-08-25
18:06:25 UTC (rev 9883)
@@ -292,11 +292,7 @@
String name = tableProvider.getValueAt(i, 0);
Properties p = new Properties();
p.setProperty("name", name);
- try {
- XActionInvoker.invoke("AnyElementNew",
"EditActions.EditAttribute", xmo, p);
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ XActionInvoker.invoke("AnyElementNew", "EditActions.EditAttribute",
xmo, p);
}
void delete() throws XModelException {
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/TabbedPreferencesPage.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/TabbedPreferencesPage.java 2008-08-25
16:14:29 UTC (rev 9882)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/TabbedPreferencesPage.java 2008-08-25
18:06:25 UTC (rev 9883)
@@ -52,8 +52,8 @@
private List convertPathArrayToPreferencePageList(String[] path) {
XModel model = getPreferenceModel();
- if(model==null) throw new NullPointerException("Preference XModel not
loaded.");
- if(path==null) throw new NullPointerException("String array with path's cannot
be null");
+ if(model==null) throw new IllegalArgumentException("Preference XModel not
loaded.");
+ if(path==null) throw new IllegalArgumentException("String array with path's
cannot be null");
if(path.length==0) throw new IllegalArgumentException("Path array should contains
at least one element.");
List<XMOBasedPreferencesPage> pages = new
ArrayList<XMOBasedPreferencesPage>();
for (int i = 0; i < path.length; i++) {