svn commit: r16628 - trunk/src/argouml-app/src/org/argouml/persistence/PrivateHandler.java

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2009-01-15 14:48:48-0800
New Revision: 16628

Modified:
   trunk/src/argouml-app/src/org/argouml/persistence/PrivateHandler.java

Log:
Issue 5625: Make PGML private data parser more robust to prevent NullPointerExceptions

Modified: trunk/src/argouml-app/src/org/argouml/persistence/PrivateHandler.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/persistence/PrivateHandler.java?view=diff&pathrev=16628&r1=16627&r2=16628
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/persistence/PrivateHandler.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/persistence/PrivateHandler.java	2009-01-15 14:48:48-0800
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -179,6 +179,7 @@
                 // we should modify this, so that we also recognise any 
                 // subclass of PathItemPlacement.
                 // Is the class name a PathItemPlacment?
+                // TODO: Use class reference to make this dependency obvious
                 if ("org.argouml.uml.diagram.ui.PathItemPlacement".equals(
                         classname)) {
                     PathItemPlacementStrategy pips 
@@ -189,7 +190,8 @@
                     // created with an older argo version, and the new
                     // argo version use a different placement strategy.
                     // If they don't match, just use the default.
-                    if (pips.getClass().getName().equals(classname)) {
+                    if (pips != null 
+                            && classname.equals(pips.getClass().getName())) {
                         // Now we're into processing each specific path 
                         // item strategy.
                         // At the moment, we only know PathItemPlacement

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

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.