axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r442167 - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/types/ adb/src/org/apache/axis2/databinding/utils/ kernel/src/org/apache/axis2/i18n/ kernel/src/org/apache/axis2/transport/ kernel/src/org/apache/axis2...
Date Mon, 11 Sep 2006 10:34:01 GMT
Author: ajith
Date: Mon Sep 11 03:34:00 2006
New Revision: 442167

URL: http://svn.apache.org/viewvc?view=rev&rev=442167
Log:
Removing redundant type casts. 

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/MessageBundle.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/QueueConnector.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/TopicConnector.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/OptionsParser.java
    webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SAMLTokenIssuer.java
    webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SCTIssuerConfig.java
    webservices/axis2/trunk/java/modules/samples/src/sample/eventing/PublisherService.java
    webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
    webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/IssuedTokenBuilder.java
    webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/RecipientTokenBuilder.java
    webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/SupportingTokensBuilder.java
    webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/WSS11Builder.java
    webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/X509TokenBuilder.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/HandlerParameterDecoder.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
Mon Sep 11 03:34:00 2006
@@ -141,8 +141,8 @@
 
         StringBuffer sb = new StringBuffer(bytes.length * 2);
         for (int i = 0; i < bytes.length; i++) {
-            sb.append(convertDigit((int) (bytes[i] >> 4)));
-            sb.append(convertDigit((int) (bytes[i] & 0x0f)));
+            sb.append(convertDigit(bytes[i] >> 4));
+            sb.append(convertDigit(bytes[i] & 0x0f));
         }
         return (sb.toString());
 

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
Mon Sep 11 03:34:00 2006
@@ -90,7 +90,7 @@
         synchronized (calendar) {
             if (calendar.get(Calendar.ERA) == GregorianCalendar.BC) {
                 buf.append("-");
-                calendar.setTime((Date) value);
+                calendar.setTime(value);
                 calendar.set(Calendar.ERA, GregorianCalendar.AD);
                 value = calendar.getTime();
             }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/MessageBundle.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/MessageBundle.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/MessageBundle.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/MessageBundle.java
Mon Sep 11 03:34:00 2006
@@ -195,6 +195,6 @@
                     getResourceBundle().getResourceName(), key);
         }
 
-        return MessageFormat.format(msg, (Object[]) array);
+        return MessageFormat.format(msg, array);
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
Mon Sep 11 03:34:00 2006
@@ -176,7 +176,7 @@
 		boolean fileCacheForAttachments;
 
 		if (cacheAttachmentProperty != null) {
-			cacheAttachmentProperty = (String) cacheAttachmentProperty;
+			cacheAttachmentProperty = cacheAttachmentProperty;
 			fileCacheForAttachments = (Constants.VALUE_TRUE
 					.equals(cacheAttachmentString));
 		} else {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Mon Sep 11 03:34:00 2006
@@ -689,7 +689,7 @@
                 if (HTTPConstants.HEADER_USER_AGENT.equals(header.getName())) {
                     isCustomUserAgentSet = true;
                 }
-                method.addRequestHeader((Header) header);
+                method.addRequestHeader(header);
             }
 
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/QueueConnector.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/QueueConnector.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/QueueConnector.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/QueueConnector.java
Mon Sep 11 03:34:00 2006
@@ -205,7 +205,7 @@
             }
 
             protected Destination createTemporaryDestination() throws JMSException {
-                return ((QueueSession) m_session).createTemporaryQueue();
+                return m_session.createTemporaryryQueue();
             }
 
             protected void deleteTemporaryDestination(Destination destination) throws JMSException
{

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/TopicConnector.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/TopicConnector.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/TopicConnector.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/TopicConnector.java
Mon Sep 11 03:34:00 2006
@@ -166,7 +166,7 @@
                     TopicSubscription sub = (TopicSubscription) m_subscription;
 
                     if (sub.isDurable() && sub.m_unsubscribe) {
-                        ((TopicSession) m_session).unsubscribe(sub.m_subscriptionName);
+                        m_session.unsubscribe(sub.m_subscriptionName);
                     }
                 } catch (Exception ignore) {
                 }
