svn commit: r13770 - trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-11-15 14:10:30-0800
New Revision: 13770

Modified:
   trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java

Log:
Remove unnecessary Class.forName()

Modified: trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java?view=diff&rev=13770&p1=trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java&p2=trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java&r1=13769&r2=13770
==============================================================================
--- trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java	(original)
+++ trunk/src_new/org/argouml/ui/explorer/PerspectiveConfigurator.java	2007-11-15 14:10:30-0800
@@ -629,9 +629,8 @@
         Object sel = ruleLibraryList.getSelectedValue();
         int selLibNr = ruleLibraryList.getSelectedIndex();
         try {
-            String ruleName = sel.getClass().getName();
-            PerspectiveRule newRule =
-                (PerspectiveRule) Class.forName(ruleName).newInstance();
+            PerspectiveRule newRule = 
+                (PerspectiveRule) sel.getClass().newInstance();
 
             perspectiveRulesListModel.insertElementAt(newRule, 0);
             ((ExplorerPerspective) perspectiveList.getSelectedValue())
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.