Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public boolean equals(Object obj) {
}

public int hashCode() {
return super.hashCode() + two + new Boolean(three).hashCode() + five.toString().hashCode();
return super.hashCode() + two + Boolean.valueOf(three).hashCode() + five.toString().hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ public boolean equals(Object obj) {
}

public int hashCode() {
return super.hashCode() + two + new Boolean(three).hashCode() + five.toString().hashCode();
return super.hashCode() + two + Boolean.valueOf(three).hashCode() + five.toString().hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public boolean equals(Object obj) {
}

public int hashCode() {
return super.hashCode() + two + new Boolean(three).hashCode() + five.toString().hashCode();
return super.hashCode() + two + Boolean.valueOf(three).hashCode() + five.toString().hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public class BasicTarget implements Target {

public BasicTarget() {
list = new ArrayList();
list.add(new Integer(1));
list.add(new Byte((byte)2));
list.add(new Short((short)3));
list.add(new Long(4));
list.add(Integer.valueOf(1));
list.add(Byte.valueOf((byte)2));
list.add(Short.valueOf((short)3));
list.add(Long.valueOf(4));
list.add("Profile");
list.add(Boolean.TRUE);
list.add(new Float(1.2f));
list.add(new Double(1.2f));
list.add(Float.valueOf(1.2f));
list.add(Double.valueOf(1.2f));
list.add(new File("profile.txt"));
list.add(Locale.ENGLISH);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
if (method.equals(EQUALS)) {
return new Boolean(args[0] instanceof Runnable);
} else if (method.getName().equals("hashCode")) {
return new Integer(System.identityHashCode(proxy));
return Integer.valueOf(System.identityHashCode(proxy));
} else if (method.getName().equals("toString")) {
return "Proxy" + System.identityHashCode(proxy);
} else if (method.getName().equals("getClass")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void marshal(final Object source, final HierarchicalStreamWriter writer,
}
try {
final Field field = type.getDeclaredField("serialVersionUID");
if (!field.isAccessible()) {
if (!(java.lang.reflect.Modifier.isStatic(field.getModifiers()) ? field.canAccess(null) : field.canAccess(source))) {
field.setAccessible(true);
}
final long serialVersionUID = field.getLong(null);
Expand Down Expand Up @@ -186,7 +186,7 @@ private Callback[] getCallbacks(final Object source) {
for (int i = 0; true; ++i) {
try {
final Field field = type.getDeclaredField(CALLBACK_MARKER + i);
if (!field.isAccessible()) {
if (!(java.lang.reflect.Modifier.isStatic(field.getModifiers()) ? field.canAccess(null) : field.canAccess(source))) {
field.setAccessible(true);
}
fields.add(field);
Expand Down Expand Up @@ -246,7 +246,7 @@ private Callback[] getCallbacks(final Object source) {
}
for (final Iterator<Method> iter = methods.iterator(); iter.hasNext();) {
final Method method = iter.next();
if (!method.isAccessible()) {
if (!(java.lang.reflect.Modifier.isStatic(method.getModifiers()) ? method.canAccess(null) : method.canAccess(source))) {
method.setAccessible(true);
}
if (Factory.class.isAssignableFrom(method.getDeclaringClass())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public Object unmarshal(final HierarchicalStreamReader reader, final Unmarshalli
final Constructor<?> defaultConstructor;
try {
defaultConstructor = type.getDeclaredConstructor();
if (!defaultConstructor.isAccessible()) {
if (!defaultConstructor.canAccess(null)) {
defaultConstructor.setAccessible(true);
}
final Externalizable externalizable = (Externalizable)defaultConstructor.newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Object newInstance(final Class<?> type) {
try {
for (final Constructor<?> constructor : type.getDeclaredConstructors()) {
if (constructor.getParameterTypes().length == 0) {
if (!constructor.isAccessible()) {
if (!constructor.canAccess(null)) {
constructor.setAccessible(true);
}
return constructor.newInstance(new Object[0]);
Expand Down