ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatf...@apache.org
Subject svn commit: r599813 - in /webservices/sandesha/trunk/java/modules/core/src/main: java/org/apache/sandesha2/handlers/ java/org/apache/sandesha2/msgprocessors/ java/org/apache/sandesha2/util/ java/org/apache/sandesha2/workers/ java/org/apache/sandesha2/w...
Date Fri, 30 Nov 2007 13:03:39 GMT
Author: gatfora
Date: Fri Nov 30 05:03:35 2007
New Revision: 599813

URL: http://svn.apache.org/viewvc?rev=599813&view=rev
Log:
Remove unused imports, removed casts that aren't required and protected against some possible
NPE's

Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MessagePendingProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckFinal.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckNone.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/CloseSequence.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Identifier.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessage.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessageNumber.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MessageNumber.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Sequence.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/TerminateSequence.java
    webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaGlobalInHandler.java
Fri Nov 30 05:03:35 2007
@@ -157,7 +157,7 @@
     if (log.isDebugEnabled())
       log.debug("Enter: SandeshaGlobalInHandler::processApplicationMessage");
     // Check if this is a duplicate message
-    Sequence sequence = (Sequence) rmMsgCtx.getSequence();
+    Sequence sequence = rmMsgCtx.getSequence();
     String sequenceId = sequence.getIdentifier().getIdentifier();
     long msgNo = sequence.getMessageNumber().getMessageNumber();
 

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java
Fri Nov 30 05:03:35 2007
@@ -43,8 +43,6 @@
 import org.apache.sandesha2.i18n.SandeshaMessageHelper;
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
 import org.apache.sandesha2.policy.SandeshaPolicyBean;
-import org.apache.sandesha2.security.SecurityManager;
-import org.apache.sandesha2.security.SecurityToken;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr;
 import org.apache.sandesha2.storage.beans.RMDBean;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
Fri Nov 30 05:03:35 2007
@@ -36,8 +36,6 @@
 import org.apache.sandesha2.i18n.SandeshaMessageHelper;
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
 import org.apache.sandesha2.polling.PollingManager;
-import org.apache.sandesha2.security.SecurityManager;
-import org.apache.sandesha2.security.SecurityToken;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.beanmanagers.RMDBeanMgr;
 import org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
Fri Nov 30 05:03:35 2007
@@ -491,7 +491,7 @@
 		RMMsgContext createSeqRMMessage = RMMsgCreator.createCreateSeqMsg(rmsBean, applicationRMMsg);
 
 		createSeqRMMessage.setFlow(MessageContext.OUT_FLOW);
