svn commit: r17115 - trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2009-04-13 23:27:59-0700
New Revision: 17115

Modified:
   trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java

Log:
Fix test failure if developer has profile with null name

Modified: trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java?view=diff&pathrev=17115&r1=17114&r2=17115
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java	2009-04-13 23:27:59-0700
@@ -418,11 +418,12 @@
      * @see org.argouml.profile.ProfileManager#lookForRegisteredProfile(java.lang.String)
      */
     public Profile lookForRegisteredProfile(String value) {
-        List<Profile> registeredProfiles = getRegisteredProfiles();
-
-        for (Profile profile : registeredProfiles) {
-            if (profile.getProfileIdentifier().equalsIgnoreCase(value)) {
-                return profile;
+        if (value != null) {
+            List<Profile> registeredProfiles = getRegisteredProfiles();
+            for (Profile profile : registeredProfiles) {
+                if (value.equalsIgnoreCase(profile.getProfileIdentifier())) {
+                    return profile;
+                }
             }
         }
         return null;

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1704442

To unsubscribe from this discussion, e-mail: [[email protected]].
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.