incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r967115 - in /incubator/hise/trunk: hise-services/src/main/java/org/apache/hise/lang/ hise-services/src/main/java/org/apache/hise/runtime/ hise-test-example-osgi/src/main/resources/ hise-wsdl/src/main/resources/
Date Fri, 23 Jul 2010 14:47:38 GMT
Author: rr
Date: Fri Jul 23 14:47:38 2010
New Revision: 967115

URL: http://svn.apache.org/viewvc?rev=967115&view=rev
Log:
HISE-56: NullPointer when creating task without potential delegatees (Fix thanks to Michał
Więcław)

Modified:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
    incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml
    incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask.xsd

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java?rev=967115&r1=967114&r2=967115&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java
Fri Jul 23 14:47:38 2010
@@ -383,6 +383,11 @@ public class TaskDefinition {
 		return tTask.getRenderings();
 	}
 	public TDelegation getDelegation(){
+		if(tTask.getDelegation() == null){
+			TDelegation t = new TDelegation();
+			t.setPotentialDelegatees(TPotentialDelegatees.NOBODY);
+			return t;
+		}
 		return tTask.getDelegation();
 	}
 	public boolean isSavingTaskHistory(){

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java?rev=967115&r1=967114&r2=967115&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
Fri Jul 23 14:47:38 2010
@@ -19,6 +19,7 @@
 
 package org.apache.hise.runtime;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -126,8 +127,8 @@ public class TaskEvaluator {
     }
     
     public PotentialDelegates evaluatePotentialDelegates(){
-    		TPotentialDelegatees p = task.getTaskDefinition().getDelegation().getPotentialDelegatees();
-    		return PotentialDelegates.mapFromTPotentalDelegates(p);	
+               TPotentialDelegatees p = task.getTaskDefinition().getDelegation().getPotentialDelegatees();
+               return PotentialDelegates.mapFromTPotentalDelegates(p);
     }
     
     

Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml?rev=967115&r1=967114&r2=967115&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml (original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml Fri Jul 23
14:47:38 2010
@@ -104,7 +104,7 @@ Business Machines Corporation, Oracle In
                 </htd:taskStakeholders>                
             </htd:peopleAssignments>
             
-            <htd:delegation potentialDelegatees="nobody"/>
+    <!--         <htd:delegation potentialDelegatees="nobody"/>  --> 
             
             <htd:presentationElements>
                 

Modified: incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask.xsd
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask.xsd?rev=967115&r1=967114&r2=967115&view=diff
==============================================================================
--- incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask.xsd (original)
+++ incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask.xsd Fri Jul 23 14:47:38
2010
@@ -195,7 +195,7 @@ Business Machines Corporation, Oracle In
       	<xsd:element name="interface" type="tTaskInterface" />
       	<xsd:element ref="priority" minOccurs="0" />
       	<xsd:element ref="peopleAssignments" />
-      	<xsd:element name="delegation" type="tDelegation"
+      	<xsd:element name="delegation" type="tDelegation" 
       		minOccurs="0" />
       	<xsd:element name="presentationElements"
       		type="tPresentationElements" />
@@ -386,11 +386,11 @@ Business Machines Corporation, Oracle In
         <xsd:element name="from" type="tFrom" minOccurs="0" />
       </xsd:sequence>
       <xsd:attribute name="potentialDelegatees"
-        type="tPotentialDelegatees" use="required" />
+        type="tPotentialDelegatees" use="optional" default="nobody"/>
     </xsd:extension>
   </xsd:complexContent>
 </xsd:complexType>
-<xsd:simpleType name="tPotentialDelegatees">
+<xsd:simpleType name="tPotentialDelegatees" >
   <xsd:restriction base="xsd:string">
     <xsd:enumeration value="anybody" />
     <xsd:enumeration value="nobody" />



Mime
View raw message