@@ -319,7 +319,7 @@
             }
 
             protected Destination createTemporaryDestination() throws JMSException {
-                return ((TopicSession) m_session).createTemporaryTopic();
+                return m_session.createTemporaryTopic();
             }
 
             protected void deleteTemporaryDestination(Destination destination) throws JMSException
{

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/OptionsParser.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/OptionsParser.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/OptionsParser.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/OptionsParser.java
Mon Sep 11 03:34:00 2006
@@ -73,7 +73,7 @@
                 al = new ArrayList();
             }
 
-            al.add((String) args[loop]);
+            al.add(args[loop]);
         }
 
         if (al == null) {

Modified: webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SAMLTokenIssuer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SAMLTokenIssuer.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SAMLTokenIssuer.java
(original)
+++ webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SAMLTokenIssuer.java
Mon Sep 11 03:34:00 2006
@@ -403,15 +403,13 @@
 
         if(serviceAddress != null && !"".equals(serviceAddress)) {
             String alias = (String)config.trustedServices.get(serviceAddress);;
-            if(alias != null) {
-                return (X509Certificate)crypto.getCertificates(alias)[0];
-            } else {
+            if(alias != null) return (X509Certificate) crypto.getCertificates(alias)[0];
else {
                 alias = (String)config.trustedServices.get("*");
-                return (X509Certificate)crypto.getCertificates(alias)[0];
+                return crypto.getCertificates(alias)[0];
             }
         } else {
             String alias = (String)config.trustedServices.get("*");
-            return (X509Certificate)crypto.getCertificates(alias)[0];
+            return crypto.getCertificates(alias)[0];
         }
         
     }

Modified: webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SCTIssuerConfig.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SCTIssuerConfig.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SCTIssuerConfig.java
(original)
+++ webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/impl/SCTIssuerConfig.java
Mon Sep 11 03:34:00 2006
@@ -50,13 +50,13 @@
     protected long ttl = 300000;
     
     private SCTIssuerConfig(OMElement elem) throws TrustException {
-        OMElement proofTokenElem = (OMElement) elem.getFirstChildWithName(
+        OMElement proofTokenElem = elem.getFirstChildWithName(
                 new QName("proofToken"));
         if (proofTokenElem != null) {
             this.proofTokenType = proofTokenElem.getText().trim();
         }
 
-        OMElement cryptoPropertiesElem = (OMElement) elem
+        OMElement cryptoPropertiesElem = elem
                 .getFirstChildWithName(new QName("cryptoProperties"));
 
         if (!SCTIssuer.BINARY_SECRET.equals(proofTokenType)

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/eventing/PublisherService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/src/sample/eventing/PublisherService.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/eventing/PublisherService.java
(original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/eventing/PublisherService.java
Mon Sep 11 03:34:00 2006
@@ -60,7 +60,7 @@
 					//publishing
 					System.out.println("Publishing next publication...");
 					
-					SubscriberStore store = (SubscriberStore) CommonUtil.getSubscriberStore(serviceContext.getAxisService());
+					SubscriberStore store = CommonUtil.getSubscriberStore(serviceContext.getAxisService());
 					if (store==null)
 						throw new Exception ("Cant find the Savan subscriber store");
 					

Modified: webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
Mon Sep 11 03:34:00 2006
@@ -50,7 +50,7 @@
 		//TODO hv a better method to identify publication messages
 		if (messagetype == SavanConstants.MessageTypes.UNKNOWN) {
 			SavanMessageContext publication = new SavanMessageContext(msgContext);
-			SubscriberStore store = (SubscriberStore) CommonUtil.getSubscriberStore(msgContext.getAxisService());
+			SubscriberStore store = CommonUtil.getSubscriberStore(msgContext.getAxisService());
 			if (store != null) {
 				
 				//building the publication envelope

Modified: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/IssuedTokenBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/IssuedTokenBuilder.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/IssuedTokenBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/IssuedTokenBuilder.java
Mon Sep 11 03:34:00 2006
@@ -67,7 +67,7 @@
 
         for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
             assertion = (Assertion) iterator.next();
-            name = (QName) assertion.getName();
+            name = assertion.getName();
             
             if (Constants.REQUIRE_DERIVED_KEYS.equals(name)) {
                 parent.setDerivedKeys(true);

Modified: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/RecipientTokenBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/RecipientTokenBuilder.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/RecipientTokenBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/RecipientTokenBuilder.java
Mon Sep 11 03:34:00 2006
@@ -36,7 +36,7 @@
             throws IllegalArgumentException {
         RecipientToken recipientToken = new RecipientToken();
         
-        Policy policy = (Policy) PolicyEngine.getPolicy(element);
+        Policy policy = PolicyEngine.getPolicy(element);
         policy = (Policy) policy.normalize(false);
         
         for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {

Modified: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/SupportingTokensBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/SupportingTokensBuilder.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/SupportingTokensBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/SupportingTokensBuilder.java
Mon Sep 11 03:34:00 2006
@@ -54,7 +54,7 @@
                     Constants.SUPPORTING_TOKEN_SIGNED_ENDORSING);
         }
 
-        Policy policy = (Policy) PolicyEngine.getPolicy(element);
+        Policy policy = PolicyEngine.getPolicy(element);
         policy = (Policy) policy.normalize(false);
 
         for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {

Modified: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/WSS11Builder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/WSS11Builder.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/WSS11Builder.java
(original)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/WSS11Builder.java
Mon Sep 11 03:34:00 2006
@@ -35,7 +35,7 @@
             throws IllegalArgumentException {
         Wss11 wss11 = new Wss11();
 
-        Policy policy = (Policy) PolicyEngine.getPolicy(element);
+        Policy policy = PolicyEngine.getPolicy(element);
         policy = (Policy) policy.normalize(false);
 
         for (Iterator iterator = policy.getAlternatives(); iterator.hasNext();) {

Modified: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/X509TokenBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/X509TokenBuilder.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/X509TokenBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/builders/X509TokenBuilder.java
Mon Sep 11 03:34:00 2006
@@ -72,7 +72,7 @@
 
         for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
             assertion = (Assertion) iterator.next();
-            name = (QName) assertion.getName();
+            name = assertion.getName();
 
             if (Constants.REQUIRE_KEY_IDENTIFIRE_REFERENCE.equals(name)) {
                 parent.setRequireKeyIdentifierReference(true);

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/HandlerParameterDecoder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/HandlerParameterDecoder.java?view=diff&rev=442167&r1=442166&r2=442167
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/HandlerParameterDecoder.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/HandlerParameterDecoder.java
Mon Sep 11 03:34:00 2006
@@ -51,11 +51,11 @@
         	Parameter outFlowSecParam;
         
 	        if(msgCtx.isServerSide()){
-            		inFlowSecParam = (Parameter)msgCtx.getParameter(WSSHandlerConstants.INFLOW_SECURITY_SERVER);
-            		outFlowSecParam = (Parameter)msgCtx.getParameter(WSSHandlerConstants.OUTFLOW_SECURITY_SERVER);
+            		inFlowSecParam = msgCtx.getParameter(WSSHandlerConstants.INFLOW_SECURITY_SERVER);
+            		outFlowSecParam = msgCtx.getParameter(WSSHandlerConstants.OUTFLOW_SECURITY_SERVER);
        		 }else{
-            		inFlowSecParam = (Parameter)msgCtx.getParameter(WSSHandlerConstants.INFLOW_SECURITY_CLIENT);
-            		outFlowSecParam = (Parameter)msgCtx.getParameter(WSSHandlerConstants.OUTFLOW_SECURITY_CLIENT);
+            		inFlowSecParam = msgCtx.getParameter(WSSHandlerConstants.INFLOW_SECURITY_CLIENT);
+            		outFlowSecParam = msgCtx.getParameter(WSSHandlerConstants.OUTFLOW_SECURITY_CLIENT);
         	}
         
         	//TODO: check whether policy is available 



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


Mime
View raw message