[jboss-cvs] JBossAS SVN: r92893 - projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 27 16:59:21 EDT 2009
Author: alesj
Date: 2009-08-27 16:59:20 -0400 (Thu, 27 Aug 2009)
New Revision: 92893
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java
Log:
Simple refactoring, javadocs.
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java 2009-08-27 19:49:40 UTC (rev 92892)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java 2009-08-27 20:59:20 UTC (rev 92893)
@@ -104,7 +104,7 @@
for (String clazz : clazzes)
{
if (clazz == null)
- throw new IllegalArgumentException("Null class in: " + clazzes);
+ throw new IllegalArgumentException("Null class in: " + Arrays.toString(clazzes));
}
if (service == null)
throw new IllegalArgumentException("Null service");
@@ -147,7 +147,7 @@
{
Object ranking = getProperty(Constants.SERVICE_RANKING);
if (ranking != null && ranking instanceof Integer)
- return ((Integer) ranking).intValue();
+ return (Integer)ranking;
return 0;
}
@@ -351,8 +351,8 @@
ClassLoader otherLoader = otherSource.getClassLoader();
ClassLoader sourceLoader = source.getClassLoader();
StringBuffer buffer = new StringBuffer("Cannot assign [" + className + "] comming from different exporters");
- buffer.append("\n " + sourceLoader.toString());
- buffer.append("\n " + otherLoader);
+ buffer.append("\n ").append(sourceLoader.toString());
+ buffer.append("\n ").append(otherLoader);
log.warn(buffer.toString());
}
return equals;
@@ -382,7 +382,8 @@
/**
* Match the class
- *
+ *
+ * @param other the other bundle state
* @param className the class name
* @return true when the class name matches
*/
@@ -452,7 +453,7 @@
if (obj == null)
return false;
- OSGiServiceState other = null;
+ OSGiServiceState other;
if (obj instanceof OSGiServiceState)
other = (OSGiServiceState) obj;
else if (obj instanceof OSGiServiceReferenceWrapper)
@@ -604,7 +605,8 @@
/**
* Check whether the caller has permission
- *
+ *
+ * @param accessControlContext access control context
* @param action the action to check
* @param all whether all permissions are required
*/
@@ -656,7 +658,7 @@
/**
* Check whether the caller has permission to this object
*
- * @param accessControlContext
+ * @param accessControlContext access control context
* @return true when the caller has permission
*/
public boolean hasPermission(AccessControlContext accessControlContext)
More information about the jboss-cvs-commits
mailing list