-		CreateSequence createSequencePart = (CreateSequence) createSeqRMMessage.getCreateSequence();
+		CreateSequence createSequencePart = createSeqRMMessage.getCreateSequence();
 
 		SequenceOffer offer = createSequencePart.getSequenceOffer();
 		if (offer != null) {

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
Fri Nov 30 05:03:35 2007
@@ -21,7 +21,6 @@
 
 import java.util.Iterator;
 
-import org.apache.axiom.om.OMElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
@@ -36,8 +35,6 @@
 import org.apache.sandesha2.SandeshaException;
 import org.apache.sandesha2.i18n.SandeshaMessageHelper;
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
-import org.apache.sandesha2.security.SecurityManager;
-import org.apache.sandesha2.security.SecurityToken;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.Transaction;
 import org.apache.sandesha2.storage.beans.RMDBean;
@@ -65,7 +62,7 @@
 			log.debug("Enter: CloseSequenceProcessor::processInMessage");
 
 		ConfigurationContext configCtx = rmMsgCtx.getMessageContext().getConfigurationContext();
-		CloseSequence closeSequence = (CloseSequence) rmMsgCtx.getCloseSequence();
+		CloseSequence closeSequence = rmMsgCtx.getCloseSequence();
 
 		MessageContext msgCtx = rmMsgCtx.getMessageContext();
 
@@ -159,7 +156,7 @@
 		getConfigurationContext().registerOperationContext(rmMsgCtx.getMessageId(),opcontext);
 		getMsgContext().setOperationContext(opcontext);
 		
-		CloseSequence closeSequencePart = (CloseSequence) rmMsgCtx.getCloseSequence();
+		CloseSequence closeSequencePart = rmMsgCtx.getCloseSequence();
 		Identifier identifier = closeSequencePart.getIdentifier();
 		if (identifier==null) {
 			identifier = new Identifier (closeSequencePart.getNamespaceValue());

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
Fri Nov 30 05:03:35 2007
@@ -74,7 +74,7 @@
 
 		try {
 			
-			CreateSequence createSeqPart = (CreateSequence) createSeqRMMsg.getCreateSequence();
+			CreateSequence createSeqPart = createSeqRMMsg.getCreateSequence();
 			if (createSeqPart == null) {
 				if (log.isDebugEnabled())
 					log.debug(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noCreateSeqParts));
@@ -152,7 +152,7 @@
 			// for making sure that this won't be processed again
 			createSeqResponse.setProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE, "true");

 			
-			CreateSequenceResponse createSeqResPart = (CreateSequenceResponse) createSeqResponse.getCreateSequenceResponse();
+			CreateSequenceResponse createSeqResPart = createSeqResponse.getCreateSequenceResponse();
 	
 				// OFFER PROCESSING
 			SequenceOffer offer = createSeqPart.getSequenceOffer();

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java
Fri Nov 30 05:03:35 2007
@@ -69,7 +69,7 @@
 
 		// Processing the create sequence response.
 
-		CreateSequenceResponse createSeqResponsePart = (CreateSequenceResponse) createSeqResponseRMMsgCtx.getCreateSequenceResponse();
+		CreateSequenceResponse createSeqResponsePart = createSeqResponseRMMsgCtx.getCreateSequenceResponse();
 		if (createSeqResponsePart == null) {
 			String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noCreateSeqResponse);
 			log.debug(message);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
Fri Nov 30 05:03:35 2007
@@ -62,7 +62,7 @@
 		if (!Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(rmMsgCtx.getRMSpecVersion()))
 			return;
 		
-		Sequence sequence = (Sequence) rmMsgCtx.getSequence();
+		Sequence sequence = rmMsgCtx.getSequence();
 		String sequenceId = sequence.getIdentifier().getIdentifier();
 		
 		ConfigurationContext configurationContext = rmMsgCtx.getConfigurationContext();

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MessagePendingProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MessagePendingProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MessagePendingProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MessagePendingProcessor.java
Fri Nov 30 05:03:35 2007
@@ -40,7 +40,7 @@
 		if (log.isDebugEnabled())
 			log.debug("Enter: MessagePendingProcessor::processMessagePendingHeaders");
 
-		MessagePending messagePending = (MessagePending) message.getMessagePending();
+		MessagePending messagePending = message.getMessagePending();
 		if (messagePending!=null) {
 			boolean pending = messagePending.isPending();
 			if (pending) {

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
Fri Nov 30 05:03:35 2007
@@ -21,8 +21,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.RelatesTo;
@@ -44,8 +42,6 @@
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
 import org.apache.sandesha2.msgreceivers.RMMessageReceiver;
 import org.apache.sandesha2.policy.SandeshaPolicyBean;
-import org.apache.sandesha2.security.SecurityManager;
-import org.apache.sandesha2.security.SecurityToken;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.Transaction;
 import org.apache.sandesha2.storage.beanmanagers.RMDBeanMgr;
@@ -77,7 +73,7 @@
 			log.debug("Enter: SequenceProcessor::processSequenceHeader");
 		
 		InvocationResponse result = InvocationResponse.CONTINUE;
-		Sequence sequence = (Sequence) rmMsgCtx.getSequence();
+		Sequence sequence = rmMsgCtx.getSequence();
 		if(sequence != null) {
 			// This is a reliable message, so hand it on to the main routine
 			result = processReliableMessage(rmMsgCtx, transaction);
@@ -103,7 +99,7 @@
 
 		MessageContext msgCtx = rmMsgCtx.getMessageContext();
 		StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(msgCtx.getConfigurationContext(),msgCtx.getConfigurationContext().getAxisConfiguration());
-		Sequence sequence = (Sequence) rmMsgCtx.getSequence();
+		Sequence sequence = rmMsgCtx.getSequence();
 		String sequenceId = sequence.getIdentifier().getIdentifier();
 		long msgNo = sequence.getMessageNumber().getMessageNumber();
 		boolean lastMessage = sequence.getLastMessage() != null;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
Fri Nov 30 05:03:35 2007
@@ -21,7 +21,6 @@
 
 import java.util.Iterator;
 
-import org.apache.axiom.om.OMElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -39,8 +38,6 @@
 import org.apache.sandesha2.SandeshaException;
 import org.apache.sandesha2.i18n.SandeshaMessageHelper;
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
-import org.apache.sandesha2.security.SecurityManager;
-import org.apache.sandesha2.security.SecurityToken;
 import org.apache.sandesha2.storage.StorageManager;
 import org.apache.sandesha2.storage.Transaction;
 import org.apache.sandesha2.storage.beanmanagers.RMDBeanMgr;
@@ -76,7 +73,7 @@
 
 		// Processing the terminate message
 		// TODO Add terminate sequence message logic.
-		TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMsg.getTerminateSequence();
+		TerminateSequence terminateSequence = terminateSeqRMMsg.getTerminateSequence();
 		if (terminateSequence == null) {
 			String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noTerminateSeqPart);
 			log.debug(message);
@@ -380,7 +377,7 @@
 		getMsgContext().setOperationContext(opcontext);
 		getMsgContext().setAxisOperation(terminateOp);
 
-		TerminateSequence terminateSequencePart = (TerminateSequence) rmMsgCtx.getTerminateSequence();
+		TerminateSequence terminateSequencePart = rmMsgCtx.getTerminateSequence();
 		terminateSequencePart.getIdentifier().setIndentifer(getOutSequenceID());
 
 		rmMsgCtx.setWSAAction(SpecSpecificConstants.getTerminateSequenceAction(getRMVersion()));

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java
Fri Nov 30 05:03:35 2007
@@ -52,8 +52,7 @@
 		
 		StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context,context.getAxisConfiguration());
 		
-		TerminateSequenceResponse tsResponse = (TerminateSequenceResponse)
-		  terminateResRMMsg.getTerminateSequenceResponse();
+		TerminateSequenceResponse tsResponse = terminateResRMMsg.getTerminateSequenceResponse();
 		
 		String sequenceId = tsResponse.getIdentifier().getIdentifier();
 		RMSBean rmsBean = SandeshaUtil.getRMSBeanFromSequenceId(storageManager, sequenceId);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
Fri Nov 30 05:03:35 2007
@@ -171,7 +171,7 @@
 			sequenceID = terminateSequenceResponse.getIdentifier().getIdentifier();
 		} else if (sequence != null) {
 			
-			Sequence seq = (Sequence) rmMsgContext.getSequence();
+			Sequence seq = rmMsgContext.getSequence();
 			LastMessage lastMessage = seq.getLastMessage();
 			SOAPEnvelope envelope = rmMsgContext.getSOAPEnvelope();
 			

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java
Fri Nov 30 05:03:35 2007
@@ -720,12 +720,12 @@
 		return propertyBean;
 	}
 
-	public static String getSequenceIDFromRMMessage(RMMsgContext rmMessageContext) throws SandeshaException
{
+	public static String getSequenceIDFromRMMessage(RMMsgContext rmMessageContext) {
 		int messageType = rmMessageContext.getMessageType();
 
 		String sequenceID = null;
 		if (messageType == Sandesha2Constants.MessageTypes.APPLICATION) {
-			Sequence sequence = (Sequence) rmMessageContext.getSequence();
+			Sequence sequence = rmMessageContext.getSequence();
 			sequenceID = sequence.getIdentifier().getIdentifier();
 		} else if (messageType == Sandesha2Constants.MessageTypes.ACK) {
 			Iterator sequenceAckIter = rmMessageContext
@@ -747,12 +747,10 @@
 			AckRequested ackReq = (AckRequested) ackRequestIter.next();
 			sequenceID = ackReq.getIdentifier().getIdentifier();
 		} else if (messageType == Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE) {
-			CloseSequence closeSequence = (CloseSequence) rmMessageContext
-					.getCloseSequence();
+			CloseSequence closeSequence = rmMessageContext.getCloseSequence();
 			sequenceID = closeSequence.getIdentifier().getIdentifier();
 		} else if (messageType == Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE_RESPONSE) {
-			CloseSequenceResponse closeSequenceResponse = (CloseSequenceResponse) rmMessageContext
-					.getCloseSequenceResponse();;
+			CloseSequenceResponse closeSequenceResponse = rmMessageContext.getCloseSequenceResponse();;
 			sequenceID = closeSequenceResponse.getIdentifier().getIdentifier();
 		}
 
@@ -930,8 +928,8 @@
 	public static boolean isWSRMAnonymous(String address) {
 		if (address!=null && address.startsWith(Sandesha2Constants.SPEC_2007_02.ANONYMOUS_URI_PREFIX))
 			return true;
-		else 
-			return false;
+		 
+		return false;
 	}
 	 public static void executeAndStore (RMMsgContext rmMsgContext, String storageKey, StorageManager
manager) throws AxisFault {
 		if (log.isDebugEnabled())
@@ -1223,7 +1221,8 @@
 		if(localName.equals(Sandesha2Constants.RM_DUPLICATE_IN_ONLY_OPERATION.getLocalPart())){
 			return true;
 		}
-		else return false;
+		
+		return false;
 	}
 	
 	public static boolean isDuplicateInOutMessage(MessageContext msgContext)
@@ -1233,7 +1232,8 @@
 		if(localName.equals(Sandesha2Constants.RM_DUPLICATE_IN_OUT_OPERATION.getLocalPart())){
 			return true;
 		}
-		else return false;
+		
+		return false;
 	}	
 	 	  
 	public static final String getStackTraceFromException(Exception e) {

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java
Fri Nov 30 05:03:35 2007
@@ -79,7 +79,7 @@
 
 		EndpointReference replyTo = createSequenceMsg.getReplyTo();
 
-		CreateSequence createSequence = (CreateSequence) createSequenceMsg.getCreateSequence();
+		CreateSequence createSequence = createSequenceMsg.getCreateSequence();
 		if (createSequence == null) {
 			String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.createSeqEntryNotFound);
 			log.debug(message);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java
Fri Nov 30 05:03:35 2007
@@ -383,7 +383,7 @@
 					// terminate sending side if this is the WSRM 1.0 spec. 
 					// If the WSRM versoion is 1.1 termination will happen in the terminate sequence response
message.
 					
-					TerminateSequence terminateSequence = (TerminateSequence) rmMsgCtx.getTerminateSequence();
+					TerminateSequence terminateSequence = rmMsgCtx.getTerminateSequence();
 					String sequenceID = terminateSequence.getIdentifier().getIdentifier();
 	
 					RMSBean rmsBean = SandeshaUtil.getRMSBeanFromSequenceId(storageManager, sequenceID);
@@ -446,7 +446,7 @@
 		   messageType == Sandesha2Constants.MessageTypes.LAST_MESSAGE) {
 			
 			String namespace = SpecSpecificConstants.getRMNamespaceValue(rmVersion);
-			Sequence sequence = (Sequence) rmMsgContext.getSequence();
+			Sequence sequence = rmMsgContext.getSequence();
 			if(sequence == null) {
 				sequence = new Sequence(namespace);
 				
@@ -467,11 +467,11 @@
 			}
 			
 		} else if(messageType == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) {
-			TerminateSequence terminate = (TerminateSequence) rmMsgContext.getTerminateSequence();
+			TerminateSequence terminate = rmMsgContext.getTerminateSequence();
 			id = terminate.getIdentifier();
 
 		} else if(messageType == Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE) {
-			CloseSequence close = (CloseSequence) rmMsgContext.getCloseSequence();
+			CloseSequence close = rmMsgContext.getCloseSequence();
 			id = close.getIdentifier();
 		
 		} else if(messageType == Sandesha2Constants.MessageTypes.ACK_REQUEST) {

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckFinal.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckFinal.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckFinal.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckFinal.java
Fri Nov 30 05:03:35 2007
@@ -52,8 +52,7 @@
 		
 		if (finalPart == null)
 			throw new OMException(SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.noFinalPartInElement,
-					finalPart.toString()));
+					SandeshaMessageKeys.noFinalPartInElement));
 
 		return this;
 	}

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckNone.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckNone.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckNone.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/AckNone.java
Fri Nov 30 05:03:35 2007
@@ -52,8 +52,7 @@
 	public Object fromOMElement(OMElement nonePart) throws OMException {
 		if (nonePart == null)
 			throw new OMException(SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.noNonePartInElement,
-					nonePart.toString()));
+					SandeshaMessageKeys.noNonePartInElement));
 
 		return this;
 	}

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/CloseSequence.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/CloseSequence.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/CloseSequence.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/CloseSequence.java
Fri Nov 30 05:03:35 2007
@@ -142,8 +142,8 @@
 	public boolean isLastMsgNumberRequired(String namespaceName){
 		if (Sandesha2Constants.SPEC_2007_02.NS_URI.equals(namespaceName))
 			return true;
-		else 
-			return false;		
+		 
+		return false;		
 	}
 	
 	public void setLastMessageNumber(LastMessageNumber number){

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Identifier.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Identifier.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Identifier.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Identifier.java
Fri Nov 30 05:03:35 2007
@@ -55,7 +55,7 @@
 		if (identifierPart == null)
 			throw new OMException(SandeshaMessageHelper.getMessage(
 					SandeshaMessageKeys.invalidIdentifier,
-					identifierPart.toString()));
+					null));
 		
 		String identifierText = identifierPart.getText();
 		if (identifierText == null || identifierText == "")

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessage.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessage.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessage.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessage.java
Fri Nov 30 05:03:35 2007
@@ -52,8 +52,7 @@
 	public Object fromOMElement(OMElement lastMessagePart) throws OMException {
 		if (lastMessagePart == null)
 			throw new OMException(SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.noLastMessagePartInElement,
-					lastMessagePart.toString()));
+					SandeshaMessageKeys.noLastMessagePartInElement));
 
 		return this;
 	}

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessageNumber.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessageNumber.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessageNumber.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/LastMessageNumber.java
Fri Nov 30 05:03:35 2007
@@ -53,8 +53,7 @@
 	public Object fromOMElement(OMElement msgNumberPart) throws OMException {
 		if (msgNumberPart==null)
 			throw new OMException (SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.noMessageNumberPartInElement,
-					msgNumberPart.toString()));
+					SandeshaMessageKeys.noMessageNumberPartInElement));
 		
 		String msgNoStr = msgNumberPart.getText();
 		messageNumber = Long.parseLong(msgNoStr);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MessageNumber.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MessageNumber.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MessageNumber.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/MessageNumber.java
