Confusion of what is/is not optional in config.xml
--------------------------------------------------

                 Key: WOOKIE-38
                 URL: https://issues.apache.org/jira/browse/WOOKIE-38
             Project: Wookie
          Issue Type: Bug
          Components: Server
            Reporter: Ross Gardler
            Priority: Minor


in WidgetManifestModel we have a method:

public void fromXML(Element element) throws BadManifestException

This method reads the manfest information from the config.xml file

In that method all properties are marked as optional with comments such as:

// AUTHOR IS OPTIONAL - can only be one

However, if a widget does not specify the author then a null pointer exception 
is thrown by when trying to access the author information.

It is easy to place a null pointer guard on these properties, but are they 
optional or not? If they are optional what should we do when no value is 
supplied (default value, empty string?)

If they are not optional the fromXML method needs to throw a 
BadManifestExcpetion

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to