tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjaniszew...@apache.org
Subject svn commit: r686803 - in /tuscany/java/sca/modules: binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/ binding-sca-corba/src/main/java/org/apache/tuscany/sca/binding/sca/corba/impl/ host-corba/src/main/java/org/apache/tuscan...
Date Mon, 18 Aug 2008 15:59:09 GMT
Author: wjaniszewski
Date: Mon Aug 18 08:59:08 2008
New Revision: 686803

URL: http://svn.apache.org/viewvc?rev=686803&view=rev
Log:
Some code cleanups

Removed:
    tuscany/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaServiceLocator.java
Modified:
    tuscany/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaReferenceBindingProvider.java
    tuscany/java/sca/modules/binding-sca-corba/src/main/java/org/apache/tuscany/sca/binding/sca/corba/impl/CorbaSCAInvocationProxy.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java

Modified: tuscany/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaReferenceBindingProvider.java?rev=686803&r1=686802&r2=686803&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaReferenceBindingProvider.java
(original)
+++ tuscany/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaReferenceBindingProvider.java
Mon Aug 18 08:59:08 2008
@@ -40,7 +40,7 @@
  */
 public class CorbaReferenceBindingProvider implements ReferenceBindingProvider {
 
-    private static final Logger logger = Logger.getLogger(CorbaServiceBindingProvider.class.getName());
+    private static final Logger logger = Logger.getLogger(CorbaReferenceBindingProvider.class.getName());
     private CorbaBinding binding;
     private CorbaHost host;
     private RuntimeComponentReference reference;

Modified: tuscany/java/sca/modules/binding-sca-corba/src/main/java/org/apache/tuscany/sca/binding/sca/corba/impl/CorbaSCAInvocationProxy.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-sca-corba/src/main/java/org/apache/tuscany/sca/binding/sca/corba/impl/CorbaSCAInvocationProxy.java?rev=686803&r1=686802&r2=686803&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-sca-corba/src/main/java/org/apache/tuscany/sca/binding/sca/corba/impl/CorbaSCAInvocationProxy.java
(original)
+++ tuscany/java/sca/modules/binding-sca-corba/src/main/java/org/apache/tuscany/sca/binding/sca/corba/impl/CorbaSCAInvocationProxy.java
Mon Aug 18 08:59:08 2008
@@ -22,6 +22,8 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.xml.stream.XMLStreamException;
 
@@ -45,6 +47,7 @@
  */
 public class CorbaSCAInvocationProxy implements InvocationProxy {
 
+    private static final Logger logger = Logger.getLogger(CorbaSCAInvocationProxy.class.getName());
     private RuntimeWire wire;
     private Interface componentInterface;
     private OperationTypes types = new OperationTypes();
@@ -85,17 +88,15 @@
                 return omResult.toStringWithConsume();
             }
         } catch (XMLStreamException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+            logger.log(Level.WARNING, "XMLStreamException during handling invocation target
exception", e);
         } catch (InvocationTargetException e) {
             OMElement omException = (OMElement)((FaultException)e.getCause()).getFaultInfo();
             try {
                 WrappedSCAException wrappedException = new WrappedSCAException(omException.toStringWithConsume());
                 InvocationException exception = new InvocationException(wrappedException);
                 throw exception;
-            } catch (XMLStreamException e1) {
-                // TODO Auto-generated catch block
-                e1.printStackTrace();
+            } catch (XMLStreamException xmle) {
+                logger.log(Level.WARNING, "XMLStreamException during handling invocation
target exception", xmle);
             }
             
         }

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java?rev=686803&r1=686802&r2=686803&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
Mon Aug 18 08:59:08 2008
@@ -52,13 +52,13 @@
         private Set<String> addressList;
         private String host;
         private Set<String> nonAddressList;
-        private Map threadMap2;
+        private Map<String, CacheThread> threadMap2;
 
         public CacheThread(String host,
                            Set<InetAddress> currentAddresses,
                            Set<String> addressList,
                            Set<String> nonAddressList,
-                           Map threadMap2) {
+                           Map<String, CacheThread> threadMap2) {
             super("Caching localhost information");
             this.host = host;
             this.currentAddresses = currentAddresses;
@@ -69,9 +69,9 @@
 
         public void run() {
             if (currentAddresses != null) {
-                Iterator iter2 = currentAddresses.iterator();
+                Iterator<InetAddress> iter2 = currentAddresses.iterator();
                 while (iter2.hasNext()) {
-                    InetAddress addr = (InetAddress)iter2.next();
+                    InetAddress addr = iter2.next();
                     String hostname = addr.getHostName();
                     String hostname2 = addr.getCanonicalHostName();
                     synchronized (lock) {
@@ -154,7 +154,7 @@
             // get network interfaces
             final Set<InetAddress> currentAddresses = new HashSet<InetAddress>();
             currentAddresses.add(InetAddress.getLocalHost());
-            Enumeration nis = NetworkInterface.getNetworkInterfaces();
+            Enumeration<?> nis = NetworkInterface.getNetworkInterfaces();
             while (nis.hasMoreElements()) {
                 NetworkInterface inter = (NetworkInterface)nis.nextElement();
                 Enumeration<InetAddress> ias = inter.getInetAddresses();
@@ -173,9 +173,9 @@
                     notLocalHostCache = new HashSet<String>();
                     localHostCache = new HashSet<String>(currentAddresses.size() *
3);
 
-                    Iterator iter = currentAddresses.iterator();
+                    Iterator<InetAddress> iter = currentAddresses.iterator();
                     while (iter.hasNext()) {
-                        InetAddress addr = (InetAddress)iter.next();
+                        InetAddress addr = iter.next();
                         String a = addr.getHostAddress();
                         if (a != null && !localHostCache.contains(a))
                             localHostCache.add(a);



Mime
View raw message