Java 5 code style
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}.
|
||||
|
||||
@@ -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 + "]";
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user