You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2013/06/02 08:41:54 UTC
svn commit: r1488646 - in /ofbiz/trunk/framework/service:
dtd/service-config.xsd
src/org/ofbiz/service/config/model/NotificationGroup.java
Author: adrianc
Date: Sun Jun 2 06:41:54 2013
New Revision: 1488646
URL: http://svn.apache.org/r1488646
Log:
Bug fix for NotificationGroup.java - if the <notification-group> element name attribute is being used as the key to a Map, then we should make it required.
Modified:
ofbiz/trunk/framework/service/dtd/service-config.xsd
ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/NotificationGroup.java
Modified: ofbiz/trunk/framework/service/dtd/service-config.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/dtd/service-config.xsd?rev=1488646&r1=1488645&r2=1488646&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/dtd/service-config.xsd (original)
+++ ofbiz/trunk/framework/service/dtd/service-config.xsd Sun Jun 2 06:41:54 2013
@@ -311,7 +311,7 @@ under the License.
</xs:complexType>
</xs:element>
</xs:sequence>
- <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/NotificationGroup.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/NotificationGroup.java?rev=1488646&r1=1488645&r2=1488646&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/NotificationGroup.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/NotificationGroup.java Sun Jun 2 06:41:54 2013
@@ -38,7 +38,11 @@ public final class NotificationGroup {
private final List<Notify> notifyList;
NotificationGroup(Element notificationGroupElement) throws ServiceConfigException {
- this.name = notificationGroupElement.getAttribute("name").intern();
+ String name = notificationGroupElement.getAttribute("name").intern();
+ if (name.isEmpty()) {
+ throw new ServiceConfigException("<notification-group> element name attribute is empty");
+ }
+ this.name = name;
Element notification = UtilXml.firstChildElement(notificationGroupElement, "notification");
if (notification == null) {
throw new ServiceConfigException("<notification> element is missing");