Fri Nov 30 05:03:35 2007
@@ -57,8 +57,7 @@
 	public Object fromOMElement(OMElement msgNumberPart) throws OMException {
 		if (msgNumberPart==null)
 			throw new OMException (SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.noMessageNumberPartInElement,
-					msgNumberPart.toString()));
+					SandeshaMessageKeys.noMessageNumberPartInElement));
 		
 		String msgNoStr = msgNumberPart.getText();
 		messageNumber = Long.parseLong(msgNoStr);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Sequence.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Sequence.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Sequence.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/Sequence.java
Fri Nov 30 05:03:35 2007
@@ -65,8 +65,7 @@
 
 		if (shb == null)
 			throw new OMException(SandeshaMessageHelper.getMessage(
-					SandeshaMessageKeys.noSequencePartInElement,
-					shb.toString()));
+					SandeshaMessageKeys.noSequencePartInElement));
 		
 		OMElement identifierPart = null;
 		OMElement msgNumberPart = null;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/TerminateSequence.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/TerminateSequence.java?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/TerminateSequence.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/wsrm/TerminateSequence.java
Fri Nov 30 05:03:35 2007
@@ -152,8 +152,8 @@
 		
 		if (Sandesha2Constants.SPEC_2007_02.NS_URI.equals(namespaceName))
 			return true;
