You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wookie.apache.org by sc...@apache.org on 2009/10/20 19:55:54 UTC

svn commit: r827746 - /incubator/wookie/trunk/src/org/apache/wookie/manifestmodel/impl/WidgetManifestModel.java

Author: scottbw
Date: Tue Oct 20 17:55:53 2009
New Revision: 827746

URL: http://svn.apache.org/viewvc?rev=827746&view=rev
Log:
put a null guard on author element - see WOOKIE-38

Modified:
    incubator/wookie/trunk/src/org/apache/wookie/manifestmodel/impl/WidgetManifestModel.java

Modified: incubator/wookie/trunk/src/org/apache/wookie/manifestmodel/impl/WidgetManifestModel.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/manifestmodel/impl/WidgetManifestModel.java?rev=827746&r1=827745&r2=827746&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/manifestmodel/impl/WidgetManifestModel.java (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/manifestmodel/impl/WidgetManifestModel.java Tue Oct 20 17:55:53 2009
@@ -94,6 +94,7 @@
 	}
 	
 	public String getAuthor(){
+		if (fAuthor == null) return null;
 		return fAuthor.getAuthorName();
 	}
 	
@@ -282,9 +283,12 @@
 			}
 			
 			// CONTENT IS OPTIONAL - can only be 0 or 1
-			if(tag.equals(IW3CXMLConfiguration.CONTENT_ELEMENT)) {							
-				fContent = new ContentEntity();						
-				fContent.fromXML(child);
+			// Only the first CONTENT element should be considered, further instances MUST be ignored
+			if(tag.equals(IW3CXMLConfiguration.CONTENT_ELEMENT)) {	
+				if (fContent == null){
+					fContent = new ContentEntity();						
+					fContent.fromXML(child);
+				}
 			}
 			
 			// FEATURE IS OPTIONAL - can be many
@@ -304,5 +308,4 @@
 		}
 	}
 
-
 }