Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/main/java/com/ibatis/common/beans/BaseProbe.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -97,7 +97,7 @@ protected Object getIndexedProperty(Object object, String indexedName) {
} else if (list instanceof char[]) {
value = Character.valueOf(((char[]) list)[i]);
} else if (list instanceof boolean[]) {
value = new Boolean(((boolean[]) list)[i]);
value = Boolean.valueOf(((boolean[]) list)[i]);
} else if (list instanceof byte[]) {
value = Byte.valueOf(((byte[]) list)[i]);
} else if (list instanceof double[]) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -89,9 +89,9 @@ public Object invoke(Object proxy, Method method, Object[] params) throws Throwa
} else if ("equals".equals(method.getName())) {
Object ps = params[0];
if (ps instanceof Proxy) {
return new Boolean(proxy == ps);
return Boolean.valueOf(proxy == ps);
}
return new Boolean(false);
return Boolean.valueOf(false);
} else if ("hashCode".equals(method.getName())) {
return Integer.valueOf(proxy.hashCode());
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -73,9 +73,9 @@ public Object invoke(Object proxy, Method method, Object[] params) throws Throwa
} else if ("equals".equals(method.getName())) {
Object ps = params[0];
if (ps instanceof Proxy) {
return new Boolean(proxy == ps);
return Boolean.valueOf(proxy == ps);
}
return new Boolean(false);
return Boolean.valueOf(false);
} else if ("hashCode".equals(method.getName())) {
return Integer.valueOf(proxy.hashCode());
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,9 +39,9 @@
* public Object getResult(ResultGetter getter) throws SQLException {
* String s = getter.getString();
* if (YES.equalsIgnoreCase(s)) {
* return new Boolean(true);
* return Boolean.valueOf(true);
* } else if (NO.equalsIgnoreCase(s)) {
* return new Boolean(false);
* return Boolean.valueOf(false);
* } else {
* throw new SQLException("Unexpected value " + s + " found where " + YES + " or " + NO + " was expected.");
* }
Expand All @@ -58,9 +58,9 @@
*
* public Object valueOf(String s) {
* if (YES.equalsIgnoreCase(s)) {
* return new Boolean(true);
* return Boolean.valueOf(true);
* } else if (NO.equalsIgnoreCase(s)) {
* return new Boolean(false);
* return Boolean.valueOf(false);
* } else {
* throw new SQLException("Unexpected value " + s + " found where " + YES + " or " + NO + " was expected.");
* }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2023 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -155,10 +155,10 @@ public void process(Node node) throws Exception {
String type = attributes.getProperty("type");
String readOnlyAttr = attributes.getProperty("readOnly");
Boolean readOnly = readOnlyAttr == null || readOnlyAttr.length() <= 0 ? null
: new Boolean("true".equals(readOnlyAttr));
: Boolean.valueOf("true".equals(readOnlyAttr));
String serializeAttr = attributes.getProperty("serialize");
Boolean serialize = serializeAttr == null || serializeAttr.length() <= 0 ? null
: new Boolean("true".equals(serializeAttr));
: Boolean.valueOf("true".equals(serializeAttr));
type = state.getConfig().getTypeHandlerFactory().resolveAlias(type);
Class clazz = Resources.classForName(type);
if (readOnly == null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
58 changes: 29 additions & 29 deletions src/test/java/com/ibatis/sqlmap/NestedIterateTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2023 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -270,13 +270,13 @@ void test09() {
NestedIterateParameterObject po = new NestedIterateParameterObject();

NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Jeff", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Jeff", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Matt", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Matt", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

try {
Expand All @@ -294,13 +294,13 @@ void test09a() {
NestedIterateParameterObject po = new NestedIterateParameterObject();

NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Jeff", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Jeff", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Matt", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Matt", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

try {
Expand Down Expand Up @@ -490,13 +490,13 @@ void test16() {
NestedIterateParameterObject po = new NestedIterateParameterObject();

NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Jeff", new Boolean(false));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Jeff", Boolean.valueOf(false));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Matt", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Matt", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

try {
Expand All @@ -523,13 +523,13 @@ void test17() {
NestedIterateParameterObject po = new NestedIterateParameterObject();

NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Jeff", new Boolean(false));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Jeff", Boolean.valueOf(false));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Matt", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Matt", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

try {
Expand All @@ -556,13 +556,13 @@ void test18() {
NestedIterateParameterObject po = new NestedIterateParameterObject();

NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Jeff", new Boolean(false));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Jeff", Boolean.valueOf(false));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Matt", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Matt", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

try {
Expand All @@ -585,13 +585,13 @@ void test19() {
NestedIterateParameterObject po = new NestedIterateParameterObject();

NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Jeff", new Boolean(false));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Jeff", Boolean.valueOf(false));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Matt", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Matt", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

try {
Expand All @@ -614,13 +614,13 @@ void test20() {
NestedIterateParameterObject po = new NestedIterateParameterObject();

NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Jeff", new Boolean(false));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Jeff", Boolean.valueOf(false));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

andCondition = new NestedIterateParameterObject.AndCondition();
andCondition.addCondition("first_name =", "Matt", new Boolean(true));
andCondition.addCondition("last_name =", "Jones", new Boolean(true));
andCondition.addCondition("first_name =", "Matt", Boolean.valueOf(true));
andCondition.addCondition("last_name =", "Jones", Boolean.valueOf(true));
po.addOrCondition(andCondition);

try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,9 +28,9 @@ public class HundredsTypeHandlerCallback implements TypeHandlerCallback {
public Object getResult(ResultGetter getter) throws SQLException {
int i = getter.getInt();
if (i == 100) {
return new Boolean(true);
return Boolean.valueOf(true);
} else if (i == 200) {
return new Boolean(false);
return Boolean.valueOf(false);
} else {
throw new SQLException("Unexpected value " + i + " found where 100 or 200 was expected.");
}
Expand All @@ -49,9 +49,9 @@ public void setParameter(ParameterSetter setter, Object parameter) throws SQLExc
@Override
public Object valueOf(String s) {
if ("100".equalsIgnoreCase(s)) {
return new Boolean(true);
return Boolean.valueOf(true);
} else if ("200".equalsIgnoreCase(s)) {
return new Boolean(false);
return Boolean.valueOf(false);
} else {
throw new SqlMapException("Unexpected value " + s + " found where 100 or 200 was expected.");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,9 +28,9 @@ public class PirateTypeHandlerCallback implements TypeHandlerCallback {
public Object getResult(ResultGetter getter) throws SQLException {
String s = getter.getString();
if ("Aye".equalsIgnoreCase(s)) {
return new Boolean(true);
return Boolean.valueOf(true);
} else if ("Nay".equalsIgnoreCase(s)) {
return new Boolean(false);
return Boolean.valueOf(false);
} else {
throw new SQLException("Unexpected value " + s + " found where 'Aye' or 'Nay' was expected.");
}
Expand All @@ -49,9 +49,9 @@ public void setParameter(ParameterSetter setter, Object parameter) throws SQLExc
@Override
public Object valueOf(String s) {
if ("Aye".equalsIgnoreCase(s)) {
return new Boolean(true);
return Boolean.valueOf(true);
} else if ("Nay".equalsIgnoreCase(s)) {
return new Boolean(false);
return Boolean.valueOf(false);
} else {
throw new SqlMapException("Unexpected value " + s + " found where 'Aye' or 'Nay' was expected.");
}
Expand Down
Loading