[jboss-cvs] JBossAS SVN: r94443 - in projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding: impl and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 6 22:34:52 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-10-06 22:34:51 -0400 (Tue, 06 Oct 2009)
New Revision: 94443
Modified:
projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/ServiceBindingMetadata.java
projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/PojoServiceBindingStore.java
projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/SimpleServiceBindingValueSourceImpl.java
projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/Util.java
projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/XSLTServiceBindingValueSourceImpl.java
Log:
Make FindBugs happy
Modified: projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/ServiceBindingMetadata.java
===================================================================
--- projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/ServiceBindingMetadata.java 2009-10-07 02:34:26 UTC (rev 94442)
+++ projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/ServiceBindingMetadata.java 2009-10-07 02:34:51 UTC (rev 94443)
@@ -305,11 +305,8 @@
else
{
StringBuilder sb = new StringBuilder(this.serviceName);
- if (this.bindingName != null)
- {
- sb.append(':');
- sb.append(this.bindingName);
- }
+ sb.append(':');
+ sb.append(this.bindingName);
return sb.toString();
}
@@ -382,7 +379,7 @@
*
* @return the ServiceBindingValueSource; may be <code>null</code>
*/
- public synchronized ServiceBindingValueSource getServiceBindingValueSource()
+ public ServiceBindingValueSource getServiceBindingValueSource()
{
return this.serviceBindingValueSource;
}
Modified: projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/PojoServiceBindingStore.java
===================================================================
--- projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/PojoServiceBindingStore.java 2009-10-07 02:34:26 UTC (rev 94442)
+++ projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/PojoServiceBindingStore.java 2009-10-07 02:34:51 UTC (rev 94443)
@@ -199,14 +199,14 @@
* @throws DuplicateServiceException
* @throws UnknownHostException
*/
- public void start() throws DuplicateServiceException, UnknownHostException
+ public synchronized void start() throws DuplicateServiceException, UnknownHostException
{
establishBindings();
this.started = true;
}
- public void stop()
+ public synchronized void stop()
{
this.bindings.clear();
@@ -222,7 +222,7 @@
*
* @return the set of base bindings
*/
- public Set<ServiceBindingMetadata> getStandardBindings()
+ public synchronized Set<ServiceBindingMetadata> getStandardBindings()
{
return new HashSet<ServiceBindingMetadata>(standardBindings.keySet());
}
@@ -244,7 +244,7 @@
*
* @return the binding sets. Will not return <code>null</code>
*/
- public Set<ServiceBindingSet> getServiceBindingSets()
+ public synchronized Set<ServiceBindingSet> getServiceBindingSets()
{
return new HashSet<ServiceBindingSet>(bindingSets.values());
}
Modified: projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/SimpleServiceBindingValueSourceImpl.java
===================================================================
--- projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/SimpleServiceBindingValueSourceImpl.java 2009-10-07 02:34:26 UTC (rev 94442)
+++ projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/SimpleServiceBindingValueSourceImpl.java 2009-10-07 02:34:51 UTC (rev 94443)
@@ -66,7 +66,7 @@
if (params != null && params.length > 0)
throw new IllegalArgumentException(getClass().getSimpleName() + ".getServiceBindingValue() does not accept argument 'params'");
- return new Integer(getIntServiceBindingValue(binding));
+ return Integer.valueOf(getIntServiceBindingValue(binding));
}
}
Modified: projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/Util.java
===================================================================
--- projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/Util.java 2009-10-07 02:34:26 UTC (rev 94442)
+++ projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/Util.java 2009-10-07 02:34:51 UTC (rev 94443)
@@ -155,8 +155,7 @@
public static <T> T getBindingValue(ServiceBindingValueSource source, ServiceBinding binding, Class<T> expectedType)
{
- Object[] params = null;
- Object obj = source.getServiceBindingValue(binding, params);
+ Object obj = source.getServiceBindingValue(binding);
if (expectedType.isAssignableFrom(obj.getClass()))
{
return expectedType.cast(obj);
Modified: projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/XSLTServiceBindingValueSourceImpl.java
===================================================================
--- projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/XSLTServiceBindingValueSourceImpl.java 2009-10-07 02:34:26 UTC (rev 94442)
+++ projects/service-binding/trunk/core/src/main/java/org/jboss/services/binding/impl/XSLTServiceBindingValueSourceImpl.java 2009-10-07 02:34:51 UTC (rev 94443)
@@ -181,6 +181,10 @@
return targetFile;
}
+ catch (RuntimeException re)
+ {
+ throw re;
+ }
catch (Exception e)
{
throw new RuntimeException("Caught IOException during transformation", e);
@@ -240,7 +244,7 @@
{
Transformer transformer = factory.newTransformer(xslSource);
- transformer.setParameter("port", new Integer(binding.getPort()));
+ transformer.setParameter("port", Integer.valueOf(binding.getPort()));
String host = binding.getHostName();
if (host != null)
{
More information about the jboss-cvs-commits
mailing list