svn commit: r13769 - trunk/src_new/org/argouml/profile/InitProfileSubsystem.java

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

Modified:
   trunk/src_new/org/argouml/profile/InitProfileSubsystem.java

Log:
Make dependency explicit rather than hiding using reflection

Modified: trunk/src_new/org/argouml/profile/InitProfileSubsystem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/profile/InitProfileSubsystem.java?view=diff&rev=13769&p1=trunk/src_new/org/argouml/profile/InitProfileSubsystem.java&p2=trunk/src_new/org/argouml/profile/InitProfileSubsystem.java&r1=13768&r2=13769
==============================================================================
--- trunk/src_new/org/argouml/profile/InitProfileSubsystem.java	(original)
+++ trunk/src_new/org/argouml/profile/InitProfileSubsystem.java	2007-11-15 14:09:11-0800
@@ -27,7 +27,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.log4j.Logger;
 import org.argouml.application.api.GUISettingsTabInterface;
 import org.argouml.application.api.InitSubsystem;
 
@@ -36,15 +35,6 @@
  * @author Luis Sergio Oliveira (euluis)
  */
 public class InitProfileSubsystem implements InitSubsystem {
-    
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = Logger.getLogger(
-            InitProfileSubsystem.class);
-
-    private static String profileManagerClass = 
-        "org.argouml.profile.internal.ProfileManagerImpl";
 
     /*
      * @see org.argouml.application.api.InitSubsystem#getProjectSettingsTabs()
@@ -64,16 +54,8 @@
      * @see org.argouml.application.api.InitSubsystem#init()
      */
     public void init() {
-        try {
-            Class implType = Class.forName(profileManagerClass);
-            ProfileManager profileManager = 
-                (ProfileManager) implType.newInstance();
-            ProfileFacade.setManager(profileManager);
-        } catch (Exception e) {
-            LOG.error("Failed to initialize ProfileManager implementation!", 
-                    e);
-            throw new RuntimeException(e);
-        }
+        ProfileFacade.setManager(
+                new org.argouml.profile.internal.ProfileManagerImpl());
     }
 
 }
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.