-		else
-			return false;		
+		
+		return false;		
 	}
 	
 }

Modified: webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties?rev=599813&r1=599812&r2=599813&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
Fri Nov 30 05:03:35 2007
@@ -156,10 +156,10 @@
 noTerminateSeqResponseInElement=The passed element {0} does not contain a ''terminate sequence
response'' part.
 noAcceptPartInElement=The passed element {0} does not contain an ''Accept'' part.
 noUpperOrLowerAttributesInElement=The passed element {0} does not contain upper or lower
attributes.
-noSequencePartInElement=The passed element {0} does not contain a ''Sequence'' part.
-noLastMessagePartInElement=The passed element {0} does not contain a ''Last Message'' part.
-noFinalPartInElement=The passed element {0} does not contain a ''Final'' part. 
-noNonePartInElement=The passed element {0} does not contain a ''None'' part.
+noSequencePartInElement=The passed element does not contain a ''Sequence'' part.
+noLastMessagePartInElement=The passed element does not contain a ''Last Message'' part.
+noFinalPartInElement=The passed element does not contain a ''Final'' part. 
+noNonePartInElement=The passed element does not contain a ''None'' part.
 noCloseSequencePartInElement=The passed element {0} does not contain a ''close sequence''
part.
 noMessageNumberPartInElement=The passed sequnce element {0} does not contain a ''message
number'' part.
 noCloseSeqResponsePartInElement=The passed element {0} does not contain a ''close sequence
response'' part.



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message