Changed default for the optional attribute on the implements element from false to true, because as is ALL attributes are being set to optional, which I think is not normally what is wanted and I bet there have been a few surprises and frustrations from this
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@514243 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -185,7 +185,8 @@ under the License.
|
||||
</xs:element>
|
||||
<xs:attributeGroup name="attlist.implements">
|
||||
<xs:attribute type="xs:string" name="service" use="required"/>
|
||||
<xs:attribute name="optional" default="true">
|
||||
<xs:attribute name="optional" default="false">
|
||||
<xs:annotation><xs:documentation>If set to true all attributes inherited will have be optional whether or not they were in the implemented service definition.</xs:documentation></xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="true"/>
|
||||
|
||||
@@ -426,7 +426,7 @@ public class ModelServiceReader implements Serializable {
|
||||
while (implIter.hasNext()) {
|
||||
Element implement = (Element) implIter.next();
|
||||
String serviceName = UtilXml.checkEmpty(implement.getAttribute("service"));
|
||||
boolean optional = UtilXml.checkBoolean(implement.getAttribute("optional"), true);
|
||||
boolean optional = UtilXml.checkBoolean(implement.getAttribute("optional"), false);
|
||||
if (serviceName.length() > 0)
|
||||
service.implServices.add(new ModelServiceIface(serviceName, optional));
|
||||
//service.implServices.add(serviceName);
|
||||
|
||||
Reference in New Issue
Block a user