Java 5 code style

This commit is contained in:
Juergen Hoeller
2008-11-28 11:39:36 +00:00
parent fda7100866
commit f8c690c542
55 changed files with 356 additions and 445 deletions

View File

@@ -227,7 +227,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* @see #AUTODETECT_NONE
*/
public void setAutodetectMode(int autodetectMode) {
if (!constants.getValues(CONSTANT_PREFIX_AUTODETECT).contains(new Integer(autodetectMode))) {
if (!constants.getValues(CONSTANT_PREFIX_AUTODETECT).contains(autodetectMode)) {
throw new IllegalArgumentException("Only values of autodetect constants allowed");
}
this.autodetectMode = autodetectMode;

View File

@@ -98,7 +98,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* accessors or mutators for attributes.
* @see #FIELD_VISIBILITY
*/
protected static final Integer ATTRIBUTE_OPERATION_VISIBILITY = new Integer(4);
protected static final int ATTRIBUTE_OPERATION_VISIBILITY = 4;
/**
* Constant identifier for the class field in a JMX {@link Descriptor}.

View File

@@ -175,10 +175,10 @@ public abstract class BshScriptUtils {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (ReflectionUtils.isEqualsMethod(method)) {
return (isProxyForSameBshObject(args[0]) ? Boolean.TRUE : Boolean.FALSE);
return (isProxyForSameBshObject(args[0]));
}
else if (ReflectionUtils.isHashCodeMethod(method)) {
return new Integer(this.xt.hashCode());
return this.xt.hashCode();
}
else if (ReflectionUtils.isToStringMethod(method)) {
return "BeanShell object [" + this.xt + "]";

View File

@@ -162,7 +162,7 @@ public abstract class JRubyScriptUtils {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (ReflectionUtils.isEqualsMethod(method)) {
return (isProxyForSameRubyObject(args[0]) ? Boolean.TRUE : Boolean.FALSE);
return (isProxyForSameRubyObject(args[0]));
}
else if (ReflectionUtils.isHashCodeMethod(method)) {
return this.rubyObject.hashCode();