remove explicit (un)boxing
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/dbws/org.eclipse.persistence.dbws/src/it/java/dbws/testing/xrdynamicentity/XRDynamicEntityTestSuite.java b/dbws/org.eclipse.persistence.dbws/src/it/java/dbws/testing/xrdynamicentity/XRDynamicEntityTestSuite.java
index cb0958a..1dc8a68 100644
--- a/dbws/org.eclipse.persistence.dbws/src/it/java/dbws/testing/xrdynamicentity/XRDynamicEntityTestSuite.java
+++ b/dbws/org.eclipse.persistence.dbws/src/it/java/dbws/testing/xrdynamicentity/XRDynamicEntityTestSuite.java
@@ -124,7 +124,7 @@
// test #2
DynamicEntity e = entity1.set(FIELD_1, TEST_STRING);
assertSame(e, entity1);
- e = entity1.set(FIELD_2, Integer.valueOf(17));
+ e = entity1.set(FIELD_2, 17);
assertSame(e, entity1);
// test #3
String test = entity1.<String>get(FIELD_1);
diff --git a/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/Result.java b/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/Result.java
index 71edf5e..486816f 100644
--- a/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/Result.java
+++ b/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/Result.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -71,7 +71,7 @@
}
public boolean isCollection () {
- return isCollection == null ? false : isCollection.booleanValue();
+ return isCollection == null ? false : isCollection;
}
/**
diff --git a/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/XRDynamicClassLoader.java b/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/XRDynamicClassLoader.java
index 92246ac..0643892 100644
--- a/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/XRDynamicClassLoader.java
+++ b/dbws/org.eclipse.persistence.dbws/src/main/java/org/eclipse/persistence/internal/xr/XRDynamicClassLoader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -39,7 +39,7 @@
@Override
protected Class<?> findClass(String className) throws ClassNotFoundException {
- if (!generateSubclasses.booleanValue()) {
+ if (!generateSubclasses) {
throw new ClassNotFoundException(className);
}
try {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java
index 4212f85..eded7e3 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java
@@ -1532,8 +1532,8 @@
descriptor.getDescriptorInheritancePolicy().setShouldReadSubclasses(true);
descriptor.getDescriptorInheritancePolicy().setClassIndicatorFieldName("TYPE");
descriptor.getDescriptorInheritancePolicy().setShouldUseClassNameAsIndicator(false);
- descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Car.class, Integer.valueOf(1));
- descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Bicycle.class, Integer.valueOf(2));
+ descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Car.class, 1);
+ descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Bicycle.class, 2);
// SECTION: COPY POLICY
descriptor.createCopyPolicy("constructor");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/House.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/House.java
index 0e57a72..143a68d 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/House.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/House.java
@@ -29,7 +29,7 @@
super();
sellingPoints = new Vector();
insuranceId = new Oid();
- insuranceId.setOid(Integer.valueOf(0));
+ insuranceId.setOid(0);
}
public java.lang.String getDescriptions() {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java
index e402ddb..881274a 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java
@@ -31,7 +31,7 @@
SingleHouse example1 = new SingleHouse();
Oid insurancePolicyId = new Oid();
- insurancePolicyId.setOid(Integer.valueOf(15));
+ insurancePolicyId.setOid(15);
example1.setInsuranceId(insurancePolicyId);
example1.setDescriptions("beautiful 4 bedroom single house");
example1.setLocation("435 Carling Ave.");
@@ -48,7 +48,7 @@
SingleHouse example2 = new SingleHouse();
Oid insurancePolicyId = new Oid();
- insurancePolicyId.setOid(Integer.valueOf(27));
+ insurancePolicyId.setOid(27);
example2.setInsuranceId(insurancePolicyId);
example2.setDescriptions("spacious 5 bedroom banglow");
example2.setLocation("33D King Edward Street");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/TownHouse.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/TownHouse.java
index e9f9a97..1b88752 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/TownHouse.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/aggregate/TownHouse.java
@@ -23,7 +23,7 @@
TownHouse example3 = new TownHouse();
Oid insurancePolicyId = new Oid();
- insurancePolicyId.setOid(Integer.valueOf(333));
+ insurancePolicyId.setOid(333);
example3.setInsuranceId(insurancePolicyId);
example3.setDescriptions("renovated 3-bedroom gardon house");
example3.setLocation("2236 Baseline Rd");
@@ -34,7 +34,7 @@
TownHouse example4 = new TownHouse();
Oid insurancePolicyId = new Oid();
- insurancePolicyId.setOid(Integer.valueOf(4444));
+ insurancePolicyId.setOid(4444);
example4.setInsuranceId(insurancePolicyId);
example4.setDescriptions("two bedroom luxury townhouse");
example4.setLocation("790C Bank Street");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/MenuItem.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/MenuItem.java
index d4cd832..57f9542 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/MenuItem.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/MenuItem.java
@@ -246,7 +246,7 @@
}
public void setPrice(float newValue) {
- propertyChange("price", Float.valueOf(this.price), Float.valueOf(newValue));
+ propertyChange("price", this.price, newValue);
this.price = newValue;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java
index 9043802..9b62aa1 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java
@@ -114,9 +114,9 @@
public AggregateDirectMapHolder getAggregateDirectMapHolder(){
AggregateDirectMapHolder holder = new AggregateDirectMapHolder();
AggregateMapKey mapKey = getAggregateMapKey1();
- holder.addAggregateToDirectMapItem(mapKey, Integer.valueOf(1));
+ holder.addAggregateToDirectMapItem(mapKey, 1);
AggregateMapKey mapKey2 = getAggregateMapKey2();
- holder.addAggregateToDirectMapItem(mapKey2, Integer.valueOf(2));
+ holder.addAggregateToDirectMapItem(mapKey2, 2);
return holder;
}
@@ -161,16 +161,16 @@
public DirectAggregateMapHolder getDirectAggregateMapHolder(){
DirectAggregateMapHolder holder = new DirectAggregateMapHolder();
AggregateMapValue value = getAggregateMapValue1();
- holder.addDirectToAggregateMapItem(Integer.valueOf(1), value);
+ holder.addDirectToAggregateMapItem(1, value);
value = getAggregateMapValue2();
- holder.addDirectToAggregateMapItem(Integer.valueOf(2), value);
+ holder.addDirectToAggregateMapItem(2, value);
return holder;
}
public DirectDirectMapHolder getDirectDirectMapHolder(){
DirectDirectMapHolder holder = new DirectDirectMapHolder();
- holder.addDirectToDirectMapItem(Integer.valueOf(1), Integer.valueOf(1));
- holder.addDirectToDirectMapItem(Integer.valueOf(2), Integer.valueOf(2));
+ holder.addDirectToDirectMapItem(1, 1);
+ holder.addDirectToDirectMapItem(2, 2);
return holder;
}
@@ -178,31 +178,31 @@
DirectEntity1MMapHolder initialHolder = new DirectEntity1MMapHolder();
DEOTMMapValue value = getDEOTMMapValue1();
value.getHolder().setValue(initialHolder);
- initialHolder.addDirectToEntityMapItem(Integer.valueOf(11), value);
+ initialHolder.addDirectToEntityMapItem(11, value);
DEOTMMapValue value2 = getDEOTMMapValue2();
value2.getHolder().setValue(initialHolder);
- initialHolder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
+ initialHolder.addDirectToEntityMapItem(22, value2);
return initialHolder;
}
public DirectEntityMapHolder getDirectEntityMapHolder(){
DirectEntityMapHolder holder = new DirectEntityMapHolder();
EntityMapValue value = getEntityMapValue1();
- holder.addDirectToEntityMapItem(Integer.valueOf(11), value);
+ holder.addDirectToEntityMapItem(11, value);
EntityMapValue value2 = getEntityMapValue2();
- holder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
+ holder.addDirectToEntityMapItem(22, value2);
return holder;
}
public DirectEntityU1MMapHolder getDirectEntityU1MMapHolder(){
DirectEntityU1MMapHolder holder = new DirectEntityU1MMapHolder();
EntityMapValue value = getEntityMapValue3();
- holder.addDirectToEntityMapItem(Integer.valueOf(11), value);
+ holder.addDirectToEntityMapItem(11, value);
EntityMapValue value2 = getEntityMapValue4();
- holder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
+ holder.addDirectToEntityMapItem(22, value2);
return holder;
}
@@ -220,9 +220,9 @@
public EntityDirectMapHolder getEntityDirectMapHolder(){
EntityDirectMapHolder holder = new EntityDirectMapHolder();
EntityMapKey mapKey = getEntityMapKey3();
- holder.addEntityDirectMapItem(mapKey, Integer.valueOf(1));
+ holder.addEntityDirectMapItem(mapKey, 1);
EntityMapKey mapKey2 = getEntityMapKey4();
- holder.addEntityDirectMapItem(mapKey2, Integer.valueOf(2));
+ holder.addEntityDirectMapItem(mapKey2, 2);
return holder;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java
index f91dcd4..bca05f4 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java
@@ -96,14 +96,14 @@
example.aPByte = 1;
example.setAPByteArray(new byte[] { 1, 2, 3 });
example.aPShort = 1;
- example.aCharacter = Character.valueOf('a');
- example.anInteger = Integer.valueOf(1);
- example.aFloat = Float.valueOf(1.0f);
- example.aBoolean = Boolean.valueOf(false);
- example.aLong = Long.valueOf(1L);
- example.aDouble = Double.valueOf(1.0);
- example.aByte = Byte.valueOf((byte)1);
- example.aShort = Short.valueOf((short)1);
+ example.aCharacter = 'a';
+ example.anInteger = 1;
+ example.aFloat = 1.0f;
+ example.aBoolean = Boolean.FALSE;
+ example.aLong = 1L;
+ example.aDouble = 1.0;
+ example.aByte = (byte) 1;
+ example.aShort = (short) 1;
example.aBigDecimal = new java.math.BigDecimal(1.0);
example.aBigInteger = new java.math.BigInteger("1");
example.aNumber = example.aBigDecimal;
@@ -155,14 +155,14 @@
example.aPByte = 2;
example.setAPByteArray(new byte[] { 4, 5, 6 });
example.aPShort = 2;
- example.aCharacter = Character.valueOf('b');
- example.anInteger = Integer.valueOf(2);
- example.aFloat = Float.valueOf(2.0f);
- example.aBoolean = Boolean.valueOf(true);
- example.aLong = Long.valueOf(2L);
- example.aDouble = Double.valueOf(2.0);
- example.aByte = Byte.valueOf((byte)2);
- example.aShort = Short.valueOf((short)2);
+ example.aCharacter = 'b';
+ example.anInteger = 2;
+ example.aFloat = 2.0f;
+ example.aBoolean = Boolean.TRUE;
+ example.aLong = 2L;
+ example.aDouble = 2.0;
+ example.aByte = (byte) 2;
+ example.aShort = (short) 2;
example.aBigDecimal = new java.math.BigDecimal(2.0);
example.aBigInteger = new java.math.BigInteger("2");
example.aNumber = example.aBigDecimal;
@@ -213,14 +213,14 @@
example.aPByte = 3;
example.setAPByteArray(new byte[] { 7, 8, 9 });
example.aPShort = 3;
- example.aCharacter = Character.valueOf('c');
- example.anInteger = Integer.valueOf(3);
- example.aFloat = Float.valueOf(3.0f);
- example.aBoolean = Boolean.valueOf(true);
- example.aLong = Long.valueOf(3L);
- example.aDouble = Double.valueOf(3.0);
- example.aByte = Byte.valueOf((byte)3);
- example.aShort = Short.valueOf((short)3);
+ example.aCharacter = 'c';
+ example.anInteger = 3;
+ example.aFloat = 3.0f;
+ example.aBoolean = Boolean.TRUE;
+ example.aLong = 3L;
+ example.aDouble = 3.0;
+ example.aByte = (byte) 3;
+ example.aShort = (short) 3;
example.aBigDecimal = new java.math.BigDecimal(3.0);
example.aBigInteger = new java.math.BigInteger("3");
example.aNumber = example.aBigDecimal;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java
index 2193031..a4d42a6 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java
@@ -28,14 +28,14 @@
example.setAPCharArray(new char[] { 'a', 'b', 'c' });
example.setAPByteArray(new byte[] { 1, 2, 3 });
- example.aCharacter = Character.valueOf('t');
- example.anInteger = Integer.valueOf(1);
- example.aFloat = Float.valueOf(1.0f);
- example.aBoolean = Boolean.valueOf(false);
- example.aLong = Long.valueOf(1L);
- example.aDouble = Double.valueOf(1.0);
- example.aByte = Byte.valueOf((byte)1);
- example.aShort = Short.valueOf((short)1);
+ example.aCharacter = 't';
+ example.anInteger = 1;
+ example.aFloat = 1.0f;
+ example.aBoolean = Boolean.FALSE;
+ example.aLong = 1L;
+ example.aDouble = 1.0;
+ example.aByte = (byte) 1;
+ example.aShort = (short) 1;
example.aBigDecimal = new java.math.BigDecimal(1.0);
example.aBigInteger = new java.math.BigInteger("1");
example.aNumber = example.aBigDecimal;
@@ -53,7 +53,7 @@
example.stringToInt = new String("111");
example.stringToTimestamp = new String("2003/11/23 23:45:56");
example.aByteArray = new Byte[] { Byte.valueOf("4"), Byte.valueOf("5"), Byte.valueOf("6") };
- example.aCharacterArray = new Character[] { Character.valueOf('C'), Character.valueOf('H'), Character.valueOf('A') };
+ example.aCharacterArray = new Character[] {'C', 'H', 'A'};
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/Employee.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/Employee.java
index 2c4d6b7..9413eca 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/Employee.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/Employee.java
@@ -508,7 +508,7 @@
@Override
public void setSalary(int salary) {
- propertyChange("salary", Integer.valueOf(this.salary), Integer.valueOf(salary));
+ propertyChange("salary", this.salary, salary);
this.salary = salary;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java
index bcbc09f..d12c316 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java
@@ -44,7 +44,7 @@
@Override
public void setBudget(double budget) {
- propertyChange("budget", Double.valueOf(this.budget), Double.valueOf(budget));
+ propertyChange("budget", this.budget, budget);
this.budget = budget;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bicycle.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bicycle.java
index 601447d..a8f04c6 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bicycle.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bicycle.java
@@ -19,7 +19,7 @@
@Override
public void change() {
- this.setPassengerCapacity(Integer.valueOf(100));
+ this.setPassengerCapacity(100);
this.addPartNumber("NEWBIKEPART 1");
this.setDescription("This Bike is easy to handle");
@@ -28,7 +28,7 @@
public static Bicycle example1(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(1));
+ example.setPassengerCapacity(1);
example.getOwner().setValue(company);
example.setDescription("Hercules");
example.addPartNumber("1288H8HH-f");
@@ -39,7 +39,7 @@
public static Bicycle example2(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(2));
+ example.setPassengerCapacity(2);
example.getOwner().setValue(company);
example.setDescription("Atlas");
example.addPartNumber("176339GT-a");
@@ -51,7 +51,7 @@
public static Bicycle example3(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(3));
+ example.setPassengerCapacity(3);
example.getOwner().setValue(company);
example.setDescription("Aone");
example.addPartNumber("188181TT-a");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Boat.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Boat.java
index 2eb3883..ecd77de 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Boat.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Boat.java
@@ -18,7 +18,7 @@
public static Boat example1(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(10));
+ example.setPassengerCapacity(10);
example.getOwner().setValue(company);
return example;
}
@@ -26,7 +26,7 @@
public static Boat example2(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(20));
+ example.setPassengerCapacity(20);
example.getOwner().setValue(company);
return example;
}
@@ -34,7 +34,7 @@
public static Boat example3(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(30);
example.getOwner().setValue(company);
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bus.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bus.java
index 0ec1123..3fd7033 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bus.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Bus.java
@@ -20,8 +20,8 @@
public static Bus example2(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("SCHOOL BUS");
example.setFuelType("Petrol");
example.getOwner().setValue(company);
@@ -35,8 +35,8 @@
public static Bus example3(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("TOUR BUS");
example.setFuelType("Petrol");
example.getOwner().setValue(company);
@@ -50,8 +50,8 @@
public static Bus example4(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("TRANSIT BUS");
example.setFuelType("Gas");
example.getOwner().setValue(company);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Car.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Car.java
index 3b1d1e8..86bc2d6 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Car.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/Car.java
@@ -22,8 +22,8 @@
public static Car example1() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(30);
example.setDescription("PONTIAC");
example.setFuelType("Petrol");
example.addPartNumber("021776RM-b");
@@ -35,8 +35,8 @@
public static Car example2() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(4));
- example.setFuelCapacity(Integer.valueOf(50));
+ example.setPassengerCapacity(4);
+ example.setFuelCapacity(50);
example.setDescription("TOYOTA");
example.setFuelType("Petrol");
example.addPartNumber("021776TT-a");
@@ -48,8 +48,8 @@
public static Car example3() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(5));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(5);
+ example.setFuelCapacity(60);
example.setDescription("BMW");
example.setFuelType("Disel");
example.addPartNumber("021776KM-k");
@@ -61,8 +61,8 @@
public static Car example4() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(8));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(8);
+ example.setFuelCapacity(100);
example.setDescription("Mazda");
example.setFuelType("Coca-Cola");
example.addPartNumber("021776KM-k");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java
index dc384c3..6948de7 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java
@@ -21,7 +21,7 @@
@Override
public void change() {
- this.setPassengerCapacity(Integer.valueOf(100));
+ this.setPassengerCapacity(100);
this.addPartNumber("NEWPART 1");
this.setFuelType("HOT AIR");
@@ -30,8 +30,8 @@
public static FueledVehicle example1(Company company) {
FueledVehicle example = new FueledVehicle();
- example.setPassengerCapacity(Integer.valueOf(1));
- example.setFuelCapacity(Integer.valueOf(10));
+ example.setPassengerCapacity(1);
+ example.setFuelCapacity(10);
example.setDescription("Motercycle");
example.getOwner().setValue(company);
return example;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java
index 96a9930..53165e9 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java
@@ -25,8 +25,8 @@
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(30);
example.setDescription("PONTIAC");
example.setFuelType("Petrol");
example.addPartNumber("021776RM-b");
@@ -38,8 +38,8 @@
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(4));
- example.setFuelCapacity(Integer.valueOf(50));
+ example.setPassengerCapacity(4);
+ example.setFuelCapacity(50);
example.setDescription("TOYOTA");
example.setFuelType("Petrol");
example.addPartNumber("021776TT-a");
@@ -51,8 +51,8 @@
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(5));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(5);
+ example.setFuelCapacity(60);
example.setDescription("BMW");
example.setFuelType("Disel");
example.addPartNumber("021776KM-k");
@@ -64,8 +64,8 @@
{
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(8));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(8);
+ example.setFuelCapacity(100);
example.setDescription("Mazda");
example.setFuelType("Coca-Cola");
example.addPartNumber("021776KM-k");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java
index b03ae8d..238d00d 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java
@@ -18,7 +18,7 @@
public static NonFueledVehicle example4(Company company) {
NonFueledVehicle example = new NonFueledVehicle();
- example.setPassengerCapacity(Integer.valueOf(1));
+ example.setPassengerCapacity(1);
example.getOwner().setValue(company);
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/SportsCar.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/SportsCar.java
index 594a6fb..57aaf20 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/SportsCar.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/inheritance/SportsCar.java
@@ -18,8 +18,8 @@
public static Car example1() {
SportsCar example = new SportsCar();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(60);
example.setDescription("Corvet");
example.setFuelType("Disel");
return example;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java
index 932ad02..b3d2a90 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java
@@ -282,10 +282,10 @@
// Inheritance properties.
descriptor.getDescriptorInheritancePolicy().setClassIndicatorFieldName("POLICY.POL_TYPE");
- descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HousePolicy.class, Long.valueOf(3));
- descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HealthPolicy.class, Long.valueOf(2));
- descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.VehiclePolicy.class, Long.valueOf(1));
- descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.BicyclePolicy.class, Long.valueOf(0));
+ descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HousePolicy.class, 3L);
+ descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HealthPolicy.class, 2L);
+ descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.VehiclePolicy.class, 1L);
+ descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.BicyclePolicy.class, 0L);
// Mappings.
DirectToFieldMapping policyNumberMapping = new DirectToFieldMapping();
@@ -381,8 +381,8 @@
sexMapping.setSetMethodName("setSex");
sexMapping.setFieldName("HOLDER.SEX");
ObjectTypeConverter sexConverter = new ObjectTypeConverter();
- sexConverter.addConversionValue(Character.valueOf('F'), "Female");
- sexConverter.addConversionValue(Character.valueOf('M'), "Male");
+ sexConverter.addConversionValue('F', "Female");
+ sexConverter.addConversionValue('M', "Male");
sexMapping.setConverter(sexConverter);
descriptor.addMapping(sexMapping);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Commercial.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Commercial.java
index 4c9e299..a727b0c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Commercial.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Commercial.java
@@ -43,7 +43,7 @@
}
public void setDuration(float duration) {
- this.duration = Float.valueOf(duration);
+ this.duration = duration;
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java
index f4a7687..35c69ad 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java
@@ -33,7 +33,7 @@
CourseDeveloper example = new CourseDeveloper();
example.setCourse("Intro to Quake 2 Map Design using Qoole");
- example.setSalary(Float.valueOf(52000.00f));
+ example.setSalary(52000.00f);
return example;
}
@@ -42,7 +42,7 @@
CourseDeveloper example = new CourseDeveloper();
example.setCourse("Introduction to Synthesis");
- example.setSalary(Float.valueOf(51000.00f));
+ example.setSalary(51000.00f);
return example;
}
@@ -51,7 +51,7 @@
CourseDeveloper example = new CourseDeveloper();
example.setCourse("Welcome to Ada!");
- example.setSalary(Float.valueOf(56000.00f));
+ example.setSalary(56000.00f);
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java
index 07bf950..c04ee27 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java
@@ -279,7 +279,7 @@
// SECTION: VARIABLEONETOONEMAPPING
org.eclipse.persistence.mappings.VariableOneToOneMapping variableonetoonemapping =
new org.eclipse.persistence.mappings.VariableOneToOneMapping();
- variableonetoonemapping.setWeight(Integer.valueOf(3));
+ variableonetoonemapping.setWeight(3);
variableonetoonemapping.setAttributeName("contact");
variableonetoonemapping.setIsReadOnly(false);
variableonetoonemapping.setUsesIndirection(false);
@@ -664,8 +664,8 @@
//variableonetoonemapping.addClassIndicator(Email.class, "E");
//variableonetoonemapping.addClassIndicator(Phone.class, "P");
variableonetoonemapping.addClassIndicator(Email.class,
- Float.valueOf(1)); // TO TEST NUMERIC TYPE INDICATOR
- variableonetoonemapping.addClassIndicator(Phone.class, Float.valueOf(2));
+ 1F); // TO TEST NUMERIC TYPE INDICATOR
+ variableonetoonemapping.addClassIndicator(Phone.class, 2F);
descriptor.addMapping(variableonetoonemapping);
// SECTION: VARIABLEONETOONEMAPPING
@@ -681,8 +681,8 @@
//variableonetoonemapping2.addClassIndicator(Email.class, "E");
//variableonetoonemapping2.addClassIndicator(Phone.class, "P");
variableonetoonemapping2.addClassIndicator(Email.class,
- Float.valueOf(1)); // TO TEST NUMERIC TYPE INDICATOR
- variableonetoonemapping2.addClassIndicator(Phone.class, Float.valueOf(2));
+ 1F); // TO TEST NUMERIC TYPE INDICATOR
+ variableonetoonemapping2.addClassIndicator(Phone.class, 2F);
descriptor.addMapping(variableonetoonemapping2);
Employee.addToDescriptor(descriptor);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java
index 412cea5..faecbc9 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java
@@ -33,7 +33,7 @@
PersonnelManager example = new PersonnelManager();
example.setDepartment("Division A");
- example.setSalary(Float.valueOf(77235.00f));
+ example.setSalary(77235.00f);
Vector employees = new Vector(5);
employees.addElement(CourseDeveloper.example1());
@@ -51,7 +51,7 @@
PersonnelManager example = new PersonnelManager();
example.setDepartment("Division B");
- example.setSalary(Float.valueOf(97235.00f));
+ example.setSalary(97235.00f);
Vector employees = new Vector(5);
employees.addElement(CourseDeveloper.example2());
@@ -69,7 +69,7 @@
PersonnelManager example = new PersonnelManager();
example.setDepartment("Division C");
- example.setSalary(Float.valueOf(87265.00f));
+ example.setSalary(87265.00f);
Vector employees = new Vector(5);
employees.addElement(CourseDeveloper.example3());
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java
index 2c4902d..00a4f45 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java
@@ -23,7 +23,7 @@
ProductDeveloper example = new ProductDeveloper();
example.setProduct("Quake 2 Maps");
- example.setSalary(Float.valueOf(145000.00f));
+ example.setSalary(145000.00f);
return example;
}
@@ -32,7 +32,7 @@
ProductDeveloper example = new ProductDeveloper();
example.setProduct("Trinity Operating System");
- example.setSalary(Float.valueOf(85000.00f));
+ example.setSalary(85000.00f);
return example;
}
@@ -41,7 +41,7 @@
ProductDeveloper example = new ProductDeveloper();
example.setProduct("Ada For Dummies");
- example.setSalary(Float.valueOf(80000.00f));
+ example.setSalary(80000.00f);
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductManager.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductManager.java
index 64565d2..3beacca 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductManager.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/ProductManager.java
@@ -34,7 +34,7 @@
ProductManager example = new ProductManager();
example.setProduct("Quake 2 Maps");
- example.setSalary(Float.valueOf(88000.00f));
+ example.setSalary(88000.00f);
example.setGoldCardNumber(new BigInteger("482122381872"));
Vector employees = new Vector(1);
@@ -49,7 +49,7 @@
ProductManager example = new ProductManager();
example.setProduct("Trinity Operating System");
- example.setSalary(Float.valueOf(84000.00f));
+ example.setSalary(84000.00f);
example.setGoldCardNumber(new BigInteger("998128762878"));
Vector employees = new Vector(1);
@@ -64,7 +64,7 @@
ProductManager example = new ProductManager();
example.setProduct("Ada For Dummies");
- example.setSalary(Float.valueOf(84000.00f));
+ example.setSalary(84000.00f);
example.setGoldCardNumber(new BigInteger("144173389267"));
Vector employees = new Vector(1);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Receptionist.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Receptionist.java
index b45a9a8..849d6f8 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Receptionist.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Receptionist.java
@@ -22,9 +22,9 @@
public static Receptionist example1() {
Receptionist example = new Receptionist();
- example.setWordsPerMinute(Integer.valueOf(50));
- example.setSalary(Float.valueOf(22500.00f));
- example.setMinimumSalary(Float.valueOf(22000.00f));
+ example.setWordsPerMinute(50);
+ example.setSalary(22500.00f);
+ example.setMinimumSalary(22000.00f);
return example;
}
@@ -32,9 +32,9 @@
public static Receptionist example2() {
Receptionist example = new Receptionist();
- example.setWordsPerMinute(Integer.valueOf(50));
- example.setSalary(Float.valueOf(23450.00f));
- example.setMinimumSalary(Float.valueOf(22000.00f));
+ example.setWordsPerMinute(50);
+ example.setSalary(23450.00f);
+ example.setMinimumSalary(22000.00f);
return example;
}
@@ -42,9 +42,9 @@
public static Receptionist example3() {
Receptionist example = new Receptionist();
- example.setWordsPerMinute(Integer.valueOf(60));
- example.setSalary(Float.valueOf(26450.00f));
- example.setMinimumSalary(Float.valueOf(22000.00f));
+ example.setWordsPerMinute(60);
+ example.setSalary(26450.00f);
+ example.setMinimumSalary(22000.00f);
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Secretary.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Secretary.java
index 101462c..80d68cb 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Secretary.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Secretary.java
@@ -23,8 +23,8 @@
Secretary example = new Secretary();
example.setDepartment("Finance");
- example.setSalary(Float.valueOf(33500.00f));
- example.setMinimumSalary(Float.valueOf(31000.00f));
+ example.setSalary(33500.00f);
+ example.setMinimumSalary(31000.00f);
return example;
}
@@ -33,8 +33,8 @@
Secretary example = new Secretary();
example.setDepartment("Employment");
- example.setSalary(Float.valueOf(33500.00f));
- example.setMinimumSalary(Float.valueOf(31000.00f));
+ example.setSalary(33500.00f);
+ example.setMinimumSalary(31000.00f);
return example;
}
@@ -43,8 +43,8 @@
Secretary example = new Secretary();
example.setDepartment("Public Relations");
- example.setSalary(Float.valueOf(35000.00f));
- example.setMinimumSalary(Float.valueOf(31000.00f));
+ example.setSalary(35000.00f);
+ example.setMinimumSalary(31000.00f);
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Show.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Show.java
index b8cc3f6..7ad2cfb 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Show.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/interfaces/Show.java
@@ -20,7 +20,7 @@
public class Show implements Program, java.io.Serializable {
public String name;
public String description;
- public Number duration = Float.valueOf(0);
+ public Number duration = (float) 0;
@Override
public String getDescription() {
@@ -43,11 +43,11 @@
}
public void setDuration(double duration) {
- this.duration = Double.valueOf(duration);
+ this.duration = duration;
}
public void setDuration(float duration) {
- this.duration = Float.valueOf(duration);
+ this.duration = duration;
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Computer.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Computer.java
index 117d88b..0974c4a 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Computer.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Computer.java
@@ -146,11 +146,11 @@
}
public void isMacintosh() {
- isMacintosh = Boolean.valueOf(true);
+ isMacintosh = Boolean.TRUE;
}
public void notMacintosh() {
- isMacintosh = Boolean.valueOf(false);
+ isMacintosh = Boolean.FALSE;
}
public void setDescription(String aDescription) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee.java
index 5460111..1e6a71f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee.java
@@ -483,10 +483,10 @@
}
if (getDesignation().getValue().equals("Executive")) {
- rank = Integer.valueOf(1);
+ rank = 1;
}
if (getDesignation().getValue().equals("Non-Executive")) {
- rank = Integer.valueOf(2);
+ rank = 2;
}
return rank;
}
@@ -495,15 +495,15 @@
if (row.get("ERANK") == null) {
return null;
}
- Integer value = Integer.valueOf(((Number)row.get("ERANK")).intValue());
+ Integer value = ((Number) row.get("ERANK")).intValue();
String rank = null;
Employee employee = new Employee();
//(Employee) aSession.readObject(Employee.class);
- if (value.intValue() == 1) {
+ if (value == 1) {
rank = new String("Executive");
}
- if (value.intValue() == 2) {
+ if (value == 2) {
rank = new String("Non-Executive");
}
return rank;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee2.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee2.java
index ea5ac16..1b9ea99 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee2.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/Employee2.java
@@ -30,8 +30,8 @@
public static Employee2 example1() {
Employee2 example = new Employee2();
- example.setId(Integer.valueOf(1));
- example.setEmployeeNumber(Integer.valueOf(2));
+ example.setId(1);
+ example.setEmployeeNumber(2);
example.setEmployeeNumberB(example.getEmployeeNumber());
example.setExtraInfo("Extra info string");
example.setFirstName("Jan");
@@ -42,8 +42,8 @@
public static Employee2 example2() {
Employee2 example = new Employee2();
- example.setId(Integer.valueOf(4));
- example.setEmployeeNumber(Integer.valueOf(8));
+ example.setId(4);
+ example.setEmployeeNumber(8);
example.setEmployeeNumberB(example.getEmployeeNumber());
example.setExtraInfo("Whatever");
example.setFirstName("Ursula");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/MappingProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/MappingProject.java
index ad9a7d3..ced2849 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/MappingProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/mapping/MappingProject.java
@@ -205,9 +205,9 @@
objecttypemapping.setAttributeName("isMacintosh");
objecttypemapping.setIsReadOnly(false);
objecttypemapping.setFieldName("MAP_COM.IS_MAC");
- objecttypeconverter.addConversionValue("No", Boolean.valueOf(false));
- objecttypeconverter.addConversionValue("Yes", Boolean.valueOf(true));
- objecttypemapping.setNullValue(Boolean.valueOf(false));
+ objecttypeconverter.addConversionValue("No", Boolean.FALSE);
+ objecttypeconverter.addConversionValue("Yes", Boolean.TRUE);
+ objecttypemapping.setNullValue(Boolean.FALSE);
objecttypemapping.setConverter(objecttypeconverter);
descriptor.addMapping(objecttypemapping);
@@ -807,8 +807,8 @@
validMapping.setAttributeName("valid");
validMapping.setFieldName("MAP_PERIPHERAL.VALID");
ObjectTypeConverter validMappingConverter = new ObjectTypeConverter();
- validMappingConverter.addConversionValue(Character.valueOf('N'), Boolean.valueOf("false"));
- validMappingConverter.addConversionValue(Character.valueOf('Y'), Boolean.valueOf("true"));
+ validMappingConverter.addConversionValue('N', Boolean.valueOf("false"));
+ validMappingConverter.addConversionValue('Y', Boolean.valueOf("true"));
validMapping.setConverter(validMappingConverter);
descriptor.addMapping(validMapping);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java
index f55bde2..fbc7ff8 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java
@@ -311,7 +311,7 @@
}
public void setSalary(int salary) {
- propertyChange("salary", Integer.valueOf(this.salary), Integer.valueOf(salary));
+ propertyChange("salary", this.salary, salary);
this.salary = salary;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java
index 8f39a3f..e994af5 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java
@@ -46,7 +46,7 @@
}
public void setBudget(double budget) {
- propertyChange("budget", Double.valueOf(this.budget), Double.valueOf(budget));
+ propertyChange("budget", this.budget, budget);
this.budget = budget;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java
index 84cd86b..a85ed45 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java
@@ -383,8 +383,8 @@
onMapping.setFieldName("on->DIRECT");
ObjectTypeConverter onMappingConverter = new ObjectTypeConverter();
onMappingConverter.setDefaultAttributeValue(Boolean.valueOf("false"));
- onMappingConverter.addConversionValue(Character.valueOf('F'), Boolean.valueOf("false"));
- onMappingConverter.addConversionValue(Character.valueOf('T'), Boolean.valueOf("true"));
+ onMappingConverter.addConversionValue('F', Boolean.valueOf("false"));
+ onMappingConverter.addConversionValue('T', Boolean.valueOf("true"));
onMapping.setConverter(onMappingConverter);
descriptor.addMapping(onMapping);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java
index 4b3dc8e..6a88c23 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java
@@ -48,7 +48,7 @@
}
public void setBudget(double budget) {
- propertyChange("budget", Double.valueOf(this.budget), Double.valueOf(budget));
+ propertyChange("budget", this.budget, budget);
this.budget = budget;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java
index a5bfa1c..7a0fd5c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java
@@ -56,7 +56,7 @@
}
public void setId(int newId) {
- propertyChange("id", Integer.valueOf(this.id), Integer.valueOf(newId));
+ propertyChange("id", this.id, newId);
id = newId;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java
index 1647dc5..31a600a 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java
@@ -121,26 +121,26 @@
uow.registerObject(fieldOffice2);
Dept dept = new Dept();
- dept.setDeptno(Double.valueOf(5.0));
+ dept.setDeptno(5.0);
dept.setDname("Goofs");
Emp emp = new Emp();
- emp.setEmpno(Double.valueOf(5.0));
+ emp.setEmpno(5.0);
emp.setEname("Anthony");
emp.setDeptno(dept);
Emp emp1 = new Emp();
- emp1.setEmpno(Double.valueOf(6.0));
+ emp1.setEmpno(6.0);
emp1.setEname("Bob");
emp1.setDeptno(dept);
Emp emp2 = new Emp();
- emp2.setEmpno(Double.valueOf(7.0));
+ emp2.setEmpno(7.0);
emp2.setEname("Fargo");
emp2.setDeptno(dept);
Emp emp3 = new Emp();
- emp3.setEmpno(Double.valueOf(8.0));
+ emp3.setEmpno(8.0);
emp3.setEname("Oneder");
emp3.setDeptno(dept);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java
index d806073..c2af76f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java
@@ -55,7 +55,7 @@
* @param newId int
*/
public void setId(int newId) {
- propertyChange("id", Integer.valueOf(this.id), Integer.valueOf(newId));
+ propertyChange("id", this.id, newId);
id = newId;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java
index 4bf6bbe..ff3bebe 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java
@@ -150,7 +150,7 @@
}
public int getTotal() {
- return ((Integer)total.getValue()).intValue();
+ return (Integer) total.getValue();
}
public int getTotalFromRow(org.eclipse.persistence.sessions.Record row, Session session) {
@@ -187,7 +187,7 @@
protected void initialize() {
this.contacts2 = new Stack();
this.salesReps2 = new TestHashtable();
- this.total = new ValueHolder(Integer.valueOf(1));
+ this.total = new ValueHolder(1);
this.total2 = 0;
}
@@ -214,7 +214,7 @@
}
public void setTotal(int total) {
- this.total.setValue(Integer.valueOf(total));
+ this.total.setValue(total);
}
public String toString() {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/Player.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/Player.java
index 43cd90f..b96edc4 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/Player.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/transparentindirection/Player.java
@@ -27,7 +27,7 @@
}
public Integer getId() {
- return Integer.valueOf(Long.valueOf(m_id).intValue());
+ return Long.valueOf(m_id).intValue();
}
public Team getTeam() {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/EngineType.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/EngineType.java
index 81d6b57..45c5318 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/EngineType.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/EngineType.java
@@ -36,14 +36,14 @@
public static EngineType example1() {
EngineType example = new EngineType();
- example.setId(Integer.valueOf(1));
+ example.setId(1);
example.setType("Steel");
return example;
}
public static EngineType example2() {
EngineType example = new EngineType();
- example.setId(Integer.valueOf(2));
+ example.setId(2);
example.setType("AlumSteel");
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/FuelType.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/FuelType.java
index ff6d60c..46e10cf 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/FuelType.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/FuelType.java
@@ -43,14 +43,14 @@
public static FuelType example1() {
FuelType example = new FuelType();
- example.setFuelId(Integer.valueOf(1));
+ example.setFuelId(1);
example.setFuelDescription("Petrol");
return example;
}
public static FuelType example2() {
FuelType example = new FuelType();
- example.setFuelId(Integer.valueOf(2));
+ example.setFuelId(2);
example.setFuelDescription("Diesel");
return example;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/SportsCar.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/SportsCar.java
index 00f6568..eac2d76 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/SportsCar.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/models/vehicle/SportsCar.java
@@ -68,7 +68,7 @@
SportsCar example = new SportsCar();
example.setId(10);
- example.setFuelCapacity(Integer.valueOf(30));
+ example.setFuelCapacity(30);
example.setDescription("TOYOTA");
example.setFuelType(FuelType.example1());
example.setEngineType(EngineType.example1());
@@ -79,7 +79,7 @@
SportsCar example = new SportsCar();
example.setId(20);
- example.setFuelCapacity(Integer.valueOf(50));
+ example.setFuelCapacity(50);
example.setDescription("TATA INDICA");
example.setFuelType(FuelType.example2());
example.setEngineType(EngineType.example2());
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java
index c082053..44e919d 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java
@@ -51,7 +51,7 @@
House house2 = (House)houses.get(houses.size()-1);
house2.setDescriptions("do not buy it, it collapses -:)");
Oid newInsurancePolicyId = new Oid();
- newInsurancePolicyId.setOid(Integer.valueOf(893453));
+ newInsurancePolicyId.setOid(893453);
house2.setInsuranceId(newInsurancePolicyId);
House newHouse = new House();
newHouse.setLocation("123 Slater Street");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest.java
index 36ae0ad..3ae7bfb 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest.java
@@ -108,7 +108,7 @@
long currentTime = System.currentTimeMillis();
if (!fifoArray[i].isEmpty()) {
clientLastActionTimeArray[i] = currentTime;
- int objectNumber = ((Integer)fifoArray[i].removeHead()).intValue();
+ int objectNumber = (Integer) fifoArray[i].removeHead();
// System.out.println("Client# = " + i + " object# = " + objectNumber);
if ((objectNumber == numObjects) || (objectNumber == -1)) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java
index b96e935..51e6e65 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java
@@ -91,7 +91,7 @@
long currentTime = System.currentTimeMillis();
if (!fifoArray[i].isEmpty()) {
clientLastActionTimeArray[i] = currentTime;
- int objectNumber = ((Integer)fifoArray[i].removeHead()).intValue();
+ int objectNumber = (Integer) fifoArray[i].removeHead();
// System.out.println("Client# = " + i + " object# = " + objectNumber);
if (objectNumber == (numObjects / 2)) {
@@ -102,7 +102,7 @@
}
if (firstHalfDoneForAll) {
for (int j = 0; j < NUM_CLIENTS; j++) {
- fifoInArray[j].insertTail(Boolean.valueOf(true));
+ fifoInArray[j].insertTail(Boolean.TRUE);
}
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java
index 343b10e..41562d1 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java
@@ -48,7 +48,7 @@
uow.commit();
if (fifoOut != null) {
- fifoOut.insertTail(Integer.valueOf(i));
+ fifoOut.insertTail(i);
}
}
} catch (Exception e) {
@@ -64,7 +64,7 @@
this.server = null;
if (fifoOut != null) {
- fifoOut.insertTail(Integer.valueOf(-1));
+ fifoOut.insertTail(-1);
}
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java
index 0817cac..dd49c3f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java
@@ -43,7 +43,7 @@
((ClientSession)clientSession).getSequencing().getNextValue(SmallProject.class);
}
if (fifoOut != null) {
- fifoOut.insertTail(Integer.valueOf(i));
+ fifoOut.insertTail(i);
}
// System.out.println(getName() + " " + i);
@@ -81,7 +81,7 @@
this.server = null;
if (fifoOut != null) {
- fifoOut.insertTail(Integer.valueOf(-1));
+ fifoOut.insertTail(-1);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java
index 72b5327..a3ac868 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java
@@ -55,10 +55,10 @@
AggregateDirectMapHolder holder = new AggregateDirectMapHolder();
AggregateMapKey mapKey = new AggregateMapKey();
mapKey.setKey(1);
- holder.addAggregateToDirectMapItem(mapKey, Integer.valueOf(1));
+ holder.addAggregateToDirectMapItem(mapKey, 1);
AggregateMapKey mapKey2 = new AggregateMapKey();
mapKey2.setKey(2);
- holder.addAggregateToDirectMapItem(mapKey2, Integer.valueOf(2));
+ holder.addAggregateToDirectMapItem(mapKey2, 2);
uow.registerObject(holder);
uow.commit();
holderExp = (new ExpressionBuilder()).get("id").equal(holder.getId());
@@ -86,7 +86,7 @@
AggregateMapKey mapKey = new AggregateMapKey();
mapKey.setKey(1);
Integer value = (Integer)holder.getAggregateToDirectMap().get(mapKey);
- if (value.intValue() != 1){
+ if (value != 1){
throw new TestErrorException("Incorrect map value was read.");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java
index 11a464f..31270b4 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java
@@ -55,10 +55,10 @@
DirectAggregateMapHolder holder = new DirectAggregateMapHolder();
AggregateMapValue value = new AggregateMapValue();
value.setValue(1);
- holder.addDirectToAggregateMapItem(Integer.valueOf(1), value);
+ holder.addDirectToAggregateMapItem(1, value);
value = new AggregateMapValue();
value.setValue(2);
- holder.addDirectToAggregateMapItem(Integer.valueOf(2), value);
+ holder.addDirectToAggregateMapItem(2, value);
uow.registerObject(holder);
uow.commit();
holderExp = (new ExpressionBuilder()).get("id").equal(holder.getId());
@@ -83,7 +83,7 @@
if (holder.getDirectToAggregateMap().size() != 2){
throw new TestErrorException("Incorrect Number of Map values was read.");
}
- AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(Integer.valueOf(1));
+ AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(1);
if (value.getValue() != 1){
throw new TestErrorException("Incorrect map value was read.");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java
index 60ee614..d82c66a 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java
@@ -52,8 +52,8 @@
UnitOfWork uow = getSession().acquireUnitOfWork();
DirectDirectMapHolder holder = new DirectDirectMapHolder();
- holder.addDirectToDirectMapItem(Integer.valueOf(1), Integer.valueOf(1));
- holder.addDirectToDirectMapItem(Integer.valueOf(2), Integer.valueOf(2));
+ holder.addDirectToDirectMapItem(1, 1);
+ holder.addDirectToDirectMapItem(2, 2);
uow.registerObject(holder);
uow.commit();
holderExp = (new ExpressionBuilder()).get("id").equal(holder.getId());
@@ -79,7 +79,7 @@
throw new TestErrorException("Incorrect Number of Map values was read.");
}
Integer value = (Integer)holder.getDirectToDirectMap().get(1);
- if (value.intValue() != 1){
+ if (value != 1){
throw new TestErrorException("Incorrect map value was read.");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java
index 10eeb96..33fe2aa 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java
@@ -58,12 +58,12 @@
DEOTMMapValue value = new DEOTMMapValue();
value.setId(1);
value.getHolder().setValue(initialHolder);
- initialHolder.addDirectToEntityMapItem(Integer.valueOf(11), value);
+ initialHolder.addDirectToEntityMapItem(11, value);
DEOTMMapValue value2 = new DEOTMMapValue();
value2.setId(2);
value2.getHolder().setValue(initialHolder);
- initialHolder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
+ initialHolder.addDirectToEntityMapItem(22, value2);
uow.registerObject(initialHolder);
uow.registerObject(value);
uow.registerObject(value2);
@@ -90,7 +90,7 @@
if (holder.getDirectToEntityMap().size() != 2){
throw new TestErrorException("Incorrect Number of MapEntityValues was read.");
}
- DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(11));
+ DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(11);
if (value.getId() != 1){
throw new TestErrorException("Incorrect MapEntityValues was read.");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java
index f5130ed..0e5d346 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java
@@ -57,12 +57,12 @@
DirectEntityMapHolder holder = new DirectEntityMapHolder();
EntityMapValue value = new EntityMapValue();
value.setId(1);
- holder.addDirectToEntityMapItem(Integer.valueOf(11), value);
+ holder.addDirectToEntityMapItem(11, value);
EntityMapValue value2 = new EntityMapValue();
value2.setId(2);
- holder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
+ holder.addDirectToEntityMapItem(22, value2);
uow.registerObject(holder);
uow.registerObject(value);
uow.registerObject(value2);
@@ -90,7 +90,7 @@
if (holder.getDirectToEntityMap().size() != 2){
throw new TestErrorException("Incorrect Number of MapEntityValues was read.");
}
- EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(11));
+ EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(11);
if (value.getId() != 1){
throw new TestErrorException("Incorrect MapEntityValues was read.");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java
index 8bbacec..20d5188 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java
@@ -58,12 +58,12 @@
DirectEntityU1MMapHolder holder = new DirectEntityU1MMapHolder();
EntityMapValue value = new EntityMapValue();
value.setId(1);
- holder.addDirectToEntityMapItem(Integer.valueOf(11), value);
+ holder.addDirectToEntityMapItem(11, value);
EntityMapValue value2 = new EntityMapValue();
value2.setId(2);
- holder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
+ holder.addDirectToEntityMapItem(22, value2);
uow.registerObject(holder);
uow.registerObject(value);
uow.registerObject(value2);
@@ -91,7 +91,7 @@
if (holder.getDirectToEntityMap().size() != 2){
throw new TestErrorException("Incorrect Number of MapEntityValues was read.");
}
- EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(11));
+ EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(11);
if (value.getId() != 1){
throw new TestErrorException("Incorrect MapEntityValues was read.");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java
index 40c9a65..f5afdba 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java
@@ -58,12 +58,12 @@
mapKey.setId(1);
mapKey.setData("11");
uow.registerObject(mapKey);
- holder.addEntityDirectMapItem(mapKey, Integer.valueOf(1));
+ holder.addEntityDirectMapItem(mapKey, 1);
EntityMapKey mapKey2 = new EntityMapKey();
mapKey2.setId(2);
mapKey2.setData("22");
uow.registerObject(mapKey2);
- holder.addEntityDirectMapItem(mapKey2, Integer.valueOf(2));
+ holder.addEntityDirectMapItem(mapKey2, 2);
uow.registerObject(holder);
uow.commit();
@@ -92,7 +92,7 @@
EntityMapKey mapKey = new EntityMapKey();
mapKey.setId(1);
Integer value = (Integer)holder.getEntityToDirectMap().get(mapKey);
- if (value.intValue() != 1){
+ if (value != 1){
throw new TestErrorException("Incorrect map value was read.");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java
index bd8dcb5..fbfc0cc 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java
@@ -31,7 +31,7 @@
holder.removeAggregateToDirectMapItem(mapKey);
mapKey = new AggregateMapKey();
mapKey.setKey(3);
- holder.addAggregateToDirectMapItem(mapKey, Integer.valueOf(3));
+ holder.addAggregateToDirectMapItem(mapKey, 3);
uow.commit();
Object holderForComparison = uow.readObject(holder);
if (!compareObjects(holder, holderForComparison)){
@@ -57,7 +57,7 @@
mapKey = new AggregateMapKey();
mapKey.setKey(3);
Integer value = (Integer)holder.getAggregateToDirectMap().get(mapKey);
- if (value.intValue() != 3){
+ if (value != 3){
throw new TestErrorException("Item was not correctly added to map");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java
index 35e1dae..dc5b89f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java
@@ -28,10 +28,10 @@
UnitOfWork uow = getSession().acquireUnitOfWork();
holders = uow.readAllObjects(DirectAggregateMapHolder.class, holderExp);
changedHolder = (DirectAggregateMapHolder)holders.get(0);
- changedHolder.removeDirectToAggregateMapItem(Integer.valueOf(1));
+ changedHolder.removeDirectToAggregateMapItem(1);
AggregateMapValue mapValue = new AggregateMapValue();
mapValue.setValue(3);
- changedHolder.addDirectToAggregateMapItem(Integer.valueOf(3), mapValue);
+ changedHolder.addDirectToAggregateMapItem(3, mapValue);
uow.commit();
Object holderForComparison = uow.readObject(changedHolder);
if (!compareObjects(changedHolder, holderForComparison)){
@@ -48,10 +48,10 @@
if (!compareObjects(holder, changedHolder)){
throw new TestErrorException("Objects do not match reinitialize");
}
- if (holder.getDirectToAggregateMap().containsKey(Integer.valueOf(1))){
+ if (holder.getDirectToAggregateMap().containsKey(1)){
throw new TestErrorException("Item that was removed is still present in map.");
}
- AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(Integer.valueOf(3));
+ AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(3);
if (value.getValue() != 3){
throw new TestErrorException("Item was not correctly added to map");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java
index c5c8df9..ad29148 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java
@@ -27,8 +27,8 @@
UnitOfWork uow = getSession().acquireUnitOfWork();
holders = uow.readAllObjects(DirectDirectMapHolder.class, holderExp);
changedHolder = (DirectDirectMapHolder)holders.get(0);
- changedHolder.removeDirectToDirectMapItem(Integer.valueOf(1));
- changedHolder.addDirectToDirectMapItem(Integer.valueOf(3), Integer.valueOf(3));
+ changedHolder.removeDirectToDirectMapItem(1);
+ changedHolder.addDirectToDirectMapItem(3, 3);
uow.commit();
Object holderForComparison = uow.readObject(changedHolder);
if (!compareObjects(changedHolder, holderForComparison)){
@@ -45,11 +45,11 @@
if (!compareObjects(holder, changedHolder)){
throw new TestErrorException("Objects do not match reinitialize");
}
- if (holder.getDirectToDirectMap().containsKey(Integer.valueOf(1))){
+ if (holder.getDirectToDirectMap().containsKey(1)){
throw new TestErrorException("Item that was removed is still present in map.");
}
- Integer value = (Integer)holder.getDirectToDirectMap().get(Integer.valueOf(3));
- if (value.intValue() != 3){
+ Integer value = (Integer)holder.getDirectToDirectMap().get(3);
+ if (value != 3){
throw new TestErrorException("Item was not correctly added to map");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java
index 560e8fa..2159ce0 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java
@@ -54,12 +54,12 @@
UnitOfWork uow = getSession().acquireUnitOfWork();
holders = uow.readAllObjects(DirectEntity1MMapHolder.class, holderExp);
changedHolder = (DirectEntity1MMapHolder)holders.get(0);
- changedHolder.removeDirectToEntityMapItem(Integer.valueOf(11));
+ changedHolder.removeDirectToEntityMapItem(11);
DEOTMMapValue mapValue = new DEOTMMapValue();
mapValue.setId(3);
mapValue = (DEOTMMapValue)uow.registerObject(mapValue);
mapValue.getHolder().setValue(changedHolder);
- changedHolder.addDirectToEntityMapItem(Integer.valueOf(33), mapValue);
+ changedHolder.addDirectToEntityMapItem(33, mapValue);
uow.commit();
}
@@ -71,10 +71,10 @@
if (!compareObjects(holder, changedHolder)){
throw new TestErrorException("Objects do not match reinitialize");
}
- if (holder.getDirectToEntityMap().containsKey(Integer.valueOf(1))){
+ if (holder.getDirectToEntityMap().containsKey(1)){
throw new TestErrorException("Item that was removed is still present in map.");
}
- DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(33));
+ DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(33);
if (value.getId() != 3){
throw new TestErrorException("Item was not correctly added to map");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java
index c63eb50..535b519 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java
@@ -55,12 +55,12 @@
holder = new DirectEntityMapHolder();
EntityMapValue value = new EntityMapValue();
value.setId(1);
- holder.addDirectToEntityMapItem(Integer.valueOf(11), value);
+ holder.addDirectToEntityMapItem(11, value);
EntityMapValue value2 = new EntityMapValue();
value2.setId(2);
- holder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
+ holder.addDirectToEntityMapItem(22, value2);
uow.registerObject(holder);
uow.registerObject(value);
uow.registerObject(value2);
@@ -78,9 +78,9 @@
changedHolder = (DirectEntityMapHolder)uow.readObject(holder);
EntityMapValue value = new EntityMapValue();
value.setId(3);
- changedHolder.addDirectToEntityMapItem(Integer.valueOf(33), value);
+ changedHolder.addDirectToEntityMapItem(33, value);
- changedHolder.getDirectToEntityMap().remove(Integer.valueOf(11));
+ changedHolder.getDirectToEntityMap().remove(11);
uow.commit();
Object holderForComparison = uow.readObject(holder);
if (!compareObjects(changedHolder, holderForComparison)){
@@ -98,7 +98,7 @@
if (holder.getDirectToEntityMap().size() != 2){
throw new TestErrorException("Incorrect Number of MapEntityValues was read.");
}
- EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(33));
+ EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(33);
if (value.getId() != 3){
throw new TestErrorException("MapEntityValue was not added properly.");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java
index 6993335..cf7ab9d 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java
@@ -53,11 +53,11 @@
UnitOfWork uow = getSession().acquireUnitOfWork();
holders = uow.readAllObjects(DirectEntityU1MMapHolder.class, holderExp);
changedHolder = (DirectEntityU1MMapHolder)holders.get(0);
- changedHolder.removeDirectToEntityMapItem(Integer.valueOf(11));
+ changedHolder.removeDirectToEntityMapItem(11);
EntityMapValue mapValue = new EntityMapValue();
mapValue.setId(3);
mapValue = (EntityMapValue)uow.registerObject(mapValue);
- changedHolder.addDirectToEntityMapItem(Integer.valueOf(33), mapValue);
+ changedHolder.addDirectToEntityMapItem(33, mapValue);
uow.commit();
Object holderForComparison = uow.readObject(changedHolder);
if (!compareObjects(changedHolder, holderForComparison)){
@@ -73,10 +73,10 @@
if (!compareObjects(holder, changedHolder)){
throw new TestErrorException("Objects do not match reinitialize");
}
- if (holder.getDirectToEntityMap().containsKey(Integer.valueOf(1))){
+ if (holder.getDirectToEntityMap().containsKey(1)){
throw new TestErrorException("Item that was removed is still present in map.");
}
- EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(33));
+ EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(33);
if (value.getId() != 3){
throw new TestErrorException("Item was not correctly added to map");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java
index 0632021..1a01039 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java
@@ -63,7 +63,7 @@
mapKey.setId(3);
mapKey.setData("testData");
mapKey = (EntityMapKey)uow.registerObject(mapKey);
- changedHolder.addEntityDirectMapItem(mapKey, Integer.valueOf(3));
+ changedHolder.addEntityDirectMapItem(mapKey, 3);
uow.commit();
Object holderForComparison = uow.readObject(changedHolder);
if (!compareObjects(changedHolder, holderForComparison)){
@@ -87,7 +87,7 @@
mapKey = new EntityMapKey();
mapKey.setId(3);
Integer value = (Integer)holder.getEntityToDirectMap().get(mapKey);
- if (value.intValue() != 3){
+ if (value != 3){
throw new TestErrorException("Item was not correctly added to map");
}
if (keyMapping.isPrivateOwned()){
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java
index c0aade7..6c0c0b9 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java
@@ -166,22 +166,22 @@
suite.addTest(new ConvertObjectTest(new java.math.BigInteger("100"), ClassConstants.BIGDECIMAL));
suite.addTest(new ConvertObjectTest(new java.math.BigInteger("100"), ClassConstants.BIGINTEGER));
suite.addTest(new ConvertObjectTest(new String("100"), ClassConstants.BIGINTEGER));
- suite.addTest(new ConvertObjectTest(Integer.valueOf(100), ClassConstants.BIGINTEGER));
- suite.addTest(new ConvertObjectTest(Character.valueOf('1'), ClassConstants.BOOLEAN));
- suite.addTest(new ConvertObjectTest(Character.valueOf('t'), ClassConstants.BOOLEAN));
- suite.addTest(new ConvertObjectTest(Character.valueOf('0'), ClassConstants.BOOLEAN));
- suite.addTest(new ConvertObjectTest(Character.valueOf('f'), ClassConstants.BOOLEAN));
+ suite.addTest(new ConvertObjectTest(100, ClassConstants.BIGINTEGER));
+ suite.addTest(new ConvertObjectTest('1', ClassConstants.BOOLEAN));
+ suite.addTest(new ConvertObjectTest('t', ClassConstants.BOOLEAN));
+ suite.addTest(new ConvertObjectTest('0', ClassConstants.BOOLEAN));
+ suite.addTest(new ConvertObjectTest('f', ClassConstants.BOOLEAN));
suite.addTest(new ConvertObjectTest(Helper.buildHexStringFromBytes(new byte[] { 4 }), ClassConstants.PBYTE));
- suite.addTest(new ConvertObjectTest(Integer.valueOf(100), ClassConstants.CHAR));
+ suite.addTest(new ConvertObjectTest(100, ClassConstants.CHAR));
//suite.addTest(new ConvertObjectTest(new org.eclipse.persistence.internal.helper.Date(1), ClassConstants.SQLDATE));
suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.SQLDATE));
- suite.addTest(new ConvertObjectTest(Long.valueOf(100), ClassConstants.SQLDATE));
+ suite.addTest(new ConvertObjectTest(100L, ClassConstants.SQLDATE));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.LONG));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("false"), ClassConstants.LONG));
suite.addTest(new ConvertObjectTest(new String("1"), ClassConstants.NUMBER));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.NUMBER));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("false"), ClassConstants.NUMBER));
- suite.addTest(new ConvertObjectTest(Integer.valueOf(1), ClassConstants.SHORT));
+ suite.addTest(new ConvertObjectTest(1, ClassConstants.SHORT));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.SHORT));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("false"), ClassConstants.SHORT));
@@ -189,17 +189,17 @@
suite.addTest(new ConvertObjectTest(new String("12:00:00"), ClassConstants.TIME));
suite.addTest(new ConvertObjectTest(new java.util.Date(100), ClassConstants.TIME));
suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.TIME));
- suite.addTest(new ConvertObjectTest(Long.valueOf(100), ClassConstants.TIME));
+ suite.addTest(new ConvertObjectTest(100L, ClassConstants.TIME));
//suite.addTest(new ConvertObjectTest(new org.eclipse.persistence.internal.helper.Timestamp(100), ClassConstants.TIMESTAMP));
suite.addTest(new ConvertObjectTest(new String("12:00:00"), ClassConstants.TIMESTAMP));
suite.addTest(new ConvertObjectTest(new java.util.Date(100), ClassConstants.TIMESTAMP));
suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.TIMESTAMP));
suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.UTILDATE));
- suite.addTest(new ConvertObjectTest(Long.valueOf(100), ClassConstants.UTILDATE));
+ suite.addTest(new ConvertObjectTest(100L, ClassConstants.UTILDATE));
// test exception handling
- suite.addTest(new ConvertObjectTest(Character.valueOf('1'), ClassConstants.BIGDECIMAL, true));
- suite.addTest(new ConvertObjectTest(Character.valueOf('1'), ClassConstants.BIGINTEGER, true));
+ suite.addTest(new ConvertObjectTest('1', ClassConstants.BIGDECIMAL, true));
+ suite.addTest(new ConvertObjectTest('1', ClassConstants.BIGINTEGER, true));
suite.addTest(new ConvertObjectTest(new String("a"), ClassConstants.BIGINTEGER, true));
suite.addTest(new ConvertObjectTest(new java.sql.Date(1), ClassConstants.BOOLEAN, true));
suite.addTest(new ConvertObjectTest(new java.sql.Date(1), ClassConstants.BYTE, true));
@@ -221,7 +221,7 @@
suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.TIME, true));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.TIMESTAMP, true));
suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.UTILDATE, true));
- suite.addTest(new ConvertObjectTest(Integer.valueOf(1), ConversionManager.class, true));
+ suite.addTest(new ConvertObjectTest(1, ConversionManager.class, true));
suite.addTest(new ConvertByteCharArrayToStringTest());
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java
index 1c52596..1cf7b9e 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java
@@ -44,7 +44,7 @@
getSession().removeQuery("dblogin");
getSession().addQuery("dblogin", readQuery);
Vector args = new Vector(1);
- args.addElement(Integer.valueOf(1));
+ args.addElement(1);
try {
Vector vResult = (Vector)getSession().executeQuery("dblogin", args);
} catch (ClassCastException e) {
@@ -54,7 +54,7 @@
readQuery = new DataReadQuery();
call = new StoredProcedureCall();
call.setProcedureName("Select_Employee_using_Output");
- call.addNamedArgumentValue("ARG1", Integer.valueOf(1));
+ call.addNamedArgumentValue("ARG1", 1);
call.addNamedOutputArgument("VERSION", "VERSION", java.math.BigDecimal.class);
readQuery.setCall(call);
try {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java
index 9894cb6..3b829c7 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java
@@ -1097,7 +1097,7 @@
call.addNamedArgument("VERSION");
call.addNamedArgument("START_TIME");
call.addNamedArgument("END_TIME");
- call.addNamedInOutputArgumentValue("OUT_VERSION", Long.valueOf(0), "EMPLOYEE.VERSION", Long.class);
+ call.addNamedInOutputArgumentValue("OUT_VERSION", 0L, "EMPLOYEE.VERSION", Long.class);
insertQuery.setCall(call);
empDescriptor.getQueryManager().setInsertQuery(insertQuery);
@@ -1170,7 +1170,7 @@
// After this is fixed (m.b. in SQLAnywhere 11?) the order of the attributes should be returned to original
// (where it does NOT follow the order of sp parameters).
insertEmployeeCall.addNamedArgument("_VERSION", "VERSION");
- insertEmployeeCall.addNamedInOutputArgumentValue("_OUT_VERSION", Long.valueOf(0), "EMPLOYEE.VERSION", Long.class);
+ insertEmployeeCall.addNamedInOutputArgumentValue("_OUT_VERSION", 0L, "EMPLOYEE.VERSION", Long.class);
employeeDescriptor.getQueryManager().setInsertQuery(new InsertObjectQuery(insertEmployeeCall));
final StoredProcedureCall updateEmployeeCall = new StoredProcedureCall();
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java
index 98a8401..5900698 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java
@@ -80,7 +80,7 @@
spCall.setProcedureName("Select_Output_and_ResultSet");
spCall.addNamedArgument("ARG1", "argument");
if (useInOut) {
- spCall.addNamedInOutputArgumentValue("VERSION", Long.valueOf(0), "VERSION", java.math.BigDecimal.class);
+ spCall.addNamedInOutputArgumentValue("VERSION", 0L, "VERSION", java.math.BigDecimal.class);
} else {
spCall.addNamedOutputArgument("VERSION", "VERSION", BigDecimal.class);
}
@@ -95,9 +95,9 @@
getSession().removeQuery("dblogin");
getSession().addQuery("dblogin", readQuery);
Vector args = new Vector(2);
- args.addElement(Integer.valueOf(1));
+ args.addElement(1);
if (useCustomSQL && useInOut) {
- args.addElement(Long.valueOf(0));
+ args.addElement(0L);
}
try {
Vector vResult = (Vector)getSession().executeQuery("dblogin", args);
@@ -111,9 +111,9 @@
} else {
spCall = new StoredProcedureCall();
spCall.setProcedureName("Select_Output_and_ResultSet");
- spCall.addNamedArgumentValue("ARG1", Integer.valueOf(1));
+ spCall.addNamedArgumentValue("ARG1", 1);
if (useInOut) {
- spCall.addNamedInOutputArgumentValue("VERSION", Long.valueOf(0), "VERSION", java.math.BigDecimal.class);
+ spCall.addNamedInOutputArgumentValue("VERSION", 0L, "VERSION", java.math.BigDecimal.class);
} else {
spCall.addNamedOutputArgument("VERSION", "VERSION", BigDecimal.class);
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java
index 2a99d08..ec86e36 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java
@@ -38,7 +38,7 @@
Object result = null;
Vector results2, results3 = null;
Address originalAddress;
- Long policyHolderIdToUse = Long.valueOf(12345);
+ Long policyHolderIdToUse = 12345L;
boolean useCustomSQL;
public StoredProcedureObjectRelationalParameters() {
@@ -75,7 +75,7 @@
Vector args = new Vector();
args.addElement(policyHolderIdToUse);//ssn
args.addElement(null);//occupation
- args.addElement(Character.valueOf('M'));//sex
+ args.addElement('M');//sex
args.addElement("Chris");//firstName
args.addElement(null);//birthDate
args.addElement("Random");//lastName
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java
index b4cb670..d1df582 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java
@@ -43,7 +43,7 @@
@Override
public void test() {
- Integer id = Integer.valueOf(12);
+ Integer id = 12;
String name = "James";
StoredProcedureCall call = new StoredProcedureCall();
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java
index 7be801e..cdbd646 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java
@@ -55,7 +55,7 @@
query.addArgument("P_ID");
Vector args = new Vector(1);
- args.addElement(Integer.valueOf(id));
+ args.addElement(id);
row = (DatabaseRecord)((Vector)getSession().executeQuery(query, args)).firstElement();
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java
index fafcdd8..b14b434 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java
@@ -26,8 +26,8 @@
boolean useCustomSQL;
boolean useArgumentNames;
boolean shouldBindAllParameters;
- Integer in = Integer.valueOf(1);
- Integer inout = Integer.valueOf(2);
+ Integer in = 1;
+ Integer inout = 2;
static final int PROC = 0;
static final int FUNC = 1;
@@ -147,8 +147,8 @@
Number inoutExpected = in;
Number outExpected = inout;
- Integer inoutReturned = Integer.valueOf(((Number)row.get("P_INOUT")).intValue());
- Integer outReturned = Integer.valueOf(((Number)row.get("P_OUT")).intValue());
+ Integer inoutReturned = ((Number) row.get("P_INOUT")).intValue();
+ Integer outReturned = ((Number) row.get("P_OUT")).intValue();
if (!inoutExpected.equals(inoutReturned)) {
throw new TestErrorException("Invalid value P_INOUT = " + inoutReturned + "; should be " + inoutExpected);
@@ -158,7 +158,7 @@
}
if (mode == FUNC) {
- Integer result = Integer.valueOf(((Number)row.get("RESULT")).intValue());
+ Integer result = ((Number) row.get("RESULT")).intValue();
if (!result.equals(outReturned)) {
throw new TestErrorException("Invalid value RESULT = " + result + "; should be " + outReturned);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java
index 8f4b7d3..257d8ba 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java
@@ -57,12 +57,12 @@
// Create a directmapmapping with a few items in it
UnitOfWork uow = getSession().acquireUnitOfWork();
DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(new DirectMapMappings());
- maps1.directMap.put(Integer.valueOf(1), "guy");
- maps1.directMap.put(Integer.valueOf(2), "axemen");
+ maps1.directMap.put(1, "guy");
+ maps1.directMap.put(2, "axemen");
DirectMapMappings maps2 = (DirectMapMappings)uow.registerObject(new DirectMapMappings());
- maps2.directMap.put(Integer.valueOf(1), "steve");
- maps2.directMap.put(Integer.valueOf(2), "superman");
+ maps2.directMap.put(1, "steve");
+ maps2.directMap.put(2, "superman");
uow.commit();
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java
index b268e1d..6d756cb 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java
@@ -53,14 +53,14 @@
// Create a directmapmapping with a few items in it
UnitOfWork uow = getSession().acquireUnitOfWork();
DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(new DirectMapMappings());
- maps1.directMap.put(Integer.valueOf(1), "guy");
- maps1.directMap.put(Integer.valueOf(2), "axemen");
+ maps1.directMap.put(1, "guy");
+ maps1.directMap.put(2, "axemen");
uow.commit();
// Read the same directmapping back and delete an item from it
UnitOfWork uow2 = getSession().acquireUnitOfWork();
DirectMapMappings maps2 = (DirectMapMappings)uow2.readObject(DirectMapMappings.class);
- maps2.directMap.remove(Integer.valueOf(2));
+ maps2.directMap.remove(2);
uow2.commit();
// Clear the cache
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java
index 78e8a06..84b1a42 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java
@@ -54,9 +54,9 @@
// Create a hashmap with a null in it.
UnitOfWork uow = getSession().acquireUnitOfWork();
DirectMapMappings maps = (DirectMapMappings)uow.registerObject(new DirectMapMappings());
- maps.directHashMap.put(Integer.valueOf(1), "item1");
- maps.directHashMap.put(Integer.valueOf(2), "item2");
- maps.directHashMap.put(Integer.valueOf(3), null);
+ maps.directHashMap.put(1, "item1");
+ maps.directHashMap.put(2, "item2");
+ maps.directHashMap.put(3, null);
try {
uow.commit();
@@ -81,7 +81,7 @@
throw new TestErrorException("Incorrect amount of items in the hashmap.");
}
- if (queryResult.directHashMap.get(Integer.valueOf(3)) != null) {
+ if (queryResult.directHashMap.get(3) != null) {
throw new TestErrorException("The null value was not read back in correctly.");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java
index 46418f3..61962df 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java
@@ -48,8 +48,8 @@
// Create a directmapmapping with a few items in it
UnitOfWork uow = getSession().acquireUnitOfWork();
DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(new DirectMapMappings());
- maps1.indirectionDirectMap.put(Integer.valueOf(1), "guy");
- maps1.indirectionDirectMap.put(Integer.valueOf(2), "axemen");
+ maps1.indirectionDirectMap.put(1, "guy");
+ maps1.indirectionDirectMap.put(2, "axemen");
uow.commit();
getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java
index e8b3d3b..5e016b2 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java
@@ -38,8 +38,8 @@
// Create a directmapmapping with a few items in it
UnitOfWork uow = getSession().acquireUnitOfWork();
DirectMapMappings m1 = new DirectMapMappings();
- m1.blobDirectMap.put(Integer.valueOf(1), Integer.valueOf(1));
- m1.blobDirectMap.put(Integer.valueOf(2), Integer.valueOf(2));
+ m1.blobDirectMap.put(1, 1);
+ m1.blobDirectMap.put(2, 2);
DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(m1);
uow.commit();
@@ -50,7 +50,7 @@
getSession().getIdentityMapAccessor().initializeIdentityMaps();
UnitOfWork uow = getSession().acquireUnitOfWork();
DirectMapMappings maps = (DirectMapMappings)uow.readObject(DirectMapMappings.class);
- if (!maps.blobDirectMap.get(Integer.valueOf(1)).equals(Integer.valueOf(1))) {
+ if (!maps.blobDirectMap.get(1).equals(1)) {
throw new TestErrorException("The cloned direct map does not maintain the proper type when used with a SerializedObjectConverter.");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java
index aacda94..5382911 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java
@@ -51,14 +51,14 @@
// put a new value in, will now be in the cache
UnitOfWork uow1 = getSession().acquireUnitOfWork();
DirectMapMappings maps = (DirectMapMappings)uow1.registerObject(new DirectMapMappings());
- maps.directMap.put(Integer.valueOf(1), "bogus");
- maps.directMap.put(Integer.valueOf(3), "third");
+ maps.directMap.put(1, "bogus");
+ maps.directMap.put(3, "third");
uow1.commit();
UnitOfWork uow2 = getSession().acquireUnitOfWork();
DirectMapMappings mapsClone = (DirectMapMappings)uow2.registerObject(maps);
- mapsClone.directMap.put(Integer.valueOf(2), "axemen");
- mapsClone.directMap.put(Integer.valueOf(1), "guy");
+ mapsClone.directMap.put(2, "axemen");
+ mapsClone.directMap.put(1, "guy");
UnitOfWorkChangeSet changes = uow2.getCurrentChanges();
uow2.commit();
@@ -70,15 +70,15 @@
@Override
public void verify() throws Exception {
// Some checks to ensure it actually worked as expected
- if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(1))) {
+ if (!mapsQueryResult.directMap.containsKey(1)) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.get(Integer.valueOf(1)).equals("guy")) {
+ } else if (!mapsQueryResult.directMap.get(1).equals("guy")) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(2))) {
+ } else if (!mapsQueryResult.directMap.containsKey(2)) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.get(Integer.valueOf(2)).equals("axemen")) {
+ } else if (!mapsQueryResult.directMap.get(2).equals("axemen")) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(3))) {
+ } else if (!mapsQueryResult.directMap.containsKey(3)) {
throw new TestErrorException("Change set did not merge into cache properly");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java
index 7505ea4..77348b2 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java
@@ -49,14 +49,14 @@
// put a new value in, will now be in the cache
UnitOfWork uow1 = getSession().acquireUnitOfWork();
DirectMapMappings maps = (DirectMapMappings)uow1.registerObject(new DirectMapMappings());
- maps.directMap.put(Integer.valueOf(1), "bogus");
- maps.directMap.put(Integer.valueOf(3), "third");
+ maps.directMap.put(1, "bogus");
+ maps.directMap.put(3, "third");
uow1.commit();
UnitOfWork uow2 = getSession().acquireUnitOfWork();
DirectMapMappings mapsClone = (DirectMapMappings)uow2.registerObject(maps);
- mapsClone.directMap.put(Integer.valueOf(2), "axemen");
- mapsClone.directMap.put(Integer.valueOf(1), "guy");
+ mapsClone.directMap.put(2, "axemen");
+ mapsClone.directMap.put(1, "guy");
UnitOfWorkChangeSet changes = (UnitOfWorkChangeSet)uow2.getCurrentChanges();
uow2.release();
@@ -82,15 +82,15 @@
// Some checks to ensure it actually worked as expected
- if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(1))) {
+ if (!mapsQueryResult.directMap.containsKey(1)) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.get(Integer.valueOf(1)).equals("guy")) {
+ } else if (!mapsQueryResult.directMap.get(1).equals("guy")) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(2))) {
+ } else if (!mapsQueryResult.directMap.containsKey(2)) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.get(Integer.valueOf(2)).equals("axemen")) {
+ } else if (!mapsQueryResult.directMap.get(2).equals("axemen")) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(3))) {
+ } else if (!mapsQueryResult.directMap.containsKey(3)) {
throw new TestErrorException("Change set did not merge into cache properly");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java
index 01352d8..f35deb4 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java
@@ -47,14 +47,14 @@
// put a new value in, will now be in the cache
UnitOfWork uow1 = getSession().acquireUnitOfWork();
DirectMapMappings maps = (DirectMapMappings)uow1.registerObject(new DirectMapMappings());
- maps.indirectionDirectMap.put(Integer.valueOf(1), "bogus");
- maps.indirectionDirectMap.put(Integer.valueOf(3), "third");
+ maps.indirectionDirectMap.put(1, "bogus");
+ maps.indirectionDirectMap.put(3, "third");
uow1.commit();
UnitOfWork uow2 = getSession().acquireUnitOfWork();
DirectMapMappings mapsClone = (DirectMapMappings)uow2.registerObject(maps);
- mapsClone.indirectionDirectMap.put(Integer.valueOf(2), "axemen");
- mapsClone.indirectionDirectMap.put(Integer.valueOf(1), "guy");
+ mapsClone.indirectionDirectMap.put(2, "axemen");
+ mapsClone.indirectionDirectMap.put(1, "guy");
UnitOfWorkChangeSet changes = (UnitOfWorkChangeSet)uow2.getCurrentChanges();
@@ -74,15 +74,15 @@
// Some checks to ensure it actually worked as expected
- if (!mapsQueryResult.indirectionDirectMap.containsKey(Integer.valueOf(1))) {
+ if (!mapsQueryResult.indirectionDirectMap.containsKey(1)) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.indirectionDirectMap.get(Integer.valueOf(1)).equals("guy")) {
+ } else if (!mapsQueryResult.indirectionDirectMap.get(1).equals("guy")) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.indirectionDirectMap.containsKey(Integer.valueOf(2))) {
+ } else if (!mapsQueryResult.indirectionDirectMap.containsKey(2)) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.indirectionDirectMap.get(Integer.valueOf(2)).equals("axemen")) {
+ } else if (!mapsQueryResult.indirectionDirectMap.get(2).equals("axemen")) {
throw new TestErrorException("Change set did not merge into cache properly");
- } else if (!mapsQueryResult.indirectionDirectMap.containsKey(Integer.valueOf(3))) {
+ } else if (!mapsQueryResult.indirectionDirectMap.containsKey(3)) {
throw new TestErrorException("Change set did not merge into cache properly");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java
index bb173cd..b629885 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java
@@ -27,7 +27,7 @@
@Override
protected void modifyCollection(UnitOfWork uow, Object objectToModify) {
- ((DirectMapMappings)objectToModify).directMap.put(Integer.valueOf(11), newItemForCollection());
+ ((DirectMapMappings)objectToModify).directMap.put(11, newItemForCollection());
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java
index 01ae565..f896930 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java
@@ -36,7 +36,7 @@
public ChangeObjectNotSentTest() {
super();
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.DO_NOT_SEND_CHANGES);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java
index 0873b91..5e01584 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java
@@ -126,8 +126,8 @@
int cacheSyncType = descriptor.getCacheSynchronizationType();
Object newCacheSyncType = cacheSyncConfigValues.get(keyClass);
if (newCacheSyncType != null) {
- oldCacheSyncConfigValues.put(keyClass, Integer.valueOf(cacheSyncType));
- descriptor.setCacheSynchronizationType(((Integer)newCacheSyncType).intValue());
+ oldCacheSyncConfigValues.put(keyClass, cacheSyncType);
+ descriptor.setCacheSynchronizationType((Integer) newCacheSyncType);
}
}
}
@@ -150,7 +150,7 @@
while (keys.hasMoreElements()) {
Class keyClass = (Class)keys.nextElement();
ClassDescriptor descriptor = getSession().getDescriptor(keyClass);
- int newCacheSyncType = ((Integer)oldCacheSyncConfigValues.get(keyClass)).intValue();
+ int newCacheSyncType = (Integer) oldCacheSyncConfigValues.get(keyClass);
descriptor.setCacheSynchronizationType(newCacheSyncType);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java
index 1d45f73..7ffee65 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java
@@ -63,8 +63,8 @@
int cacheSyncType = descriptor.getCacheSynchronizationType();
Object newCacheSyncType = cacheSyncConfigValues.get(keyClass);
if (newCacheSyncType != null) {
- oldCacheSyncConfigValues.put(keyClass, Integer.valueOf(cacheSyncType));
- descriptor.setCacheSynchronizationType(((Integer)newCacheSyncType).intValue());
+ oldCacheSyncConfigValues.put(keyClass, cacheSyncType);
+ descriptor.setCacheSynchronizationType((Integer) newCacheSyncType);
}
}
}
@@ -95,7 +95,7 @@
while (keys.hasMoreElements()) {
Class keyClass = (Class)keys.nextElement();
ClassDescriptor descriptor = getSession().getDescriptor(keyClass);
- int newCacheSyncType = ((Integer)oldCacheSyncConfigValues.get(keyClass)).intValue();
+ int newCacheSyncType = (Integer) oldCacheSyncConfigValues.get(keyClass);
descriptor.setCacheSynchronizationType(newCacheSyncType);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java
index 4e23aa3..14f3583 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java
@@ -37,7 +37,7 @@
public DeleteObjectNotSentTest() {
super();
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.DO_NOT_SEND_CHANGES);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java
index ad7913c..d1fef85 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java
@@ -30,7 +30,7 @@
super();
setName("InvalidCacheSyncTypeTest(" + type + ")");
cacheSyncType = type;
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(type));
+ cacheSyncConfigValues.put(Employee.class, type);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java
index 68c83ff..bc4565d 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java
@@ -44,8 +44,8 @@
public InvalidateObjectWithMissingReferenceTest() {
super();
setName("InvalidateObjectWithMissingReferenceTest");
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES));
- cacheSyncConfigValues.put(Address.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.SEND_OBJECT_CHANGES);
+ cacheSyncConfigValues.put(Address.class, ClassDescriptor.DO_NOT_SEND_CHANGES);
}
@Override
@@ -59,7 +59,7 @@
while (keys.hasMoreElements()) {
Class keyClass = (Class)keys.nextElement();
ClassDescriptor descriptor = getSession().getDescriptor(keyClass);
- int newCacheSyncType = ((Integer)oldCacheSyncConfigValues.get(keyClass)).intValue();
+ int newCacheSyncType = (Integer) oldCacheSyncConfigValues.get(keyClass);
descriptor.setCacheSynchronizationType(newCacheSyncType);
}
}
@@ -76,8 +76,8 @@
int cacheSyncType = descriptor.getCacheSynchronizationType();
Object newCacheSyncType = cacheSyncConfigValues.get(keyClass);
if (newCacheSyncType != null) {
- oldCacheSyncConfigValues.put(keyClass, Integer.valueOf(cacheSyncType));
- descriptor.setCacheSynchronizationType(((Integer)newCacheSyncType).intValue());
+ oldCacheSyncConfigValues.put(keyClass, cacheSyncType);
+ descriptor.setCacheSynchronizationType((Integer) newCacheSyncType);
}
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java
index 3be5616..68c4691 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java
@@ -41,12 +41,12 @@
public MultipleCacheSyncTypeTest() {
super();
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
- cacheSyncConfigValues.put(Project.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
- cacheSyncConfigValues.put(SmallProject.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
- cacheSyncConfigValues.put(LargeProject.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
- cacheSyncConfigValues.put(Address.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
- cacheSyncConfigValues.put(PhoneNumber.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
+ cacheSyncConfigValues.put(Project.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
+ cacheSyncConfigValues.put(SmallProject.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
+ cacheSyncConfigValues.put(LargeProject.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
+ cacheSyncConfigValues.put(Address.class, ClassDescriptor.DO_NOT_SEND_CHANGES);
+ cacheSyncConfigValues.put(PhoneNumber.class, ClassDescriptor.SEND_OBJECT_CHANGES);
}
/**
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java
index c61536e..deba87f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java
@@ -29,8 +29,8 @@
public NewObjectWithOptimisticLockingTest(){
super();
- cacheSyncConfigValues.put(ListHolder.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES));
- cacheSyncConfigValues.put(ListItem.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES));
+ cacheSyncConfigValues.put(ListHolder.class, ClassDescriptor.SEND_OBJECT_CHANGES);
+ cacheSyncConfigValues.put(ListItem.class, ClassDescriptor.SEND_OBJECT_CHANGES);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java
index 4fd6b2e..ef382bd 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java
@@ -27,8 +27,8 @@
public OrderedListNewObjectTest(){
super();
- cacheSyncConfigValues.put(ListHolder.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
- cacheSyncConfigValues.put(ListItem.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
+ cacheSyncConfigValues.put(ListHolder.class, ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
+ cacheSyncConfigValues.put(ListItem.class, ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java
index 54db24d..0c991e6 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java
@@ -59,15 +59,15 @@
Employee employee = (Employee)manager.getObject(Employee.class, "0001");
Hashtable configurationHashtable = new Hashtable();
- configurationHashtable.put(Employee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
+ configurationHashtable.put(Employee.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
ConfigurableUpdateChangeObjectTest test = new ConfigurableUpdateChangeObjectTest(employee, configurationHashtable);
test.setName("Update Change Employee - Invalidate Employee");
test.setDescription("Test the invalidation setting on cache synchronization for Employee");
addTest(test);
configurationHashtable = new Hashtable();
- configurationHashtable.put(PhoneNumber.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
- configurationHashtable.put(Employee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
+ configurationHashtable.put(PhoneNumber.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
+ configurationHashtable.put(Employee.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
test = new ConfigurableUpdateChangeObjectTest(employee, configurationHashtable);
test.setName("Update Change Employee - Invalidate Employee, Phone Number");
test.setDescription("Test the invalidation setting on cache synchronization for Phone Number");
@@ -86,25 +86,25 @@
addTest(new IsolatedObjectNotSentTest());
configurationHashtable = new Hashtable();
- configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES));
+ configurationHashtable.put(IsolatedEmployee.class, ClassDescriptor.SEND_OBJECT_CHANGES);
IsolatedObjectNotSentTest atest = new IsolatedObjectNotSentTest(configurationHashtable);
atest.setName("IsolatedObjectNotSentTest - SEND_OBJECT_CHANGES");
addTest(atest);
configurationHashtable = new Hashtable();
- configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
+ configurationHashtable.put(IsolatedEmployee.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
atest = new IsolatedObjectNotSentTest(configurationHashtable);
atest.setName("IsolatedObjectNotSentTest - INVALIDATE_CHANGED_OBJECTS");
addTest(atest);
configurationHashtable = new Hashtable();
- configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
+ configurationHashtable.put(IsolatedEmployee.class, ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
atest = new IsolatedObjectNotSentTest(configurationHashtable);
atest.setName("IsolatedObjectNotSentTest - SEND_NEW_OBJECTS_WITH_CHANGES");
addTest(atest);
configurationHashtable = new Hashtable();
- configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
+ configurationHashtable.put(IsolatedEmployee.class, ClassDescriptor.DO_NOT_SEND_CHANGES);
atest = new IsolatedObjectNotSentTest(configurationHashtable);
atest.setName("IsolatedObjectNotSentTest - DO_NOT_SEND_CHANGES");
addTest(atest);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java
index fc14387..8cc6074 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java
@@ -32,7 +32,7 @@
protected Expression expression = null;
public RelatedNewObjectCacheSyncTest() {
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java
index 9537c65..93371de 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java
@@ -42,9 +42,9 @@
protected Expression expression = null;
public RelatedNewObjectNotSentTest() {
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
- cacheSyncConfigValues.put(Address.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
- cacheSyncConfigValues.put(SmallProject.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
+ cacheSyncConfigValues.put(Address.class, ClassDescriptor.DO_NOT_SEND_CHANGES);
+ cacheSyncConfigValues.put(SmallProject.class, ClassDescriptor.DO_NOT_SEND_CHANGES);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java
index fdd615d..dea080b 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java
@@ -39,10 +39,10 @@
this.shouldSendObject = shouldSendObject;
if (shouldSendObject) {
setName("SendNewObjectCacheSyncTest - SEND_NEW_OBJECTS_WITH_CHANGES");
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
} else {
setName("SendNewObjectCacheSyncTest - SEND_OBJECT_CHANGES");
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.SEND_OBJECT_CHANGES);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java
index e22bc5c..25c4e41 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java
@@ -35,7 +35,7 @@
public UpdateObjectInvalidationTest() {
super();
setDescription("Ensure a remote object is invalidated when its descriptor is set to INVALIDATE_CHANGED_OBJECTS");
- cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
+ cacheSyncConfigValues.put(Employee.class, ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java
index 24bcd02..4197167 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java
@@ -237,7 +237,7 @@
public void startCacheSynchronization(AbstractSession session, boolean isSource) {
try {
- sessions.put(session, Boolean.valueOf(isSource));
+ sessions.put(session, isSource);
if (sessions.size() == 1) {
createFactory();
startFactory();
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java
index eef1b48..2641af1 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java
@@ -80,7 +80,7 @@
0, simpleInstance.<Integer>get("id2").intValue());
assertFalse("value1 set on new instance", simpleInstance.isSet("value1"));
assertEquals("value2 not default value on new instance",
- false, simpleInstance.<Boolean>get("value2").booleanValue());
+ false, simpleInstance.<Boolean>get("value2"));
assertFalse("value3 set on new instance", simpleInstance.isSet("value3"));
assertFalse("value4 set on new instance", simpleInstance.isSet("value4"));
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java
index 3b5a28c..9d9c539 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java
@@ -109,7 +109,7 @@
DynamicEntity simpleInstance = find(dynamicHelper, session, 1);
assertNotNull("Could not find simple instance with id = 1", simpleInstance);
- simpleInstance = find(dynamicHelper, session, Integer.valueOf(1));
+ simpleInstance = find(dynamicHelper, session, 1);
assertNotNull("Could not find simple instance with id = Integer(1)", simpleInstance);
}
@@ -152,7 +152,7 @@
0, simpleInstance.<Integer>get("id").intValue());
assertFalse("value1 set on new instance", simpleInstance.isSet("value1"));
assertEquals("value2 not default value on new instance",
- false, simpleInstance.<Boolean>get("value2").booleanValue());
+ false, simpleInstance.<Boolean>get("value2"));
assertFalse("value3 set on new instance", simpleInstance.isSet("value3"));
assertFalse("value4 set on new instance", simpleInstance.isSet("value4"));
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java
index 3c1ed47..b87639b 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java
@@ -118,7 +118,7 @@
DynamicEntity simpleInstance = find(dynamicHelper, session, 1);
assertNotNull("Could not find simple instance with id = 1", simpleInstance);
- simpleInstance = find(dynamicHelper, session, Integer.valueOf(1));
+ simpleInstance = find(dynamicHelper, session, 1);
assertNotNull("Could not find simple instance with id = Integer(1)", simpleInstance);
}
@@ -161,7 +161,7 @@
0, simpleInstance.<Integer>get("id").intValue());
assertFalse("value1 set on new instance", simpleInstance.isSet("value1"));
assertEquals("value2 not default value on new instance",
- false, simpleInstance.<Boolean>get("value2").booleanValue());
+ false, simpleInstance.<Boolean>get("value2"));
assertEquals("value2 not default value", false, simpleInstance.get("value2"));
assertFalse("value3 set on new instance", simpleInstance.isSet("value3"));
assertFalse("value4 set on new instance", simpleInstance.isSet("value4"));
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java
index a986d2e..97a6a11 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java
@@ -36,7 +36,7 @@
@Override
public void preInsert(DescriptorEvent event) {
if (event.getQuery().getDescriptor() != null) {
- event.updateAttributeWithObject("salary", Integer.valueOf(callCount));
+ event.updateAttributeWithObject("salary", callCount);
++callCount;
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java
index c92a286..26f2c2c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java
@@ -62,7 +62,7 @@
//expression = expression.and((ExpressionMath.sign(builder.get("salary"))).greaterThan(0));
expression = expression.and((ExpressionMath.exp(ExpressionMath.min(builder.get("salary"), 5))).lessThan(1000000));
// Test sqrt.
- expression = expression.and(ExpressionMath.power(builder.get("salary"), Double.valueOf(0.5)).greaterThan(0));
+ expression = expression.and(ExpressionMath.power(builder.get("salary"), 0.5).greaterThan(0));
ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 0);
test.setExpression(expression);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java
index 957c9a1..a553afc 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java
@@ -27,7 +27,7 @@
}
public void _testEquals$nullTest() {
- ExpressionOperator operator = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Between));
+ ExpressionOperator operator = ExpressionOperator.getOperator(ExpressionOperator.Between);
ExpressionOperator operator2 = null;
if (operator.equals(operator2)) {
throw new TestErrorException("Equals() must handle null case.");
@@ -35,15 +35,15 @@
}
public void _testEquals$ObjectTest() {
- ExpressionOperator operator = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Between));
- Object operator2 = Integer.valueOf(5);
+ ExpressionOperator operator = ExpressionOperator.getOperator(ExpressionOperator.Between);
+ Object operator2 = 5;
if (operator.equals(operator2)) {
throw new TestErrorException("Equals() must handle other class case.");
}
}
public void _testEqualsTest() {
- ExpressionOperator operator = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Between));
+ ExpressionOperator operator = ExpressionOperator.getOperator(ExpressionOperator.Between);
ExpressionOperator operator2 = new ExpressionOperator(ExpressionOperator.Between, new Vector());
if (!operator.equals(operator2)) {
throw new TestErrorException("Equals() must do comparison by selector only.");
@@ -64,21 +64,21 @@
}
public void _testIsComparisonOperatorTest() {
- ExpressionOperator operator = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Between));
+ ExpressionOperator operator = ExpressionOperator.getOperator(ExpressionOperator.Between);
if (!operator.isComparisonOperator()) {
throw new TestErrorException("IsComparisonOperator() invalid.");
}
}
public void _testIsFunctionOperatorTest() {
- ExpressionOperator operator = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Not));
+ ExpressionOperator operator = ExpressionOperator.getOperator(ExpressionOperator.Not);
if (!operator.isFunctionOperator()) {
throw new TestErrorException("IsFunctionOperator() invalid.");
}
}
public void _testIsLogicalOperatorTest() {
- ExpressionOperator operator = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.And));
+ ExpressionOperator operator = ExpressionOperator.getOperator(ExpressionOperator.And);
if (!operator.isLogicalOperator()) {
throw new TestErrorException("IsLogicalOperator() invalid.");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java
index 7f8e48d..6d0487f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java
@@ -321,7 +321,7 @@
private void addBetweenTest2() {
ExpressionBuilder builder = new ExpressionBuilder();
- Expression expression = builder.get("salary").between(builder.get("manager").get("salary"), Integer.valueOf(500000));
+ Expression expression = builder.get("salary").between(builder.get("manager").get("salary"), 500000);
ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 5);
test.setExpression(expression);
@@ -417,7 +417,7 @@
ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 12);
test.setExpression(expression);
test.setQuery(query);
- test.getArguments().add(Integer.valueOf(1));
+ test.getArguments().add(1);
test.setName("ConstantEqualConstantTest");
test.setDescription("Test meaningless selection criteria like 1 == 1.");
@@ -1636,7 +1636,7 @@
test.setExpression(expression);
test.setQuery(query);
test.getArguments().add(null);
- test.getArguments().add(Integer.valueOf(1));
+ test.getArguments().add(1);
test.getArguments().add(new String("String"));
test.setName("ParameterIsNullTest");
test.setDescription("For bug 3107049 tests parameterExp.isNull.");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java
index 30cdc12..987f610 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java
@@ -317,7 +317,7 @@
// The following query will select all employees who will still have a salary under
// $50,000 after a 15% raise.
Vector arguments = new Vector();
- arguments.addElement(Integer.valueOf(15));
+ arguments.addElement(15);
ExpressionBuilder builder = new ExpressionBuilder();
Expression expression = builder.get("salary").getFunction(applyRaiseSelector, arguments).lessThan(50000);
@@ -912,7 +912,7 @@
protected void _addNotBetween$ObjectTest() {
ExpressionBuilder builder = new ExpressionBuilder();
- Expression expression = builder.get("salary").notBetween(builder.get("manager").get("salary"), Integer.valueOf(500000));
+ Expression expression = builder.get("salary").notBetween(builder.get("manager").get("salary"), 500000);
ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 3);
test.setExpression(expression);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java
index 2dedca8..5b60e95 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java
@@ -35,17 +35,17 @@
@Override
public void reset() {
if (origionalStatementCachingState != null) {
- this.getSession().getPlatform().setShouldCacheAllStatements(this.origionalStatementCachingState.booleanValue());
+ this.getSession().getPlatform().setShouldCacheAllStatements(this.origionalStatementCachingState);
}
if (origionalBindingState != null) {
- this.getSession().getPlatform().setShouldBindAllParameters(this.origionalBindingState.booleanValue());
+ this.getSession().getPlatform().setShouldBindAllParameters(this.origionalBindingState);
}
}
@Override
public void setup() {
- this.origionalBindingState = Boolean.valueOf(this.getSession().getPlatform().shouldBindAllParameters());
- this.origionalStatementCachingState = Boolean.valueOf(this.getSession().getPlatform().shouldCacheAllStatements());
+ this.origionalBindingState = this.getSession().getPlatform().shouldBindAllParameters();
+ this.origionalStatementCachingState = this.getSession().getPlatform().shouldCacheAllStatements();
this.getSession().getPlatform().setShouldBindAllParameters(false);
this.getSession().getPlatform().setShouldCacheAllStatements(false);
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/JDBCBatchUpdatesTestModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/JDBCBatchUpdatesTestModel.java
index 4f7fed7..64ab418 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/JDBCBatchUpdatesTestModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/JDBCBatchUpdatesTestModel.java
@@ -29,9 +29,9 @@
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
- wasBatchWriting = Boolean.valueOf(platform.usesBatchWriting());
- wasJDBCBatchWriting = Boolean.valueOf(platform.usesJDBCBatchWriting());
- wasParameterBinding = Boolean.valueOf(getSession().getLogin().shouldBindAllParameters());
+ wasBatchWriting = platform.usesBatchWriting();
+ wasJDBCBatchWriting = platform.usesJDBCBatchWriting();
+ wasParameterBinding = getSession().getLogin().shouldBindAllParameters();
try {
getSession().getLog().write("WARNING, some JDBC drivers may fail BatchUpdates.");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NativeModeCreatorTestModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NativeModeCreatorTestModel.java
index e4e0f42..ceba9c0 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NativeModeCreatorTestModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NativeModeCreatorTestModel.java
@@ -45,9 +45,9 @@
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
- usesNativeSQL = Boolean.valueOf(platform.usesNativeSQL());
+ usesNativeSQL = platform.usesNativeSQL();
defaultSequence = getSession().getLogin().getDefaultSequence();
- shouldBindAllParameters = Boolean.valueOf(platform.shouldBindAllParameters());
+ shouldBindAllParameters = platform.shouldBindAllParameters();
if (platform.isSybase() || platform.isSQLAnywhere() || platform.isOracle() || platform.isSQLServer() || platform.isInformix() ||
platform.isMySQL() || platform.isDB2() || platform.isTimesTen() || platform.isSymfoware()) {
@@ -149,7 +149,7 @@
platform.isMySQL() || platform.isDB2() || platform.isTimesTen() || platform.isSymfoware()) {
if (usesNativeSQL != null) {
- platform.setUsesNativeSQL(usesNativeSQL.booleanValue());
+ platform.setUsesNativeSQL(usesNativeSQL);
}
if (defaultSequence != null) {
getSession().getLogin().setDefaultSequence(defaultSequence);
@@ -157,7 +157,7 @@
}
}
if (shouldBindAllParameters != null) {
- platform.setShouldBindAllParameters(shouldBindAllParameters.booleanValue());
+ platform.setShouldBindAllParameters(shouldBindAllParameters);
}
if (qualifier != null) {
getSession().getLogin().setTableQualifier(qualifier);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NullValueTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NullValueTest.java
index d9eda3e..ff1d9ca 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NullValueTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/NullValueTest.java
@@ -41,7 +41,7 @@
saveDefaultNullValues = getSession().getLogin().getPlatform().getConversionManager().getDefaultNullValues();
getSession().getLogin().getPlatform().getConversionManager().setDefaultNullValues(new Hashtable());
getSession().getLogin().setDefaultNullValue(String.class, "null");
- getSession().getLogin().setDefaultNullValue(int.class, Integer.valueOf(-1));
+ getSession().getLogin().setDefaultNullValue(int.class, -1);
// Reinit mappings.
for (DatabaseMapping mapping : getSession().getDescriptor(Address.class).getMappings()) {
if (mapping.isDirectToFieldMapping()) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/OracleNativeSeqInitTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/OracleNativeSeqInitTest.java
index fd08497..bd5ba1e 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/OracleNativeSeqInitTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/OracleNativeSeqInitTest.java
@@ -135,9 +135,9 @@
lastSeqNumberOriginal = getSession().getNextSequenceNumberValue(Employee.class).intValue() - 1;
- usesBatchWritingOriginal = Boolean.valueOf(getSession().getPlatform().usesBatchWriting());
+ usesBatchWritingOriginal = getSession().getPlatform().usesBatchWriting();
- shouldCacheAllStatementsOriginal = Boolean.valueOf(getSession().getPlatform().shouldCacheAllStatements());
+ shouldCacheAllStatementsOriginal = getSession().getPlatform().shouldCacheAllStatements();
getDatabaseSession().getSequencingControl().initializePreallocated();
@@ -288,10 +288,10 @@
getSession().getPlatform().getSequence(getSession().getDescriptor(Employee.class).getSequenceNumberName()).setPreallocationSize(seqPreallocationSizeOriginal);
if (shouldCacheAllStatementsOriginal != null) {
- getSession().getPlatform().setShouldCacheAllStatements(shouldCacheAllStatementsOriginal.booleanValue());
+ getSession().getPlatform().setShouldCacheAllStatements(shouldCacheAllStatementsOriginal);
}
if (usesBatchWritingOriginal != null) {
- getSession().getPlatform().setUsesBatchWriting(usesBatchWritingOriginal.booleanValue());
+ getSession().getPlatform().setUsesBatchWriting(usesBatchWritingOriginal);
}
if ((usesNativeSequencingOriginal != null) && !usesNativeSequencingOriginal) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/ParameterizedBatchUpdatesTestModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/ParameterizedBatchUpdatesTestModel.java
index 0d403e0..653f983 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/ParameterizedBatchUpdatesTestModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/ParameterizedBatchUpdatesTestModel.java
@@ -28,10 +28,10 @@
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
- wasBatchWriting = Boolean.valueOf(platform.usesBatchWriting());
- wasJDBCBatchWriting = Boolean.valueOf(platform.usesJDBCBatchWriting());
- wasBinding = Boolean.valueOf(platform.shouldBindAllParameters());
- wasStatementCaching = Boolean.valueOf(platform.shouldCacheAllStatements());
+ wasBatchWriting = platform.usesBatchWriting();
+ wasJDBCBatchWriting = platform.usesJDBCBatchWriting();
+ wasBinding = platform.shouldBindAllParameters();
+ wasStatementCaching = platform.shouldCacheAllStatements();
try {
getSession().getLog().write("WARNING, some JDBC drivers may fail BatchUpdates.");
@@ -55,10 +55,10 @@
DatabasePlatform platform = getSession().getPlatform();
if (wasBinding != null) {
- platform.setShouldBindAllParameters(wasBinding.booleanValue());
+ platform.setShouldBindAllParameters(wasBinding);
}
if (wasStatementCaching != null) {
- platform.setShouldCacheAllStatements(wasStatementCaching.booleanValue());
+ platform.setShouldCacheAllStatements(wasStatementCaching);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/TopLinkBatchUpdatesTestModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/TopLinkBatchUpdatesTestModel.java
index 6e5dc5a..bc0cae0 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/TopLinkBatchUpdatesTestModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/feature/TopLinkBatchUpdatesTestModel.java
@@ -32,9 +32,9 @@
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
- wasBatchWriting = Boolean.valueOf(platform.usesBatchWriting());
- wasJDBCBatchWriting = Boolean.valueOf(platform.usesJDBCBatchWriting());
- wasParameterBinding = Boolean.valueOf(getSession().getLogin().shouldBindAllParameters());
+ wasBatchWriting = platform.usesBatchWriting();
+ wasJDBCBatchWriting = platform.usesJDBCBatchWriting();
+ wasParameterBinding = getSession().getLogin().shouldBindAllParameters();
try {
getSession().getLog().write("WARNING, some JDBC drivers may fail BatchUpdates.");
@@ -87,13 +87,13 @@
DatabasePlatform platform = getSession().getPlatform();
if (wasBatchWriting != null) {
- platform.setUsesBatchWriting(wasBatchWriting.booleanValue());
+ platform.setUsesBatchWriting(wasBatchWriting);
}
if (wasJDBCBatchWriting != null) {
- platform.setUsesJDBCBatchWriting(wasJDBCBatchWriting.booleanValue());
+ platform.setUsesJDBCBatchWriting(wasJDBCBatchWriting);
}
if (wasParameterBinding != null) {
- platform.setShouldBindAllParameters(wasParameterBinding.booleanValue());
+ platform.setShouldBindAllParameters(wasParameterBinding);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java
index 4b23eb7..5f70a3f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java
@@ -129,7 +129,7 @@
query.setAsOfClause(clause);
query.addArgument("TIME");
Vector arguments = new Vector();
- arguments.add(Long.valueOf(value));
+ arguments.add(value);
Vector employees = (Vector)getSession().executeQuery(query, arguments);
if (employees.size() != 0) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java
index eba3a51..b68d685 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java
@@ -61,12 +61,12 @@
int i = 0;
while (i < mappings) {
m = (DatabaseMapping)v.get(i);
- m.setWeight(Integer.valueOf(Integer.MAX_VALUE - 1));
+ m.setWeight(Integer.MAX_VALUE - 1);
i++;
}
m = d.getMappingForAttributeName("number02");
- m.setWeight(Integer.valueOf(Integer.MAX_VALUE));
+ m.setWeight(Integer.MAX_VALUE);
server.login();
server.serverSession.setLogLevel(getSession().getLogLevel());
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java
index 920f975..c24eaae 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java
@@ -42,9 +42,9 @@
employees.addElement(employee1);
employees.addElement(employee2);
primaryKey1 = new Vector();
- primaryKey1.addElement(Integer.valueOf(99));
+ primaryKey1.addElement(99);
primaryKey2 = new Vector();
- primaryKey2.addElement(Integer.valueOf(88));
+ primaryKey2.addElement(88);
primaryKeys.addElement(primaryKey1);
primaryKeys.addElement(primaryKey2);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java
index b578143..26a0865 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java
@@ -61,12 +61,12 @@
int i =0;
while (i<mappings){
m = (DatabaseMapping)v.get(i);
- m.setWeight(Integer.valueOf(Integer.MAX_VALUE-1));
+ m.setWeight(Integer.MAX_VALUE - 1);
i++;
}
m = d.getMappingForAttributeName("number02");
- m.setWeight(Integer.valueOf(Integer.MAX_VALUE));
+ m.setWeight(Integer.MAX_VALUE);
server.login();
server.serverSession.setLogLevel(getSession().getLogLevel());
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/BindingWithShallowInsertTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/BindingWithShallowInsertTest.java
index 89ff5b0..3f3e23e 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/BindingWithShallowInsertTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/BindingWithShallowInsertTest.java
@@ -55,7 +55,7 @@
// "NA" is the null value, so this will cause a null to be written
headProject.setName("NA");
headProject.setTitle("");
- headProject.setBudget(Integer.valueOf(-1));
+ headProject.setBudget(-1);
// adding the project to both mappings will cause a shallow insert because
// foreign keys will have to be updated on both tables
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/OverrideInheritedMappingTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/OverrideInheritedMappingTest.java
index 2a9ec01..e948dbe 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/OverrideInheritedMappingTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/OverrideInheritedMappingTest.java
@@ -75,7 +75,7 @@
//getAbstractSession().updateObject(this.theCar);
//Read the car and check that the field was set (override of inherited mapping worked)
Car carRead = (Car)getSession().readObject(Car.class, new ExpressionBuilder().get("id").equal(this.carID));
- if (carRead.fuelCapacity.intValue() != 200) {
+ if (carRead.fuelCapacity != 200) {
throw new TestErrorException("The inherited mapping was not overridden!");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/SingleInheritanceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/SingleInheritanceTest.java
index 672a509..d2d911c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/SingleInheritanceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/SingleInheritanceTest.java
@@ -73,7 +73,7 @@
//empty Vehicle's inheritance info
InheritancePolicy newInheritancePolicy = (InheritancePolicy)originalInheritancePolicy.clone();
- newInheritancePolicy.addClassIndicator(org.eclipse.persistence.testing.models.inheritance.Vehicle.class, Long.valueOf(8));
+ newInheritancePolicy.addClassIndicator(org.eclipse.persistence.testing.models.inheritance.Vehicle.class, 8L);
newInheritancePolicy.setChildDescriptors(new Vector());
newInheritancePolicy.setClassIndicatorMapping(new Hashtable(3));
vehicleDescriptor.setInheritancePolicy(newInheritancePolicy);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/TranslatedKeyInheritanceTestCase.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/TranslatedKeyInheritanceTestCase.java
index 7260c51..503c71b 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/TranslatedKeyInheritanceTestCase.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/TranslatedKeyInheritanceTestCase.java
@@ -36,8 +36,8 @@
// CREATE A GRASSHOPPER
GrassHopper grassHopper = new GrassHopper();
- grassHopper.setIn_numberOfLegs(Integer.valueOf(6));
- grassHopper.setGh_maximumJump(Integer.valueOf(100));
+ grassHopper.setIn_numberOfLegs(6);
+ grassHopper.setGh_maximumJump(100);
// ADD THE GRASSHOPPER TO THE DATABASE
UnitOfWork uow = getSession().acquireUnitOfWork();
@@ -56,7 +56,7 @@
// MODIFY THE GRASSHOPPER
UnitOfWork uow = getSession().acquireUnitOfWork();
GrassHopper tempGrassHopper = (GrassHopper)uow.registerObject(grassHopper);
- tempGrassHopper.setGh_maximumJump(Integer.valueOf(150));
+ tempGrassHopper.setGh_maximumJump(150);
uow.commit();
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/UnitOfWorkCommitResumeTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/UnitOfWorkCommitResumeTest.java
index b0535dc..4ec9c13 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/UnitOfWorkCommitResumeTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/inheritance/UnitOfWorkCommitResumeTest.java
@@ -87,7 +87,7 @@
// Change a vehicle
Vehicle aVehicle = (Vehicle)vehicles.lastElement();
- aVehicle.setPassengerCapacity(Integer.valueOf(15));
+ aVehicle.setPassengerCapacity(15);
// Add some vehicles
Car car = Car.example2();
@@ -113,7 +113,7 @@
// Change a vehicle
Vehicle aVehicle = (Vehicle)vehicles.firstElement();
- aVehicle.setPassengerCapacity(Integer.valueOf(15));
+ aVehicle.setPassengerCapacity(15);
// Add some vehicles
Car car = Car.example2();
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/DescriptorInitTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/DescriptorInitTest.java
index 18f5e85..d4a8087 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/DescriptorInitTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/DescriptorInitTest.java
@@ -54,11 +54,11 @@
String part1;
String part2;
- Character ch = Character.valueOf(className.charAt(className.length() - 2));
- if (ch.equals(Character.valueOf('0'))) { //Class100
+ Character ch = className.charAt(className.length() - 2);
+ if (ch.equals('0')) { //Class100
part1 = className.substring(6, className.length() - 3);
part2 = className.substring(className.length() - 3);
- } else if (Character.isDigit(ch.charValue())) { //Class##
+ } else if (Character.isDigit(ch)) { //Class##
part1 = className.substring(6, className.length() - 2);
part2 = className.substring(className.length() - 2);
} else { //Class#
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/VariableOneToOneInsertTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/VariableOneToOneInsertTest.java
index a4d2799..7ce3eb3 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/VariableOneToOneInsertTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/interfaces/VariableOneToOneInsertTest.java
@@ -30,11 +30,11 @@
this.company = new Company();
Company c = (Company)uow.registerObject(this.company);
c.setName("Company One");
- c.setId(Integer.valueOf(54));
+ c.setId(54);
Email email = new Email();
email.setAddress("@Blather.ca");
email.setHolder(c);
- email.setId(Integer.valueOf(45));
+ email.setId(45);
c.setContact(email);
c.email = email;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorTest.java
index 14ec5f6..90ccbc5 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorTest.java
@@ -118,7 +118,7 @@
theTest.setReferenceClass(Employee.class);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(50000), builder).greaterThan(ExpressionMath.add(builder.get("salary"), Integer.valueOf(1000)));
+ Expression whereClause = ExpressionBuilder.fromConstant(50000, builder).greaterThan(ExpressionMath.add(builder.get("salary"), Integer.valueOf(1000)));
theTest.setOriginalObjectExpression(whereClause);
return theTest;
@@ -160,7 +160,7 @@
theTest.setReferenceClass(Employee.class);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(50000), builder).greaterThan(ExpressionMath.subtract(builder.get("salary"), Integer.valueOf(1000)));
+ Expression whereClause = ExpressionBuilder.fromConstant(50000, builder).greaterThan(ExpressionMath.subtract(builder.get("salary"), Integer.valueOf(1000)));
theTest.setOriginalObjectExpression(whereClause);
return theTest;
@@ -202,7 +202,7 @@
theTest.setReferenceClass(Employee.class);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(100000), builder).greaterThan(ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2)));
+ Expression whereClause = ExpressionBuilder.fromConstant(100000, builder).greaterThan(ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2)));
theTest.setOriginalObjectExpression(whereClause);
return theTest;
@@ -244,7 +244,7 @@
theTest.setReferenceClass(Employee.class);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(20000), builder).greaterThan(ExpressionMath.divide(builder.get("salary"), Integer.valueOf(2)));
+ Expression whereClause = ExpressionBuilder.fromConstant(20000, builder).greaterThan(ExpressionMath.divide(builder.get("salary"), Integer.valueOf(2)));
theTest.setOriginalObjectExpression(whereClause);
return theTest;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorWithParameterTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorWithParameterTest.java
index ab20ddd..f46f86c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorWithParameterTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/BinaryOperatorWithParameterTest.java
@@ -142,7 +142,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(1000));
+ theTest.getArguments().addElement(1000);
return theTest;
}
@@ -167,7 +167,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(1000));
+ theTest.getArguments().addElement(1000);
return theTest;
}
@@ -181,7 +181,7 @@
theTest.getExpressionParameters().add(parameterName);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(50000), builder).greaterThan(ExpressionMath.add(builder.get("salary"), (builder.getParameter(parameterName))));
+ Expression whereClause = ExpressionBuilder.fromConstant(50000, builder).greaterThan(ExpressionMath.add(builder.get("salary"), (builder.getParameter(parameterName))));
theTest.setOriginalObjectExpression(whereClause);
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE 50000 > (emp.salary + ?1)";
@@ -192,7 +192,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(1000));
+ theTest.getArguments().addElement(1000);
return theTest;
}
@@ -217,7 +217,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(1000));
+ theTest.getArguments().addElement(1000);
return theTest;
}
@@ -242,7 +242,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(1000));
+ theTest.getArguments().addElement(1000);
return theTest;
}
@@ -256,7 +256,7 @@
theTest.getExpressionParameters().add(parameterName);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(50000), builder).greaterThan(ExpressionMath.subtract(builder.get("salary"), (builder.getParameter(parameterName))));
+ Expression whereClause = ExpressionBuilder.fromConstant(50000, builder).greaterThan(ExpressionMath.subtract(builder.get("salary"), (builder.getParameter(parameterName))));
theTest.setOriginalObjectExpression(whereClause);
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE 50000 > (emp.salary - ?1)";
@@ -267,7 +267,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(1000));
+ theTest.getArguments().addElement(1000);
return theTest;
}
@@ -292,7 +292,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
+ theTest.getArguments().addElement(2);
return theTest;
}
@@ -317,7 +317,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
+ theTest.getArguments().addElement(2);
return theTest;
}
@@ -331,7 +331,7 @@
theTest.getExpressionParameters().add(parameterName);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(100000), builder).greaterThan(ExpressionMath.multiply(builder.get("salary"), (builder.getParameter(parameterName))));
+ Expression whereClause = ExpressionBuilder.fromConstant(100000, builder).greaterThan(ExpressionMath.multiply(builder.get("salary"), (builder.getParameter(parameterName))));
theTest.setOriginalObjectExpression(whereClause);
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE 100000 > (emp.salary * ?1)";
@@ -342,7 +342,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
+ theTest.getArguments().addElement(2);
return theTest;
}
@@ -367,7 +367,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
+ theTest.getArguments().addElement(2);
return theTest;
}
@@ -392,7 +392,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
+ theTest.getArguments().addElement(2);
return theTest;
}
@@ -406,7 +406,7 @@
theTest.getExpressionParameters().add(parameterName);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionBuilder.fromConstant(Integer.valueOf(20000), builder).greaterThan(ExpressionMath.divide(builder.get("salary"), (builder.getParameter(parameterName))));
+ Expression whereClause = ExpressionBuilder.fromConstant(20000, builder).greaterThan(ExpressionMath.divide(builder.get("salary"), (builder.getParameter(parameterName))));
theTest.setOriginalObjectExpression(whereClause);
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE 20000 > (emp.salary / ?1)";
@@ -417,7 +417,7 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
+ theTest.getArguments().addElement(2);
return theTest;
}
@@ -433,7 +433,7 @@
theTest.getExpressionParameters().add(parameterNameForMultiply);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = ExpressionMath.subtract(ExpressionMath.add(builder.get("salary"), 10000), ExpressionMath.multiply(ExpressionMath.divide(ExpressionBuilder.fromConstant(Integer.valueOf(10000), builder), builder.getParameter(parameterNameForDivide)), builder.getParameter(parameterNameForMultiply))).greaterThanEqual(50000);
+ Expression whereClause = ExpressionMath.subtract(ExpressionMath.add(builder.get("salary"), 10000), ExpressionMath.multiply(ExpressionMath.divide(ExpressionBuilder.fromConstant(10000, builder), builder.getParameter(parameterNameForDivide)), builder.getParameter(parameterNameForMultiply))).greaterThanEqual(50000);
theTest.setOriginalObjectExpression(whereClause);
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE emp.salary + 10000 - 10000 / ?1 * ?2 >= 50000";
@@ -445,8 +445,8 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
- theTest.getArguments().addElement(Integer.valueOf(3));
+ theTest.getArguments().addElement(2);
+ theTest.getArguments().addElement(3);
return theTest;
}
@@ -474,8 +474,8 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
- theTest.getArguments().addElement(Integer.valueOf(3));
+ theTest.getArguments().addElement(2);
+ theTest.getArguments().addElement(3);
return theTest;
}
@@ -491,7 +491,7 @@
theTest.getExpressionParameters().add(parameterNameForMultiply);
ExpressionBuilder builder = new ExpressionBuilder();
- Expression whereClause = builder.get("salary").greaterThan(ExpressionMath.subtract(ExpressionMath.add(ExpressionBuilder.fromConstant(Integer.valueOf(50000), builder), 10000), ExpressionMath.divide(ExpressionBuilder.fromConstant(Integer.valueOf(10000), builder), ExpressionMath.multiply(builder.getParameter(parameterNameForMultiply), builder.getParameter(parameterNameForDivide)))));
+ Expression whereClause = builder.get("salary").greaterThan(ExpressionMath.subtract(ExpressionMath.add(ExpressionBuilder.fromConstant(50000, builder), 10000), ExpressionMath.divide(ExpressionBuilder.fromConstant(10000, builder), ExpressionMath.multiply(builder.getParameter(parameterNameForMultiply), builder.getParameter(parameterNameForDivide)))));
theTest.setOriginalObjectExpression(whereClause);
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE emp.salary > (50000 + 10000 - 10000 / (?1 * ?2))";
@@ -503,8 +503,8 @@
theTest.setArgumentNames(myArgumentNames);
theTest.setArguments(new Vector());
- theTest.getArguments().addElement(Integer.valueOf(2));
- theTest.getArguments().addElement(Integer.valueOf(5));
+ theTest.getArguments().addElement(2);
+ theTest.getArguments().addElement(5);
return theTest;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexReverseSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexReverseSqrtTest.java
index 91c1bfe..2753fc7 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexReverseSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexReverseSqrtTest.java
@@ -24,8 +24,8 @@
Employee emp2 = (Employee)getTestEmployees().lastElement();
String ejbqlString;
- double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue()));
- double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue()));
+ double salarySquareRoot1 = Math.sqrt(((double) emp1.getSalary()));
+ double salarySquareRoot2 = Math.sqrt(((double) emp2.getSalary()));
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
ejbqlString = ejbqlString + salarySquareRoot1;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexSqrtTest.java
index e2f8cf3..2c8f94a 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/ComplexSqrtTest.java
@@ -24,8 +24,8 @@
Employee emp2 = (Employee)getTestEmployees().lastElement();
String ejbqlString;
- double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue()));
- double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue()));
+ double salarySquareRoot1 = Math.sqrt(((double) emp1.getSalary()));
+ double salarySquareRoot2 = Math.sqrt(((double) emp2.getSalary()));
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
ejbqlString = ejbqlString + "(SQRT(emp.salary) = ";
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexReverseSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexReverseSqrtTest.java
index 26a6a5f..9427935 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexReverseSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexReverseSqrtTest.java
@@ -24,8 +24,8 @@
Employee emp2 = (Employee)getTestEmployees().lastElement();
String ejbqlString;
- double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue()));
- double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue()));
+ double salarySquareRoot1 = Math.sqrt(((double) emp1.getSalary()));
+ double salarySquareRoot2 = Math.sqrt(((double) emp2.getSalary()));
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
ejbqlString = ejbqlString + salarySquareRoot1;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexSqrtTest.java
index 8a25620..a3396ee 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectComplexSqrtTest.java
@@ -24,8 +24,8 @@
Employee emp2 = (Employee)getTestEmployees().lastElement();
String ejbqlString;
- double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue()));
- double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue()));
+ double salarySquareRoot1 = Math.sqrt(((double) emp1.getSalary()));
+ double salarySquareRoot2 = Math.sqrt(((double) emp2.getSalary()));
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
ejbqlString = ejbqlString + "(SQRT(emp.salary) = ";
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleReverseSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleReverseSqrtTest.java
index 3206dd8..a0009d8 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleReverseSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleReverseSqrtTest.java
@@ -22,7 +22,7 @@
setTestEmployees(getExtraEmployees());
Employee emp = (Employee)getTestEmployees().firstElement();
- double salarySquareRoot = Math.sqrt((Double.valueOf(emp.getSalary()).doubleValue()));
+ double salarySquareRoot = Math.sqrt(((double) emp.getSalary()));
String ejbqlString;
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleSqrtTest.java
index fa8190c..35c7271 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SelectSimpleSqrtTest.java
@@ -22,7 +22,7 @@
setTestEmployees(getExtraEmployees());
Employee emp = (Employee)getTestEmployees().firstElement();
- double salarySquareRoot = Math.sqrt((Double.valueOf(emp.getSalary()).doubleValue()));
+ double salarySquareRoot = Math.sqrt(((double) emp.getSalary()));
String ejbqlString;
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleReverseSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleReverseSqrtTest.java
index 608e33b..d49b922 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleReverseSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleReverseSqrtTest.java
@@ -22,7 +22,7 @@
setTestEmployees(getExtraEmployees());
Employee emp = (Employee)getTestEmployees().firstElement();
- double salarySquareRoot = Math.sqrt((Double.valueOf(emp.getSalary()).doubleValue()));
+ double salarySquareRoot = Math.sqrt(((double) emp.getSalary()));
String ejbqlString;
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleSqrtTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleSqrtTest.java
index 602cf21..fa492bf 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleSqrtTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/jpql/SimpleSqrtTest.java
@@ -22,7 +22,7 @@
setTestEmployees(getExtraEmployees());
Employee emp = (Employee)getTestEmployees().firstElement();
- double salarySquareRoot = Math.sqrt((Double.valueOf(emp.getSalary()).doubleValue()));
+ double salarySquareRoot = Math.sqrt(((double) emp.getSalary()));
String ejbqlString;
ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/SameNamePKTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/SameNamePKTest.java
index a91e1fa..fe11780 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/SameNamePKTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/SameNamePKTest.java
@@ -45,7 +45,7 @@
SecureSystem system = new SecureSystem();
system.setManufacturer("Secure Systems Inc.");
Identification identification = new Identification();
- identification.setId(Long.valueOf(1));
+ identification.setId(1L);
system.setId(identification);
UnitOfWork uow = getSession().acquireUnitOfWork();
uow.registerObject(system);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/UnitOfWorkCommitResumeTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/UnitOfWorkCommitResumeTest.java
index 822eb06..e6d6604 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/UnitOfWorkCommitResumeTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/mapping/UnitOfWorkCommitResumeTest.java
@@ -104,7 +104,7 @@
//employee.computer = Computer.example1(employee) ;
// ObjectTypeMapping - Computer.isMacintosh
Computer aComputer = (Computer)employee.getComputer();
- if (aComputer.isMacintosh.booleanValue()) {
+ if (aComputer.isMacintosh) {
aComputer.notMacintosh();
} else {
aComputer.isMacintosh();
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/optimization/queryandsqlcounting/ParameterBatchWritingFlushQueryTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/optimization/queryandsqlcounting/ParameterBatchWritingFlushQueryTest.java
index bc2ffd9..398bfaf 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/optimization/queryandsqlcounting/ParameterBatchWritingFlushQueryTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/optimization/queryandsqlcounting/ParameterBatchWritingFlushQueryTest.java
@@ -34,7 +34,7 @@
public void setup() {
super.setup();
DatabasePlatform platform = getSession().getPlatform();
- usesBindAllParameters = Boolean.valueOf(platform.shouldBindAllParameters());
+ usesBindAllParameters = platform.shouldBindAllParameters();
platform.setShouldBindAllParameters(true);
platform.setUsesJDBCBatchWriting(true);
}
@@ -43,7 +43,7 @@
public void reset() {
if (usesBindAllParameters != null) {
DatabasePlatform platform = getSession().getPlatform();
- platform.setShouldBindAllParameters(usesBindAllParameters.booleanValue());
+ platform.setShouldBindAllParameters(usesBindAllParameters);
}
super.reset();
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapGetConcurrentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapGetConcurrentTest.java
index cd6a989..a8b7e1c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapGetConcurrentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapGetConcurrentTest.java
@@ -27,7 +27,7 @@
public ConcurrentHashMapGetConcurrentTest() {
setDescription("Measure the concurrency of ConcurrentHashMap.");
for (int index = 0; index < 100; index ++) {
- this.keys[index] = Integer.valueOf(index);
+ this.keys[index] = index;
}
}
@@ -36,7 +36,7 @@
super.setup();
map = new ConcurrentHashMap(100);
for (int index = 0; index < 100; index++) {
- map.put(Integer.valueOf(index), Integer.valueOf(index));
+ map.put(index, index);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapPutConcurrentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapPutConcurrentTest.java
index 5c30bf3..ee79808 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapPutConcurrentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ConcurrentHashMapPutConcurrentTest.java
@@ -27,7 +27,7 @@
public ConcurrentHashMapPutConcurrentTest() {
setDescription("Measure the concurrency of ConcurrentHashMap.");
for (int index = 0; index < 100; index ++) {
- this.keys[index] = Integer.valueOf(index);
+ this.keys[index] = index;
}
}
@@ -36,7 +36,7 @@
super.setup();
map = new ConcurrentHashMap(100);
for (int index = 0; index < 100; index++) {
- map.put(Integer.valueOf(index), Integer.valueOf(index));
+ map.put(index, index);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/DoPrivilegedTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/DoPrivilegedTest.java
index fccfec2..5271c5c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/DoPrivilegedTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/DoPrivilegedTest.java
@@ -159,7 +159,7 @@
Field[] fields = AccessController.doPrivileged(new PrivilegedGetFields(clazz));
Field field = AccessController.doPrivileged(new PrivilegedGetDeclaredField(clazz, fieldName, true));
try {
- int intValueFromField = ((Integer)AccessController.doPrivileged(new PrivilegedGetValueFromField(field, version))).intValue();
+ int intValueFromField = (Integer) AccessController.doPrivileged(new PrivilegedGetValueFromField(field, version));
} catch (Exception e) {
}
AccessController.doPrivileged(new PrivilegedGetValueFromField(field, version));
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapGetConcurrentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapGetConcurrentTest.java
index 0f93d46..b5ea9cf 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapGetConcurrentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapGetConcurrentTest.java
@@ -27,7 +27,7 @@
public HashMapGetConcurrentTest() {
setDescription("Measure the concurrency of HashMap.");
for (int index = 0; index < 100; index ++) {
- this.keys[index] = Integer.valueOf(index);
+ this.keys[index] = index;
}
}
@@ -36,7 +36,7 @@
super.setup();
map = new HashMap(100);
for (int index = 0; index < 100; index++) {
- map.put(Integer.valueOf(index), Integer.valueOf(index));
+ map.put(index, index);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapPutConcurrentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapPutConcurrentTest.java
index 47efe45..3ffd055 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapPutConcurrentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashMapPutConcurrentTest.java
@@ -27,7 +27,7 @@
public HashMapPutConcurrentTest() {
setDescription("Measure the concurrency of HashMap.");
for (int index = 0; index < 100; index ++) {
- this.keys[index] = Integer.valueOf(index);
+ this.keys[index] = index;
}
}
@@ -36,7 +36,7 @@
super.setup();
map = new HashMap(100);
for (int index = 0; index < 100; index++) {
- map.put(Integer.valueOf(index), Integer.valueOf(index));
+ map.put(index, index);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtableGetConcurrentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtableGetConcurrentTest.java
index a8837e7..2104e08 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtableGetConcurrentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtableGetConcurrentTest.java
@@ -27,7 +27,7 @@
public HashtableGetConcurrentTest() {
setDescription("Measure the concurrency of Hashtable.");
for (int index = 0; index < 100; index ++) {
- this.keys[index] = Integer.valueOf(index);
+ this.keys[index] = index;
}
}
@@ -36,7 +36,7 @@
super.setup();
map = new Hashtable(100);
for (int index = 0; index < 100; index++) {
- map.put(Integer.valueOf(index), Integer.valueOf(index));
+ map.put(index, index);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtablePutConcurrentTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtablePutConcurrentTest.java
index d191583..66e3300 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtablePutConcurrentTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/HashtablePutConcurrentTest.java
@@ -27,7 +27,7 @@
public HashtablePutConcurrentTest() {
setDescription("Measure the concurrency of Hashtable.");
for (int index = 0; index < 100; index ++) {
- this.keys[index] = Integer.valueOf(index);
+ this.keys[index] = index;
}
}
@@ -36,7 +36,7 @@
super.setup();
map = new Hashtable(100);
for (int index = 0; index < 100; index++) {
- map.put(Integer.valueOf(index), Integer.valueOf(index));
+ map.put(index, index);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ListTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ListTest.java
index 2fb6bf1..b0cf020 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ListTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/performance/java/ListTest.java
@@ -38,7 +38,7 @@
public void test() throws Exception {
Vector vector = new Vector(10);
for (int index = 0; index < size; index++) {
- vector.add(Integer.valueOf(index));
+ vector.add(index);
}
for (int index = 0; index < size; index++) {
Object result = vector.get(index);
@@ -54,7 +54,7 @@
public void test() {
List list = new ArrayList(10);
for (int index = 0; index < size; index++) {
- list.add(Integer.valueOf(index));
+ list.add(index);
}
for (int index = 0; index < size; index++) {
Object result = list.get(index);
@@ -75,7 +75,7 @@
public void test() {
List list = new LinkedList();
for (int index = 0; index < size; index++) {
- list.add(Integer.valueOf(index));
+ list.add(index);
}
for (int index = 0; index < size; index++) {
Object result = list.get(index);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/plsql/PLSQLTestModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/plsql/PLSQLTestModel.java
index 0bb6eb8..ed64dcc 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/plsql/PLSQLTestModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/plsql/PLSQLTestModel.java
@@ -94,32 +94,32 @@
List args = new ArrayList();
args.add("varchar");
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(123));
+ args.add(1);
+ args.add(123);
args.add(new BigDecimal("123.6"));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
args.add(new BigDecimal("123.5"));
PLSQLTest test = new PLSQLTest("SimpleIn", Address.class, args);
test.setName("SimpleInTest");
suite.addTest(test);
args = new ArrayList();
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(123));
+ args.add(1);
+ args.add(123);
args.add(new BigDecimal("123.6"));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
args.add(new BigDecimal("123.5"));
test = new PLSQLTest("SimpleInDefaults", Address.class, args);
test.setName("SimpleInDefaults");
@@ -149,16 +149,16 @@
args = new ArrayList();
args.add("varchar");
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(123));
+ args.add(1);
+ args.add(123);
args.add(new BigDecimal("123.6"));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
args.add(new BigDecimal("123.5"));
test = new PLSQLTest("SimpleInOut", Address.class, args);
test.setName("SimpleInOutTest");
@@ -174,16 +174,16 @@
List args = new ArrayList();
args.add("varchar");
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(123));
+ args.add(1);
+ args.add(123);
args.add(new BigDecimal("123.6"));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
- args.add(Integer.valueOf(1));
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
+ args.add(1);
args.add(new BigDecimal("123.5"));
PLSQLTest test = new PLSQLTest("SimpleInFunc", Address.class, args);
test.setName("SimpleInFuncTest");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/PredefinedInQueryReadAllTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/PredefinedInQueryReadAllTest.java
index cade273..b9d6f3e 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/PredefinedInQueryReadAllTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/PredefinedInQueryReadAllTest.java
@@ -46,9 +46,9 @@
@Override
protected void test() {
Vector sals = new Vector();
- sals.addElement(Integer.valueOf(100));
- sals.addElement(Integer.valueOf(56232));
- sals.addElement(Integer.valueOf(10000));
+ sals.addElement(100);
+ sals.addElement(56232);
+ sals.addElement(10000);
Vector args = new Vector();
args.addElement(sals);
@@ -58,9 +58,9 @@
// Also execute the query using a collection type other than vector.
Collection collection = new HashSet();
- collection.add(Integer.valueOf(100));
- collection.add(Integer.valueOf(56232));
- collection.add(Integer.valueOf(10000));
+ collection.add(100);
+ collection.add(56232);
+ collection.add(10000);
args = new Vector();
args.addElement(collection);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryExpressionMathTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryExpressionMathTest.java
index 89dcd8f..f7e4d57 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryExpressionMathTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryExpressionMathTest.java
@@ -55,7 +55,7 @@
ExpressionBuilder eb = new ExpressionBuilder();
UpdateAllQuery updateQuery = new UpdateAllQuery(org.eclipse.persistence.testing.models.insurance.Claim.class);
updateQuery.setSelectionCriteria(eb.get("amount").greaterThan(1000));
- updateQuery.addUpdate(eb.get("amount"), ExpressionMath.multiply(eb.get("amount"), Double.valueOf(1.10)));
+ updateQuery.addUpdate(eb.get("amount"), ExpressionMath.multiply(eb.get("amount"), 1.10));
m_session.executeQuery(updateQuery);
}
@@ -71,12 +71,12 @@
Float original = (Float)m_originalClaims.get(id);
Float updated = (Float)m_updatedClaims.get(id);
- if (original.compareTo(Float.valueOf(1001)) < 0) {// Ensure it was not updated
+ if (original.compareTo(1001F) < 0) {// Ensure it was not updated
if (updated.compareTo(original) != 0) {
throw new TestErrorException("Claim amount was updated when it shouldn't have been");
}
} else {// Ensure it was properly updated
- if (updated.compareTo(Float.valueOf(original.floatValue() * 1.10f)) != 0) {
+ if (updated.compareTo(original * 1.10f) != 0) {
throw new TestErrorException("Claim amount (" + original + ") was NOT properly updated. Value = " + updated);
}
}
@@ -90,7 +90,7 @@
while (e.hasMoreElements()) {
Claim claim = (Claim)e.nextElement();
- claimsToReturn.put(Long.valueOf(claim.getId()), Float.valueOf(claim.getAmount()));
+ claimsToReturn.put(claim.getId(), claim.getAmount());
}
return claimsToReturn;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryRollbackTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryRollbackTest.java
index fd23531..2ef0046 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryRollbackTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/UpdateAllQueryRollbackTest.java
@@ -58,7 +58,7 @@
m_uow.executeQuery(uaq1);
UpdateAllQuery uaq2 = new UpdateAllQuery(Employee.class);
- uaq2.addUpdate(eb.getField("BAD"), Integer.valueOf(10000));
+ uaq2.addUpdate(eb.getField("BAD"), 10000);
m_uow.executeQuery(uaq2);
try {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/inmemory/CacheHitAndInMemoryTestSuite.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/inmemory/CacheHitAndInMemoryTestSuite.java
index 28c11d5..16c1b6f 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/inmemory/CacheHitAndInMemoryTestSuite.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/inmemory/CacheHitAndInMemoryTestSuite.java
@@ -42,7 +42,7 @@
addTest(new CacheHitTest(manager.getObject(Shipment.class, "example1")));
Order order = (Order)((Shipment)org.eclipse.persistence.testing.models.legacy.Employee.example1().shipments.elementAt(0)).orders.elementAt(0);
- order.shipment.shipmentNumber = Integer.valueOf(order.shipment.shipmentNumber.intValue());
+ order.shipment.shipmentNumber = order.shipment.shipmentNumber.intValue();
addTest(new CacheHitTest(order));
org.eclipse.persistence.testing.models.legacy.Employee employee = (org.eclipse.persistence.testing.models.legacy.Employee)manager.getObject(org.eclipse.persistence.testing.models.legacy.Employee.class, "example1");
@@ -139,7 +139,7 @@
builder = new ExpressionBuilder();
Vector ids = new Vector();
- ids.addElement(Long.valueOf(123456789));
+ ids.addElement(123456789L);
ids.addElement(example.getId());
query = new ReadObjectQuery(Employee.class, builder.get("id").in(ids));
test = new InMemoryCacheHitTest(query);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/ParallelBuilderReportItemTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/ParallelBuilderReportItemTest.java
index 1f30a58..9ed3fcc 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/ParallelBuilderReportItemTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/ParallelBuilderReportItemTest.java
@@ -57,8 +57,8 @@
result[3] = wife.getLastName();
result[4] = husband.getGender();
result[5] = wife.getGender();
- result[6] = Integer.valueOf(husband.getSalary());
- result[7] = Integer.valueOf(wife.getSalary());
+ result[6] = husband.getSalary();
+ result[7] = wife.getSalary();
addResult(result, null);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_2.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_2.java
index 29db324..dfc3e16 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_2.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_2.java
@@ -39,7 +39,7 @@
Object[] result = new Object[3];
result[0] = emp.getFirstName();
result[1] = emp.getLastName();
- result[2] = Integer.valueOf(emp.getSalary());
+ result[2] = emp.getSalary();
addResult(result, null);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5a.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5a.java
index fc835e2..e6ca274 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5a.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5a.java
@@ -37,7 +37,7 @@
LargeProject project = (LargeProject)e.nextElement();
Object[] result = new Object[2];
result[0] = project.getName();
- result[1] = Double.valueOf(project.getBudget());
+ result[1] = project.getBudget();
addResult(result, null);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5b.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5b.java
index 1dd2928..93be862 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5b.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario1_5b.java
@@ -38,7 +38,7 @@
if (project.getBudget() > 4000) {
Object[] result = new Object[2];
result[0] = project.getName();
- result[1] = Double.valueOf(project.getBudget());
+ result[1] = project.getBudget();
addResult(result, null);
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java
index 10336c8..d89c002 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java
@@ -42,20 +42,20 @@
if (getSession().getPlatform().isOracle() || getSession().getPlatform().isTimesTen7() || getSession().getPlatform().isMaxDB()) {
result[1] = new java.math.BigDecimal(3);
} else if (getSession().getPlatform().isMySQL()) {
- result[1] = Long.valueOf(3);
+ result[1] = 3L;
} else if (getSession().getPlatform().isSymfoware()) {
- result[1] = Short.valueOf((short)3);
+ result[1] = (short) 3;
} else if (getSession().getPlatform().isHANA()) {
String driverVersion = getAbstractSession().getAccessor().getConnection().getMetaData().getDriverVersion();
if (driverVersion.equals("1.0")) {
// up to version 1.00.35 driver version is returned as "1.0"
// and numeric constant is returned as Long
- result[1] = Long.valueOf(3);
+ result[1] = 3L;
} else {
- result[1] = Integer.valueOf(3);
+ result[1] = 3;
}
} else {
- result[1] = Integer.valueOf(3);
+ result[1] = 3;
}
addResult(result, null);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java
index d27adf0..3163695 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java
@@ -76,7 +76,7 @@
Company cloneCompany = (Company)uow.registerObject(originalCompany);
// Change the one of the Company's Vehicles
- ((Vehicle)((Vector)cloneCompany.getVehicles().getValue()).firstElement()).setPassengerCapacity(Integer.valueOf(origCapacity.intValue() + 1));
+ ((Vehicle)((Vector)cloneCompany.getVehicles().getValue()).firstElement()).setPassengerCapacity(origCapacity + 1);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java
index 32979ac..17bcc78 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java
@@ -93,7 +93,7 @@
//add a new manager, test 1-m's
Emp newEmp = new Emp();
- newEmp.setEmpno(Double.valueOf((double)(System.currentTimeMillis()) % 10000));
+ newEmp.setEmpno((double) (System.currentTimeMillis()) % 10000);
newEmp.setEname("THe New Guy" + System.currentTimeMillis());
if ((deserialDept.getEmpCollection() != null) && (deserialDept.getEmpCollection().size() > 1)) {
deserialDept.getEmpCollection().remove(deserialDept.getEmpCollection().iterator().next());
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java
index 3027693..fb00680 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java
@@ -155,7 +155,7 @@
if (!ok) {
if (((Method)methods.elementAt(i)).getName().equals("isConnected")) {
if (Boolean.class.isInstance(results[i])) {
- ok = !((Boolean)results[i]).booleanValue();
+ ok = !(Boolean) results[i];
}
}
}
@@ -224,23 +224,23 @@
public static Object getWrapperClassInstance(Class cls) {
if (Integer.TYPE.equals(cls)) {
- return Integer.valueOf(0);
+ return 0;
} else if (Boolean.TYPE.equals(cls)) {
- return Boolean.valueOf(false);
+ return Boolean.FALSE;
} else if (Character.TYPE.equals(cls)) {
- return Character.valueOf(' ');
+ return ' ';
} else if (Byte.TYPE.equals(cls)) {
byte b = 0;
- return Byte.valueOf(b);
+ return b;
} else if (Short.TYPE.equals(cls)) {
short s = 0;
- return Short.valueOf(s);
+ return s;
} else if (Long.TYPE.equals(cls)) {
- return Long.valueOf(0);
+ return 0L;
} else if (Float.TYPE.equals(cls)) {
- return Float.valueOf(0);
+ return (float) 0;
} else if (Double.TYPE.equals(cls)) {
- return Double.valueOf(0);
+ return (double) 0;
} else {
return null;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java
index 3d80475..a7c02c7 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java
@@ -57,12 +57,12 @@
a_plus_minus_b_BigDecimal[1] = null;
}
if (a != null) {
- a_Integer = Integer.valueOf(a.intValue());
+ a_Integer = a.intValue();
} else {
a_Integer = null;
}
if (b != null) {
- b_Integer = Integer.valueOf(b.intValue());
+ b_Integer = b.intValue();
} else {
b_Integer = null;
}
@@ -71,7 +71,7 @@
protected void setC(BigDecimal c) {
if (c != null) {
c_BigDecimal = c;
- c_Integer = Integer.valueOf(c_BigDecimal.intValue());
+ c_Integer = c_BigDecimal.intValue();
} else {
c_BigDecimal = null;
c_Integer = null;
@@ -228,10 +228,10 @@
BigDecimal a = a2.divide(new BigDecimal(2), RoundingMode.UNNECESSARY);
BigDecimal b2 = a_plus_minus_b_BigDecimal[0].subtract(a_plus_minus_b_BigDecimal[1]);
BigDecimal b = b2.divide(new BigDecimal(2), RoundingMode.UNNECESSARY);
- if (a_Integer.intValue() != a.intValue()) {
+ if (a_Integer != a.intValue()) {
return false;
}
- if (b_Integer.intValue() != b.intValue()) {
+ if (b_Integer != b.intValue()) {
return false;
}
}
@@ -243,7 +243,7 @@
if (c_Integer == null) {
return false;
}
- if (c_BigDecimal.intValue() != c_Integer.intValue()) {
+ if (c_BigDecimal.intValue() != c_Integer) {
return false;
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java
index ce5e138..5931794 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java
@@ -29,13 +29,13 @@
int deleteSuccess = 1;
String parameterNamePrefix;
boolean shouldUseNamedArguments;
- static final Integer menuID = Integer.valueOf(99);
- static final Integer restaurantID = Integer.valueOf(100);
- static final Integer dinerID = Integer.valueOf(101);
- static final Integer personID = Integer.valueOf(102);
- static final Integer locationID = Integer.valueOf(103);
- static final Integer waiterID = Integer.valueOf(104);
- static final Integer menuItemID = Integer.valueOf(105);
+ static final Integer menuID = 99;
+ static final Integer restaurantID = 100;
+ static final Integer dinerID = 101;
+ static final Integer personID = 102;
+ static final Integer locationID = 103;
+ static final Integer waiterID = 104;
+ static final Integer menuItemID = 105;
static final String menuType = "Lunch";
static final String menuTypeUpdate = "Dinner";
static final String dinerFirstName = "Steve";
@@ -55,8 +55,8 @@
static final String waiterSpecialityUpdate = "Speaking Spanish and Italian";
static final String waiterClass = "A";
static final String menuItemName = "Roasted beef and potato";
- static final Float menuItemPrice = Float.valueOf(20.99f);
- static final Float menuItemPriceUpdate = Float.valueOf(22.99f);
+ static final Float menuItemPrice = 20.99f;
+ static final Float menuItemPriceUpdate = 22.99f;
static final String restaurantName = "May Flower";
static final String restaurantNameUpdate = "Great Wall Restaurant";
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java
index 9f6e11e..33b1e71 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java
@@ -93,7 +93,7 @@
loginConfig.setExternalTransactionController(false);
loginConfig.setForceFieldNamesToUppercase(false);
loginConfig.setJdbcBatchWriting(false);
- loginConfig.setMaxBatchWritingSize(Integer.valueOf(5));
+ loginConfig.setMaxBatchWritingSize(5);
loginConfig.setNativeSequencing(false);
loginConfig.setNativeSQL(false);
loginConfig.setOptimizeDataConversion(true);
@@ -101,7 +101,7 @@
loginConfig.setPlatformClass("platform");
loginConfig.setSequenceCounterField("SEQ_COUNT");
loginConfig.setSequenceNameField("SEQ_NAME");
- loginConfig.setSequencePreallocationSize(Integer.valueOf(99));
+ loginConfig.setSequencePreallocationSize(99);
loginConfig.setSequenceTable("\"SEQUENCE\"");
loginConfig.setStreamsForBinding(false);
loginConfig.setStringBinding(false);
@@ -163,16 +163,16 @@
ServerSessionConfig serverSessionConfig = new ServerSessionConfig();
serverSessionConfig.setPoolsConfig(new PoolsConfig());
ReadConnectionPoolConfig readPool = new ReadConnectionPoolConfig();
- readPool.setMaxConnections(Integer.valueOf(2));
- readPool.setMinConnections(Integer.valueOf(2));
+ readPool.setMaxConnections(2);
+ readPool.setMinConnections(2);
serverSessionConfig.getPoolsConfig().setReadConnectionPoolConfig(readPool);
WriteConnectionPoolConfig writePool = new WriteConnectionPoolConfig();
- writePool.setMaxConnections(Integer.valueOf(10));
- writePool.setMinConnections(Integer.valueOf(5));
+ writePool.setMaxConnections(10);
+ writePool.setMinConnections(5);
serverSessionConfig.getPoolsConfig().setWriteConnectionPoolConfig(writePool);
WriteConnectionPoolConfig userPool = new WriteConnectionPoolConfig();
- userPool.setMaxConnections(Integer.valueOf(5));
- userPool.setMinConnections(Integer.valueOf(0));
+ userPool.setMaxConnections(5);
+ userPool.setMinConnections(0);
serverSessionConfig.getPoolsConfig().addConnectionPoolConfig(userPool);
sessions.addSessionConfig(serverSessionConfig);
FileWriter writer = new FileWriter(m_resource);
@@ -257,7 +257,7 @@
checkBoolean("ExternalTransactionController", loginConfig.getExternalTransactionController(), false);
checkBoolean("ForceFieldNamesToUppercase", loginConfig.getForceFieldNamesToUppercase(), false);
checkBoolean("JdbcBatchWriting", loginConfig.getJdbcBatchWriting(), false);
- check("MaxBatchWritingSize", loginConfig.getMaxBatchWritingSize(), Integer.valueOf(5));
+ check("MaxBatchWritingSize", loginConfig.getMaxBatchWritingSize(), 5);
checkBoolean("NativeSequencing", loginConfig.getNativeSequencing(), false);
checkBoolean("NativeSQL", loginConfig.getNativeSQL(), false);
checkBoolean("OptimizeDataConversion", loginConfig.getOptimizeDataConversion(), true);
@@ -265,7 +265,7 @@
check("PlatformClass", loginConfig.getPlatformClass(), "platform");
check("SequenceCounterField", loginConfig.getSequenceCounterField(), "SEQ_COUNT");
check("SequenceNameField", loginConfig.getSequenceNameField(), "SEQ_NAME");
- check("SequencePreallocationSize", loginConfig.getSequencePreallocationSize(), Integer.valueOf(99));
+ check("SequencePreallocationSize", loginConfig.getSequencePreallocationSize(), 99);
check("SequenceTable", loginConfig.getSequenceTable(), "\"SEQUENCE\"");
checkBoolean("StreamsForBinding", loginConfig.getStreamsForBinding(), false);
checkBoolean("StringBinding", loginConfig.getStringBinding(), false);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java
index 1e642ae..6ee3286 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java
@@ -92,8 +92,8 @@
genderMapping.setSetMethodName("setGender");
genderMapping.setFieldName("POJO_EMPLOYEE.GENDER");
ObjectTypeConverter genderMappingConverter = new ObjectTypeConverter();
- genderMappingConverter.addConversionValue(Character.valueOf('F'), "Female");
- genderMappingConverter.addConversionValue(Character.valueOf('M'), "Male");
+ genderMappingConverter.addConversionValue('F', "Female");
+ genderMappingConverter.addConversionValue('M', "Male");
genderMapping.setConverter(genderMappingConverter);
descriptor.addMapping(genderMapping);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java
index 5fd8ddf..fe35900 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java
@@ -149,7 +149,7 @@
long timeToSleepBetweenAddingDescriptors;
InterfaceHashtableProject project;
static int numberOfCompletedTests = 0;
- static Object lock = Boolean.valueOf(true);
+ static Object lock = Boolean.TRUE;
@Override
public void test() {
DatabaseSession dbSession;
@@ -325,7 +325,7 @@
int testNumber;
int numberOfTests;
static int numberOfCompletedTests = 0;
- static Object lock = Boolean.valueOf(true);
+ static Object lock = Boolean.TRUE;
@Override
public void test() {
// Test execution causes deadlock on SQL Server
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java
index 170599a..1cd7a74 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java
@@ -46,7 +46,7 @@
protected void test() throws Throwable {
// TODO Auto-generated method stub
super.test();
- Integer i = Integer.valueOf(5);
+ Integer i = 5;
Thread thread1 = new Thread(new Runner1(i, emp.getId(),project.getId(),getSession()));
thread1.setName("Runner1");
Thread thread2 = new Thread(new Runner2(i, emp.getId(),project.getId(),getSession()));
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/BooleanTester.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/BooleanTester.java
index 6ea36cb..4772057 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/BooleanTester.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/BooleanTester.java
@@ -34,7 +34,7 @@
public BooleanTester(boolean testValue) {
super(Boolean.valueOf(testValue).toString());
booleanValue = testValue;
- booleanClassValue = Boolean.valueOf(testValue);
+ booleanClassValue = testValue;
}
public static RelationalDescriptor descriptor() {
@@ -83,11 +83,11 @@
}
public void setBooleanClassValue(boolean boolValue) {
- booleanClassValue = Boolean.valueOf(boolValue);
+ booleanClassValue = boolValue;
}
public void setBooleanValue(Boolean boolValue) {
- booleanValue = boolValue.booleanValue();
+ booleanValue = boolValue;
}
public void setBooleanValue(boolean boolValue) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/NumericTester.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/NumericTester.java
index 5110dee..862b410 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/NumericTester.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/types/NumericTester.java
@@ -44,17 +44,17 @@
public NumericTester() {
super("ZERO");
intValue = 0;
- integerClassValue = Integer.valueOf(0);
+ integerClassValue = 0;
floatValue = 0;
- floatClassValue = Float.valueOf(0);
+ floatClassValue = (float) 0;
longValue = 0;
- longClassValue = Long.valueOf(0);
+ longClassValue = 0L;
doubleValue = 0;
- doubleClassValue = Double.valueOf(0);
+ doubleClassValue = (double) 0;
shortValue = (short)0;
- shortClassValue = Short.valueOf((short)0);
+ shortClassValue = (short) 0;
byteValue = (byte)0;
- byteClassValue = Byte.valueOf((byte)0);
+ byteClassValue = (byte) 0;
bigIntegerValue = new BigInteger("0");
bigDecimalValue = new BigDecimal(bigIntegerValue, 19);
}
@@ -225,17 +225,17 @@
NumericTester tester = new NumericTester("MAXIMUM");
Hashtable maximums = platform.maximumNumericValues();
- tester.setIntegerValue(((Integer)maximums.get(Integer.class)).intValue());
+ tester.setIntegerValue((Integer) maximums.get(Integer.class));
tester.setIntegerClassValue((Integer)maximums.get(Integer.class));
- tester.setFloatValue(((Float)maximums.get(Float.class)).floatValue());
+ tester.setFloatValue((Float) maximums.get(Float.class));
tester.setFloatClassValue((Float)maximums.get(Float.class));
- tester.setLongValue(((Long)maximums.get(Long.class)).longValue());
+ tester.setLongValue((Long) maximums.get(Long.class));
tester.setLongClassValue((Long)maximums.get(Long.class));
- tester.setDoubleValue(((Double)maximums.get(Double.class)).doubleValue());
+ tester.setDoubleValue((Double) maximums.get(Double.class));
tester.setDoubleClassValue((Double)maximums.get(Double.class));
- tester.setShortValue(((Short)maximums.get(Short.class)).shortValue());
+ tester.setShortValue((Short) maximums.get(Short.class));
tester.setShortClassValue((Short)maximums.get(Short.class));
- tester.setByteValue(((Byte)maximums.get(Byte.class)).byteValue());
+ tester.setByteValue((Byte) maximums.get(Byte.class));
tester.setByteClassValue((Byte)maximums.get(Byte.class));
tester.setBigIntegerValue((BigInteger)maximums.get(BigInteger.class));
tester.setBigDecimalValue((BigDecimal)maximums.get(BigDecimal.class));
@@ -247,17 +247,17 @@
NumericTester tester = new NumericTester("MINIMUM");
Hashtable minimums = platform.minimumNumericValues();
- tester.setIntegerValue(((Integer)minimums.get(Integer.class)).intValue());
+ tester.setIntegerValue((Integer) minimums.get(Integer.class));
tester.setIntegerClassValue((Integer)minimums.get(Integer.class));
- tester.setFloatValue(((Float)minimums.get(Float.class)).floatValue());
+ tester.setFloatValue((Float) minimums.get(Float.class));
tester.setFloatClassValue((Float)minimums.get(Float.class));
- tester.setLongValue(((Long)minimums.get(Long.class)).longValue());
+ tester.setLongValue((Long) minimums.get(Long.class));
tester.setLongClassValue((Long)minimums.get(Long.class));
- tester.setDoubleValue(((Double)minimums.get(Double.class)).doubleValue());
+ tester.setDoubleValue((Double) minimums.get(Double.class));
tester.setDoubleClassValue((Double)minimums.get(Double.class));
- tester.setShortValue(((Short)minimums.get(Short.class)).shortValue());
+ tester.setShortValue((Short) minimums.get(Short.class));
tester.setShortClassValue((Short)minimums.get(Short.class));
- tester.setByteValue(((Byte)minimums.get(Byte.class)).byteValue());
+ tester.setByteValue((Byte) minimums.get(Byte.class));
tester.setByteClassValue((Byte)minimums.get(Byte.class));
tester.setBigIntegerValue((BigInteger)minimums.get(BigInteger.class));
tester.setBigDecimalValue((BigDecimal)minimums.get(BigDecimal.class));
@@ -274,7 +274,7 @@
}
public void setByteClassValue(byte aByte) {
- byteClassValue = Byte.valueOf(aByte);
+ byteClassValue = aByte;
}
public void setByteClassValue(Byte aByte) {
@@ -286,7 +286,7 @@
}
public void setDoubleClassValue(double aDouble) {
- doubleClassValue = Double.valueOf(aDouble);
+ doubleClassValue = aDouble;
}
public void setDoubleClassValue(Double aDouble) {
@@ -298,7 +298,7 @@
}
public void setFloatClassValue(float aFloat) {
- floatClassValue = Float.valueOf(aFloat);
+ floatClassValue = aFloat;
}
public void setFloatClassValue(Float aFloat) {
@@ -310,7 +310,7 @@
}
public void setIntegerClassValue(int anInteger) {
- integerClassValue = Integer.valueOf(anInteger);
+ integerClassValue = anInteger;
}
public void setIntegerClassValue(Integer anInteger) {
@@ -322,7 +322,7 @@
}
public void setLongClassValue(long aLong) {
- longClassValue = Long.valueOf(aLong);
+ longClassValue = aLong;
}
public void setLongClassValue(Long aLong) {
@@ -338,7 +338,7 @@
}
public void setShortClassValue(short aShort) {
- shortClassValue = Short.valueOf(aShort);
+ shortClassValue = aShort;
}
public void setShortValue(short aShort) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unidirectional/UnidirectionalEmployeeBasicTestModel.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unidirectional/UnidirectionalEmployeeBasicTestModel.java
index c51c3ca..0e35776 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unidirectional/UnidirectionalEmployeeBasicTestModel.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unidirectional/UnidirectionalEmployeeBasicTestModel.java
@@ -378,7 +378,7 @@
uow.registerObject(employee);
uow.commit();
- version[0] = ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession())).longValue();
+ version[0] = (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession());
// test1 - add managed employee, manager's version should increment.
uow = getSession().acquireUnitOfWork();
@@ -386,14 +386,14 @@
Employee employeeClone = (Employee)uow.registerObject(employee);
managerClone.addManagedEmployee(employeeClone);
uow.commit();
- version[1] = ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession())).longValue();
+ version[1] = (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession());
// test2 - alter managed employee, manager's version should NOT increment.
uow = getSession().acquireUnitOfWork();
employeeClone = (Employee)uow.registerObject(employee);
employeeClone.setFirstName("Altered");
uow.commit();
- version[2] = ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession())).longValue();
+ version[2] = (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession());
// test3- remove managed employee, manager's version should increment.
uow = getSession().acquireUnitOfWork();
@@ -401,7 +401,7 @@
employeeClone = (Employee)uow.registerObject(employee);
managerClone.removeManagedEmployee(employeeClone);
uow.commit();
- version[3] = ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession())).longValue();
+ version[3] = (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession());
PhoneNumber phone = new PhoneNumber("home", "613", "1111111");
@@ -411,14 +411,14 @@
PhoneNumber phoneClone = (PhoneNumber)uow.registerObject(phone);
managerClone.addPhoneNumber(phoneClone);
uow.commit();
- version[4] = ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession())).longValue();
+ version[4] = (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession());
// test5- alter phone, manager's version should increment.
uow = getSession().acquireUnitOfWork();
phoneClone = (PhoneNumber)uow.registerObject(phone);
phoneClone.setType("work");
uow.commit();
- version[5] = ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession())).longValue();
+ version[5] = (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession());
// test6- remove phone, manager's version should increment.
uow = getSession().acquireUnitOfWork();
@@ -426,7 +426,7 @@
phoneClone = (PhoneNumber)uow.registerObject(phone);
managerClone.removePhoneNumber(phoneClone);
uow.commit();
- version[6] = ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession())).longValue();
+ version[6] = (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(manager, manager.getId(), getAbstractSession());
}
@Override
public void verify() {
@@ -598,7 +598,7 @@
super();
}
long getVersion(Employee emp) {
- return ((Long)getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(emp, emp.getId(), getAbstractSession())).longValue();
+ return (Long) getSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(emp, emp.getId(), getAbstractSession());
}
@Override
public void reset() {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java
index 4e0b141..1cd3ba3 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java
@@ -312,7 +312,7 @@
DirectToFieldMapping cityMapping = new DirectToFieldMapping();
cityMapping.setAttributeName("city");
cityMapping.setFieldName("CONCURRENT_ADDRESS.CITY");
- cityMapping.setWeight(Integer.valueOf(10));
+ cityMapping.setWeight(10);
descriptor.addMapping(cityMapping);
DirectToFieldMapping countryMapping = new DirectToFieldMapping();
@@ -320,7 +320,7 @@
countryMapping.setFieldName("CONCURRENT_ADDRESS.COUNTRY");
countryMapping.setSetMethodName("setCountry");
countryMapping.setGetMethodName("getCountry");
- countryMapping.setWeight(Integer.valueOf(9));
+ countryMapping.setWeight(9);
descriptor.addMapping(countryMapping);
DirectToFieldMapping idMapping = new DirectToFieldMapping();
@@ -328,13 +328,13 @@
idMapping.setFieldName("CONCURRENT_ADDRESS.ADDRESS_ID");
idMapping.setSetMethodName("setId");
idMapping.setGetMethodName("getId");
- idMapping.setWeight(Integer.valueOf(8));
+ idMapping.setWeight(8);
descriptor.addMapping(idMapping);
DirectToFieldMapping postalCodeMapping = new DirectToFieldMapping();
postalCodeMapping.setAttributeName("postalCode");
postalCodeMapping.setFieldName("CONCURRENT_ADDRESS.P_CODE");
- postalCodeMapping.setWeight(Integer.valueOf(7));
+ postalCodeMapping.setWeight(7);
descriptor.addMapping(postalCodeMapping);
DirectToFieldMapping provinceMapping = new DirectToFieldMapping();
@@ -342,13 +342,13 @@
provinceMapping.setFieldName("CONCURRENT_ADDRESS.PROVINCE");
provinceMapping.setSetMethodName("setProvince");
provinceMapping.setGetMethodName("getProvince");
- provinceMapping.setWeight(Integer.valueOf(6));
+ provinceMapping.setWeight(6);
descriptor.addMapping(provinceMapping);
DirectToFieldMapping streetMapping = new DirectToFieldMapping();
streetMapping.setAttributeName("street");
streetMapping.setFieldName("CONCURRENT_ADDRESS.STREET");
- streetMapping.setWeight(Integer.valueOf(5));
+ streetMapping.setWeight(5);
descriptor.addMapping(streetMapping);
return descriptor;
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java
index 1daeb28..0e75bcd 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java
@@ -47,7 +47,7 @@
Enumeration enumtr = checkCacheState.keys();
while (enumtr.hasMoreElements()) {
ClassDescriptor key = (ClassDescriptor)enumtr.nextElement();
- key.getQueryManager().getDoesExistQuery().setExistencePolicy(((Integer)checkCacheState.get(key)).intValue());
+ key.getQueryManager().getDoesExistQuery().setExistencePolicy((Integer) checkCacheState.get(key));
}
enumtr = identityMapTypes.keys();
while (enumtr.hasMoreElements()) {
@@ -70,7 +70,7 @@
while (iterator.hasNext()) {
ClassDescriptor descriptor = (ClassDescriptor)iterator.next();
checkCacheState.put(descriptor,
- Integer.valueOf(descriptor.getQueryManager().getDoesExistQuery().getExistencePolicy()));
+ descriptor.getQueryManager().getDoesExistQuery().getExistencePolicy());
if(descriptor.requiresInitialization((AbstractSession) getSession())) {
// identityMapClass is null for AggregateObject, AggregateMapping and Interface descriptors.
identityMapTypes.put(descriptor, descriptor.getIdentityMapClass());
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java
index 9845a44..57014f0 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java
@@ -115,7 +115,7 @@
//test update
this.licenceType = "Alcohol License";
this.licenceValue = (Boolean)clone.getLicenses().get(licenceType);
- clone.getLicenses().put(licenceType, Boolean.valueOf(!(this.licenceValue).booleanValue()));
+ clone.getLicenses().put(licenceType, !this.licenceValue);
uow.commit();
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java
index b01ba66..0458b9e 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java
@@ -35,7 +35,7 @@
try{
Long[] arr = new Long[100000];
for (int i = 0; i< 100000; ++i){
- arr[i] = Long.valueOf(i);
+ arr[i] = (long) i;
}
}catch (Error er){
//ignore
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java
index 4645543..03cdc29 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java
@@ -27,7 +27,7 @@
try{
Long[] arr = new Long[100000];
for (int i = 0; i< 100000; ++i){
- arr[i] = Long.valueOf(i);
+ arr[i] = (long) i;
}
}catch (Error er){
//ignore
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java
index d3ad6e8..d9e8762 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java
@@ -28,7 +28,7 @@
try{
Long[] arr = new Long[10000000];
for (int i = 0; i< 10000000; ++i){
- arr[i] = Long.valueOf(i);
+ arr[i] = (long) i;
}
System.gc();
try{
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java
index 77893ed..47d639d 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java
@@ -27,7 +27,7 @@
try{
Long[] arr = new Long[100000];
for (int i = 0; i< 100000; ++i){
- arr[i] = Long.valueOf(i);
+ arr[i] = (long) i;
}
}catch (Error er){
//ignore
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java
index 054567a..1930e96 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java
@@ -37,7 +37,7 @@
try{
Long[] arr = new Long[10000000];
for (int i = 0; i< 10000000; ++i){
- arr[i] = Long.valueOf(i);
+ arr[i] = (long) i;
}
System.gc();
try{
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/writechanges/WriteChangesFailed_StatementCountTestCase.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/writechanges/WriteChangesFailed_StatementCountTestCase.java
index c22b16e..5563be3 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/writechanges/WriteChangesFailed_StatementCountTestCase.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/unitofwork/writechanges/WriteChangesFailed_StatementCountTestCase.java
@@ -78,7 +78,7 @@
throw new TestErrorException("The write statments count property should be set if writechanges get failed.");
}else {
writeStatementsCount =
- ((Integer)uow.getProperties().get(DatasourceAccessor.WRITE_STATEMENTS_COUNT_PROPERTY)).intValue();
+ (Integer) uow.getProperties().get(DatasourceAccessor.WRITE_STATEMENTS_COUNT_PROPERTY);
}
if (uow.getProperties().get(DatasourceAccessor.STOREDPROCEDURE_STATEMENTS_COUNT_PROPERTY) == null) {
throw new TestErrorException("The store procedure statments count property should be set if writechanges get failed.");
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java
index 78ad2fd..b71dd0c 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java
@@ -43,7 +43,7 @@
@Override
public void test() {
try {
- mapping.setAttributeValueInObject(null, Integer.valueOf(0));
+ mapping.setAttributeValueInObject(null, 0);
} catch (EclipseLinkException exception) {
caughtException = exception;
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java
index 8d89330..1cd67e1 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java
@@ -38,7 +38,7 @@
public void test() {
// do not use logMessages(), which has been already set up for the session
- Integer integer = Integer.valueOf(1);
+ Integer integer = 1;
try {
UnitOfWork uow = getSession().acquireUnitOfWork();
uow.registerObject(integer);
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java
index 97ba878..bb92914 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java
@@ -80,7 +80,7 @@
try {
// doesn't matter what id is queried
Vector params = new Vector();
- params.add(Integer.valueOf(id));
+ params.add(id);
// special case for conforming
if (this.shouldConform) {
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java
index 054cc12..43751f3 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java
@@ -100,9 +100,9 @@
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("StoredProcedure_InOut_Out_In");
- call.addNamedInOutputArgumentValue("P_INOUT", Integer.valueOf(100), "P_INOUT_FIELD_NAME", Integer.class);
+ call.addNamedInOutputArgumentValue("P_INOUT", 100, "P_INOUT_FIELD_NAME", Integer.class);
call.addNamedOutputArgument("P_OUT", "P_OUT_FIELD_NAME", Integer.class);
- call.addNamedArgumentValue("P_IN", Integer.valueOf(1000));
+ call.addNamedArgumentValue("P_IN", 1000);
//Set stored procedure to Named query.
DataReadQuery dataReadQuery = new DataReadQuery();
@@ -116,9 +116,9 @@
StoredProcedureCall unamedcall = new StoredProcedureCall();
unamedcall.setProcedureName("StoredProcedure_InOut_Out_In");
- unamedcall.addUnamedInOutputArgumentValue(Integer.valueOf(100), "P_INOUT_FIELD_NAME", Integer.class);
+ unamedcall.addUnamedInOutputArgumentValue(100, "P_INOUT_FIELD_NAME", Integer.class);
unamedcall.addUnamedOutputArgument("P_OUT_FIELD_NAME", Integer.class);
- unamedcall.addUnamedArgumentValue(Integer.valueOf(1000));
+ unamedcall.addUnamedArgumentValue(1000);
//Set stored procedure to Named query
DataReadQuery unameddataReadQuery = new DataReadQuery();
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java
index 76aacde..a74fb8d 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java
@@ -63,8 +63,8 @@
@Override
public void test() {
Vector parameters = new Vector();
- Long p_inout = Long.valueOf(99);
- Long p_in = Long.valueOf(100);
+ Long p_inout = 99L;
+ Long p_in = 100L;
parameters.add(p_inout);
parameters.add(p_in);
result = getSession().executeQuery(query, parameters);
@@ -74,17 +74,17 @@
public void verify() {
DatabaseRecord row = (DatabaseRecord)((Vector)result).firstElement();
Long p_inout = (Long)row.get("P_INOUT");
- if (!p_inout.equals(Long.valueOf(100))) {
+ if (!p_inout.equals(100L)) {
throw new TestErrorException(
"The stored function did not execute correctly. Expected: [P_INOUT = 100]");
}
Long p_out = (Long)row.get("P_OUT");
- if (!p_out.equals(Long.valueOf(99))) {
+ if (!p_out.equals(99L)) {
throw new TestErrorException(
"The stored function did not execute correctly. Expected: [P_OUT = 99]");
}
Long returnValue = (Long)row.getValues().firstElement();
- if (!returnValue.equals(Long.valueOf(99))) {
+ if (!returnValue.equals(99L)) {
throw new TestErrorException(
"The stored function did not execute correctly. Expected: [return value = 99]");
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java
index ab460b0..69edd41 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java
@@ -93,7 +93,7 @@
Integer P_INOUT_FIELD_NAME = (Integer)row.get("P_INOUT_FIELD_NAME");
Integer P_OUT_FIELD_NAME = (Integer)row.get("P_OUT_FIELD_NAME");
- if (!P_INOUT_FIELD_NAME.equals(Integer.valueOf(1000)) || !P_OUT_FIELD_NAME.equals(Integer.valueOf(100))) {
+ if (!P_INOUT_FIELD_NAME.equals(1000) || !P_OUT_FIELD_NAME.equals(100)) {
throw new TestErrorException("Stored Procedure which write to or read from XML does not execute as expected.");
}
}
@@ -113,8 +113,8 @@
Integer UNAMED_P_INOUT_FIELD_NAME = (Integer)unamedrow.get("P_INOUT_FIELD_NAME");
Integer UNAMED_P_OUT_FIELD_NAME = (Integer)unamedrow.get("P_OUT_FIELD_NAME");
- if (!UNAMED_P_INOUT_FIELD_NAME.equals(Integer.valueOf(1000)) ||
- !UNAMED_P_OUT_FIELD_NAME.equals(Integer.valueOf(100))) {
+ if (!UNAMED_P_INOUT_FIELD_NAME.equals(1000) ||
+ !UNAMED_P_OUT_FIELD_NAME.equals(100)) {
throw new TestErrorException("UNnamed Stored Procedure which write to or read from XML dose not execute as expected.");
}
}
diff --git a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java
index c71858e..c929a5a 100644
--- a/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java
+++ b/foundation/eclipselink.core.test/src/it/java/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java
@@ -52,7 +52,7 @@
@Override
public String getName() {
- return super.getName() + Boolean.valueOf(usesUnitOfWork) + Boolean.valueOf(usesNestedUnitOfWork);
+ return super.getName() + usesUnitOfWork + usesNestedUnitOfWork;
}
@Override
diff --git a/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/Address.java b/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/Address.java
index 7cb6033..a86b736 100644
--- a/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/Address.java
+++ b/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/Address.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -102,9 +102,9 @@
Vector<DatabaseRecord> rows = new Vector<>();
Vector<DatabaseField> fields = desc.getAllFields();
DatabaseField[] fieldsArray = fields.toArray(new DatabaseField[0]);
- rows.add(new ArrayRecord(fields, fieldsArray, new Object[] { Integer.valueOf(51), "Calgary", "Canada", "J5J2B5", "ALB", "1111 Moose Rd." }));
- rows.add(new ArrayRecord(fields, fieldsArray, new Object[] { Integer.valueOf(52), "Metcalfe", "Canada", "Y4F7V6", "ONT", "2 Anderson Rd." }));
- rows.add(new ArrayRecord(fields, fieldsArray, new Object[] { Integer.valueOf(53), "Montreal", "Canada", "Q2S5Z5", "QUE", "1 Habs Place" }));
+ rows.add(new ArrayRecord(fields, fieldsArray, new Object[] {51, "Calgary", "Canada", "J5J2B5", "ALB", "1111 Moose Rd." }));
+ rows.add(new ArrayRecord(fields, fieldsArray, new Object[] {52, "Metcalfe", "Canada", "Y4F7V6", "ONT", "2 Anderson Rd." }));
+ rows.add(new ArrayRecord(fields, fieldsArray, new Object[] {53, "Montreal", "Canada", "Q2S5Z5", "QUE", "1 Habs Place" }));
return rows;
}
}
diff --git a/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/emulateddriver/EmulatedResultSet.java b/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/emulateddriver/EmulatedResultSet.java
index bdb604b..6447f6d 100644
--- a/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/emulateddriver/EmulatedResultSet.java
+++ b/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/failover/emulateddriver/EmulatedResultSet.java
@@ -69,7 +69,7 @@
@Override
public boolean getBoolean(int columnIndex) {
- return ((Boolean) getObject(columnIndex)).booleanValue();
+ return (Boolean) getObject(columnIndex);
}
@Override
@@ -155,7 +155,7 @@
@Override
public boolean getBoolean(String columnName) {
- return ((Boolean) getObject(columnName)).booleanValue();
+ return (Boolean) getObject(columnName);
}
@Override
diff --git a/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/helper/HelperTest.java b/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/helper/HelperTest.java
index 63ec1a3..ce37c02 100644
--- a/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/helper/HelperTest.java
+++ b/foundation/eclipselink.core.test/src/test/java/org/eclipse/persistence/testing/tests/junit/helper/HelperTest.java
@@ -72,7 +72,7 @@
aVector.clear();
for (int i = 0; i < 3; i++) {
- aVector.add(i, Integer.valueOf(i));
+ aVector.add(i, i);
}
Vector reverseVector = Helper.reverseVector(aVector);
@@ -95,7 +95,7 @@
@Test
public void checkAreVectorTypesAssignableWithNullVectorTest() {
Vector v1 = new Vector();
- v1.addElement(Integer.valueOf(1));
+ v1.addElement(1);
Assert.assertFalse("An exception should not have been thrown when checking if vectors are assignable - when one of the vectors is null.",
Helper.areTypesAssignable(v1, null));
}
@@ -135,8 +135,8 @@
Integer[] array2 = new Integer[3];
Integer[] array3 = new Integer[3];
for (int count = 0; count < 3; count++) {
- Integer counter = Integer.valueOf(count);
- Integer counter2 = Integer.valueOf(count + 9);
+ Integer counter = count;
+ Integer counter2 = count + 9;
array1[count] = counter;
array2[count] = counter;
array3[count] = counter2;
@@ -154,12 +154,12 @@
Integer[] array2 = new Integer[2];
Integer[] array3 = new Integer[3];
for (int count = 0; count < 2; count++) {
- Integer counter = Integer.valueOf(count);
+ Integer counter = count;
array1[count] = counter;
array2[count] = counter;
array3[count] = counter;
}
- array3[2] = Integer.valueOf(10);
+ array3[2] = 10;
Assert.assertTrue("Helper.compareArrays(Object[] array1, Object[] array2) does not recognize that object arrays are of same length.",
Helper.compareArrays(array1, array2));
@@ -195,7 +195,7 @@
public void timeFromDateTest() {
boolean optimizedDatesState = Helper.shouldOptimizeDates();
try {
- Date testDate = Helper.utilDateFromLong(Long.valueOf(System.currentTimeMillis()));
+ Date testDate = Helper.utilDateFromLong(System.currentTimeMillis());
String testTime = new Time(testDate.getTime()).toString();
Helper.setShouldOptimizeDates(false);
@@ -214,8 +214,8 @@
public void TimeFromLongTest() {
boolean optimizedDatesState = Helper.shouldOptimizeDates();
try {
- Long currentTime = Long.valueOf(System.currentTimeMillis());
- Time expectedTestTime = new Time(currentTime.longValue());
+ Long currentTime = System.currentTimeMillis();
+ Time expectedTestTime = new Time(currentTime);
Helper.setShouldOptimizeDates(false);
Time actualTime = Helper.timeFromLong(currentTime);
@@ -257,7 +257,7 @@
public void timestampFromDateTest() {
boolean optimizedDatesState = Helper.shouldOptimizeDates();
try {
- Date currentTime = Helper.utilDateFromLong(Long.valueOf(System.currentTimeMillis()));
+ Date currentTime = Helper.utilDateFromLong(System.currentTimeMillis());
String testTime = new Timestamp(currentTime.getTime()).toString();
Helper.setShouldOptimizeDates(true);
@@ -272,8 +272,8 @@
public void timestampFromLongTest() {
boolean optimizedDatesState = Helper.shouldOptimizeDates();
try {
- Long currentTime = Long.valueOf(System.currentTimeMillis());
- String testTime = new Timestamp(currentTime.longValue()).toString();
+ Long currentTime = System.currentTimeMillis();
+ String testTime = new Timestamp(currentTime).toString();
Helper.setShouldOptimizeDates(true);
Assert.assertEquals("Failed to convert Long to java.sql.Timestamp when shouldOptimizedDates is on",
diff --git a/foundation/org.eclipse.persistence.corba/src/it/java/org/eclipse/persistence/testing/tests/remote/suncorba/_CORBAServerManagerImplBase.java b/foundation/org.eclipse.persistence.corba/src/it/java/org/eclipse/persistence/testing/tests/remote/suncorba/_CORBAServerManagerImplBase.java
index faae6f3..552578e 100644
--- a/foundation/org.eclipse.persistence.corba/src/it/java/org/eclipse/persistence/testing/tests/remote/suncorba/_CORBAServerManagerImplBase.java
+++ b/foundation/org.eclipse.persistence.corba/src/it/java/org/eclipse/persistence/testing/tests/remote/suncorba/_CORBAServerManagerImplBase.java
@@ -28,7 +28,7 @@
private static java.util.Hashtable _methods = new java.util.Hashtable ();
static
{
- _methods.put ("createRemoteSessionController", Integer.valueOf(0));
+ _methods.put ("createRemoteSessionController", 0);
}
// Type-specific CORBA::Object operations
@@ -54,7 +54,7 @@
if (__method == null)
throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
- switch (__method.intValue ())
+ switch (__method)
{
case 0: // org/eclipse/persistence/testing/Remote/SunCORBA/CORBAServerManager/createRemoteSessionController
{
diff --git a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/internal/sessions/coordination/corba/sun/_SunCORBAConnectionImplBase.java b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/internal/sessions/coordination/corba/sun/_SunCORBAConnectionImplBase.java
index a66d0f2..2d0278a 100644
--- a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/internal/sessions/coordination/corba/sun/_SunCORBAConnectionImplBase.java
+++ b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/internal/sessions/coordination/corba/sun/_SunCORBAConnectionImplBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -38,7 +38,7 @@
private static Hashtable _methods = new Hashtable();
static {
- _methods.put("executeCommand", Integer.valueOf(0));
+ _methods.put("executeCommand", 0);
}
@Override
@@ -49,7 +49,7 @@
throw new BAD_OPERATION(0, CompletionStatus.COMPLETED_MAYBE);
}
- switch (__method.intValue()) {
+ switch (__method) {
case 0:// org/eclipse/persistence/internal/remotecommand/corba/sun/SunCORBAConnection/executeCommand
{
byte[] commandData = org.eclipse.persistence.internal.sessions.coordination.corba.sun.CommandDataHelper.read(in);
diff --git a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/CORBAConnection.java b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/CORBAConnection.java
index 14dbad4..ba61cb5 100644
--- a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/CORBAConnection.java
+++ b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/CORBAConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -172,7 +172,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
@@ -392,7 +392,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -448,7 +448,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
/**
@@ -466,7 +466,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -484,7 +484,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -503,7 +503,7 @@
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -521,7 +521,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -539,7 +539,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -557,7 +557,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -631,7 +631,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -646,7 +646,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
diff --git a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/_CORBARemoteSessionControllerImplBase.java b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/_CORBARemoteSessionControllerImplBase.java
index 681a46b..5dec97b 100644
--- a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/_CORBARemoteSessionControllerImplBase.java
+++ b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/corba/sun/_CORBARemoteSessionControllerImplBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -32,40 +32,40 @@
private static final Hashtable<String, Integer> _methods = new Hashtable<>();
static {
- _methods.put("getLogin", Integer.valueOf(2));
- _methods.put("scrollableCursorCurrentIndex", Integer.valueOf(5));
- _methods.put("commitRootUnitOfWork", Integer.valueOf(6));
- _methods.put("scrollableCursorAbsolute", Integer.valueOf(8));
- _methods.put("cursoredStreamNextPage", Integer.valueOf(10));
- _methods.put("executeQuery", Integer.valueOf(14));
- _methods.put("scrollableCursorFirst", Integer.valueOf(15));
- _methods.put("scrollableCursorAfterLast", Integer.valueOf(18));
- _methods.put("cursoredStreamClose", Integer.valueOf(19));
- _methods.put("getSequenceNumberNamed", Integer.valueOf(22));
- _methods.put("scrollableCursorClose", Integer.valueOf(24));
- _methods.put("processCommand", Integer.valueOf(25));
- _methods.put("cursorSelectObjects", Integer.valueOf(27));
- _methods.put("scrollableCursorLast", Integer.valueOf(29));
- _methods.put("executeNamedQuery", Integer.valueOf(31));
- _methods.put("scrollableCursorBeforeFirst", Integer.valueOf(33));
- _methods.put("scrollableCursorIsBeforeFirst", Integer.valueOf(34));
- _methods.put("beginTransaction", Integer.valueOf(35));
- _methods.put("initializeIdentityMapsOnServerSession", Integer.valueOf(36));
- _methods.put("scrollableCursorIsLast", Integer.valueOf(37));
- _methods.put("scrollableCursorSize", Integer.valueOf(38));
- _methods.put("scrollableCursorIsFirst", Integer.valueOf(39));
- _methods.put("getDescriptor", Integer.valueOf(40));
- _methods.put("cursoredStreamSize", Integer.valueOf(41));
- _methods.put("scrollableCursorRelative", Integer.valueOf(42));
- _methods.put("commitTransaction", Integer.valueOf(45));
- _methods.put("rollbackTransaction", Integer.valueOf(47));
- _methods.put("instantiateRemoteValueHolderOnServer", Integer.valueOf(52));
- _methods.put("scrollableCursorNextObject", Integer.valueOf(53));
- _methods.put("scrollableCursorIsAfterLast", Integer.valueOf(54));
- _methods.put("getDefaultReadOnlyClasses", Integer.valueOf(56));
- _methods.put("scrollableCursorPreviousObject", Integer.valueOf(57));
- _methods.put("getDescriptorForAlias", Integer.valueOf(58));
- _methods.put("beginEarlyTransaction", Integer.valueOf(59));
+ _methods.put("getLogin", 2);
+ _methods.put("scrollableCursorCurrentIndex", 5);
+ _methods.put("commitRootUnitOfWork", 6);
+ _methods.put("scrollableCursorAbsolute", 8);
+ _methods.put("cursoredStreamNextPage", 10);
+ _methods.put("executeQuery", 14);
+ _methods.put("scrollableCursorFirst", 15);
+ _methods.put("scrollableCursorAfterLast", 18);
+ _methods.put("cursoredStreamClose", 19);
+ _methods.put("getSequenceNumberNamed", 22);
+ _methods.put("scrollableCursorClose", 24);
+ _methods.put("processCommand", 25);
+ _methods.put("cursorSelectObjects", 27);
+ _methods.put("scrollableCursorLast", 29);
+ _methods.put("executeNamedQuery", 31);
+ _methods.put("scrollableCursorBeforeFirst", 33);
+ _methods.put("scrollableCursorIsBeforeFirst", 34);
+ _methods.put("beginTransaction", 35);
+ _methods.put("initializeIdentityMapsOnServerSession", 36);
+ _methods.put("scrollableCursorIsLast", 37);
+ _methods.put("scrollableCursorSize", 38);
+ _methods.put("scrollableCursorIsFirst", 39);
+ _methods.put("getDescriptor", 40);
+ _methods.put("cursoredStreamSize", 41);
+ _methods.put("scrollableCursorRelative", 42);
+ _methods.put("commitTransaction", 45);
+ _methods.put("rollbackTransaction", 47);
+ _methods.put("instantiateRemoteValueHolderOnServer", 52);
+ _methods.put("scrollableCursorNextObject", 53);
+ _methods.put("scrollableCursorIsAfterLast", 54);
+ _methods.put("getDefaultReadOnlyClasses", 56);
+ _methods.put("scrollableCursorPreviousObject", 57);
+ _methods.put("getDescriptorForAlias", 58);
+ _methods.put("beginEarlyTransaction", 59);
}
@Override
diff --git a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/rmi/iiop/RMIConnection.java b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/rmi/iiop/RMIConnection.java
index 2397709..1eddea8 100644
--- a/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/rmi/iiop/RMIConnection.java
+++ b/foundation/org.eclipse.persistence.corba/src/main/java/org/eclipse/persistence/sessions/remote/rmi/iiop/RMIConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -223,7 +223,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
@@ -481,7 +481,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -550,7 +550,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
/**
@@ -572,7 +572,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -593,7 +593,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -616,7 +616,7 @@
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -638,7 +638,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -660,7 +660,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -682,7 +682,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -768,7 +768,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -785,7 +785,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java
index a5ce651..0822bc3 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java
@@ -171,10 +171,10 @@
// Set the test average count as the test time.
this.setAverageTestCount((long)testAverage);
- this.testAverages.add(Double.valueOf(testAverage));
+ this.testAverages.add(testAverage);
this.testMins.add(PerformanceComparisonTestResult.minResults(times));
this.testMaxs.add(PerformanceComparisonTestResult.maxResults(times));
- this.testStandardDeviations.add(Double.valueOf(testStandardDeviation));
+ this.testStandardDeviations.add(testStandardDeviation);
if (testIndex > 0) {
double testBaseLineAverage = ((Number)this.testAverages.get(0)).doubleValue();
@@ -182,7 +182,7 @@
// Difference
double percentageDifference =
PerformanceComparisonTestResult.percentageDifference(testAverage, testBaseLineAverage);
- this.percentageDifferences.add(Double.valueOf(percentageDifference));
+ this.percentageDifferences.add(percentageDifference);
}
}
}
@@ -215,7 +215,7 @@
if (getTestCounts().size() <= test) {
getTestCounts().add(new ArrayList());
}
- ((List)getTestCounts().get(test)).add(Long.valueOf(time));
+ ((List)getTestCounts().get(test)).add(time);
}
/**
@@ -297,7 +297,7 @@
* Compute the max of the results.
*/
public static Number maxResults(List times) {
- Number testMax = Double.valueOf(0);
+ Number testMax = (double) 0;
for (int index = 0; index < times.size(); index++) {
Number time = (Number)times.get(index);
if (time.doubleValue() > testMax.doubleValue()) {
@@ -311,7 +311,7 @@
* Compute the min of the results.
*/
public static Number minResults(List times) {
- Number testMin = Double.valueOf(0);
+ Number testMin = (double) 0;
for (int index = 0; index < times.size(); index++) {
Number time = (Number)times.get(index);
if ((testMin.doubleValue() == 0) || (time.doubleValue() < testMin.doubleValue())) {
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java
index 3d0e07f..7b12fae 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java
@@ -93,12 +93,12 @@
TestResult lastResult = (TestResult)stream.nextElement();
double lastCount = lastResult.getTestTime();
PerformanceComparisonTestResult testResult = (PerformanceComparisonTestResult)((TestCase)test).getTestResult();
- testResult.getBaselineVersionResults().add(Double.valueOf(lastCount));
+ testResult.getBaselineVersionResults().add(lastCount);
// Average last 5 runs.
int numberOfRuns = 0;
while (stream.hasMoreElements() && (numberOfRuns < 4)) {
TestResult nextResult = (TestResult)stream.nextElement();
- testResult.getBaselineVersionResults().add(Double.valueOf(nextResult.getTestTime()));
+ testResult.getBaselineVersionResults().add((double) nextResult.getTestTime());
numberOfRuns++;
}
stream.close();
@@ -116,11 +116,11 @@
query.useCursoredStream(1, 1);
stream = (CursoredStream)session.executeQuery(query);
// Average last 5 runs.
- testResult.getCurrentVersionResults().add(Double.valueOf(currentCount));
+ testResult.getCurrentVersionResults().add(currentCount);
numberOfRuns = 0;
while (stream.hasMoreElements() && (numberOfRuns < 4)) {
TestResult nextResult = (TestResult)stream.nextElement();
- testResult.getCurrentVersionResults().add(Double.valueOf(nextResult.getTestTime()));
+ testResult.getCurrentVersionResults().add((double) nextResult.getTestTime());
numberOfRuns++;
}
stream.close();
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java
index 29f2d1b..15793f4 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java
@@ -92,7 +92,7 @@
stmt1 = conn.createStatement();
result = stmt1.executeQuery("select @@isolation");
result.next();
- isolationLevel = Integer.valueOf(result.getInt(1));
+ isolationLevel = result.getInt(1);
if(isolationLevel > 0) {
// If conn1 began transaction and updated the row (but hasn't committed the transaction yet),
// then conn2 should be able to read the original (not updated) state of the row.
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestModel.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestModel.java
index d2f6bab..9482663 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestModel.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestModel.java
@@ -76,7 +76,7 @@
}
}
}
- return shouldResetSystemAfterEachTestModel.booleanValue();
+ return shouldResetSystemAfterEachTestModel;
}
/**
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestVariation.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestVariation.java
index 6620890..e11984e 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestVariation.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/TestVariation.java
@@ -247,13 +247,13 @@
if (getters[i] != null) {
Object[] args = { };
Boolean res = (Boolean)getters[i].invoke(object, args);
- original[i] = res.booleanValue();
+ original[i] = res;
} else {
original[i] = fields[i].getBoolean(object);
}
if (setters[i] != null) {
- Object[] args = { Boolean.valueOf(required[i]) };
+ Object[] args = {required[i]};
setters[i].invoke(object, args);
} else {
fields[i].setBoolean(object, required[i]);
@@ -267,7 +267,7 @@
super.reset();
for (int i = required.length - 1; i >= 0; i--) {
if (setters[i] != null) {
- Object[] args = { Boolean.valueOf(original[i]) };
+ Object[] args = {original[i]};
setters[i].invoke(object, args);
} else {
fields[i].setBoolean(object, original[i]);
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/WriteObjectTest.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/WriteObjectTest.java
index b607074..68116ae 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/WriteObjectTest.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/WriteObjectTest.java
@@ -172,7 +172,7 @@
@Override
public void reset() {
if (bindAllParametersOriginal != null) {
- getSession().getLogin().setShouldBindAllParameters(bindAllParametersOriginal.booleanValue());
+ getSession().getLogin().setShouldBindAllParameters(bindAllParametersOriginal);
}
super.reset();
}
@@ -209,14 +209,14 @@
* run much slower than before.
*/
public void setShouldBindAllParameters(boolean value) {
- bindAllParameters = Boolean.valueOf(value);
+ bindAllParameters = value;
}
@Override
protected void setup() {
if (shouldBindAllParameters() != null) {
- bindAllParametersOriginal = Boolean.valueOf(getSession().getLogin().shouldBindAllParameters());
- getSession().getLogin().setShouldBindAllParameters(shouldBindAllParameters().booleanValue());
+ bindAllParametersOriginal = getSession().getLogin().shouldBindAllParameters();
+ getSession().getLogin().setShouldBindAllParameters(shouldBindAllParameters());
}
super.setup();
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java
index 7e7108a..42b7546 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java
@@ -879,12 +879,12 @@
row.addElement(summary.getLoadBuildSummary().jvm);
row.addElement(summary.getLoadBuildSummary().machine);
row.addElement(summary.getLoadBuildSummary().toplinkVersion);
- row.addElement(Integer.valueOf(summary.getTotalTests()));
- row.addElement(Integer.valueOf(summary.getSetupFailures()));
- row.addElement(Integer.valueOf(summary.getErrors()));
- row.addElement(Integer.valueOf(summary.getFatalErrors()));
- row.addElement(Integer.valueOf(summary.getProblems()));
- row.addElement(Long.valueOf(summary.getTotalTime()));
+ row.addElement(summary.getTotalTests());
+ row.addElement(summary.getSetupFailures());
+ row.addElement(summary.getErrors());
+ row.addElement(summary.getFatalErrors());
+ row.addElement(summary.getProblems());
+ row.addElement(summary.getTotalTime());
tableModel.addRow(row);
}
getSelectedTable().setModel(tableModel);
@@ -906,9 +906,9 @@
Vector row = new Vector();
row.addElement(result.getName());
row.addElement(result.getOutcome());
- row.addElement(Long.valueOf(result.getTestTime()));
- row.addElement(Long.valueOf(result.getTotalTime()));
- row.addElement(Boolean.valueOf(result.getException() != null));
+ row.addElement(result.getTestTime());
+ row.addElement(result.getTotalTime());
+ row.addElement(result.getException() != null);
row.addElement(result.getLoadBuildSummary().timestamp);
row.addElement(result.getLoadBuildSummary().loginChoice);
row.addElement(result.getLoadBuildSummary().os);
@@ -935,14 +935,14 @@
TestResultsSummary summary = (TestResultsSummary)enumtr.nextElement();
Vector row = new Vector();
row.addElement(summary.getName());
- row.addElement(Integer.valueOf(summary.getTotalTests()));
- row.addElement(Integer.valueOf(summary.getSetupFailures()));
- row.addElement(Integer.valueOf(summary.getPassed()));
- row.addElement(Integer.valueOf(summary.getErrors()));
- row.addElement(Integer.valueOf(summary.getFatalErrors()));
- row.addElement(Integer.valueOf(summary.getProblems()));
- row.addElement(Integer.valueOf(summary.getWarnings()));
- row.addElement(Long.valueOf(summary.getTotalTime()));
+ row.addElement(summary.getTotalTests());
+ row.addElement(summary.getSetupFailures());
+ row.addElement(summary.getPassed());
+ row.addElement(summary.getErrors());
+ row.addElement(summary.getFatalErrors());
+ row.addElement(summary.getProblems());
+ row.addElement(summary.getWarnings());
+ row.addElement(summary.getTotalTime());
tableModel.addRow(row);
}
getSelectedTable().setModel(tableModel);
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/tests/performance/emulateddb/EmulatedResultSet.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/tests/performance/emulateddb/EmulatedResultSet.java
index b7a2844..9d80c13 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/tests/performance/emulateddb/EmulatedResultSet.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/testing/tests/performance/emulateddb/EmulatedResultSet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -130,7 +130,7 @@
*/
@Override
public boolean getBoolean(int columnIndex) throws SQLException {
- return ((Boolean)getObject(columnIndex)).booleanValue();
+ return (Boolean) getObject(columnIndex);
}
/**
@@ -444,7 +444,7 @@
*/
@Override
public boolean getBoolean(String columnName) throws SQLException {
- return ((Boolean)getObject(columnName)).booleanValue();
+ return (Boolean) getObject(columnName);
}
/**
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/beans/ExpressionNode.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/beans/ExpressionNode.java
index 8d3a604..9077529 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/beans/ExpressionNode.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/beans/ExpressionNode.java
@@ -86,33 +86,33 @@
}
public static String getOperator(int anOperator) {
- return (String)getOperators().get(Integer.valueOf(anOperator));
+ return (String)getOperators().get(anOperator);
}
public static Hashtable getOperators() {
if (operators == null) {
operators = new Hashtable();
- operators.put(Integer.valueOf(ExpressionOperator.Equal), Equals);
- operators.put(Integer.valueOf(ExpressionOperator.NotEqual), NotEquals);
- operators.put(Integer.valueOf(ExpressionOperator.LessThan), LessThan);
- operators.put(Integer.valueOf(ExpressionOperator.LessThanEqual),
+ operators.put(ExpressionOperator.Equal, Equals);
+ operators.put(ExpressionOperator.NotEqual, NotEquals);
+ operators.put(ExpressionOperator.LessThan, LessThan);
+ operators.put(ExpressionOperator.LessThanEqual,
LessThanEqual);
- operators.put(Integer.valueOf(ExpressionOperator.GreaterThan),
+ operators.put(ExpressionOperator.GreaterThan,
GreaterThan);
- operators.put(Integer.valueOf(ExpressionOperator.GreaterThanEqual),
+ operators.put(ExpressionOperator.GreaterThanEqual,
GreaterThanEqual);
- operators.put(Integer.valueOf(ExpressionOperator.Like), Like);
- operators.put(Integer.valueOf(ExpressionOperator.NotLike), NotLike);
- operators.put(Integer.valueOf(ExpressionOperator.In), In);
- operators.put(Integer.valueOf(ExpressionOperator.NotIn), NotIn);
- operators.put(Integer.valueOf(ExpressionOperator.Between), Between);
- operators.put(Integer.valueOf(ExpressionOperator.NotBetween),
+ operators.put(ExpressionOperator.Like, Like);
+ operators.put(ExpressionOperator.NotLike, NotLike);
+ operators.put(ExpressionOperator.In, In);
+ operators.put(ExpressionOperator.NotIn, NotIn);
+ operators.put(ExpressionOperator.Between, Between);
+ operators.put(ExpressionOperator.NotBetween,
NotBetween);
- operators.put(Integer.valueOf(ExpressionOperator.Or), Or);
- operators.put(Integer.valueOf(ExpressionOperator.And), And);
- operators.put(Integer.valueOf(ExpressionOperator.Not), Not);
- operators.put(Integer.valueOf(ExpressionOperator.ToLowerCase), Lower);
- operators.put(Integer.valueOf(ExpressionOperator.ToUpperCase), Upper);
+ operators.put(ExpressionOperator.Or, Or);
+ operators.put(ExpressionOperator.And, And);
+ operators.put(ExpressionOperator.Not, Not);
+ operators.put(ExpressionOperator.ToLowerCase, Lower);
+ operators.put(ExpressionOperator.ToUpperCase, Upper);
}
return operators;
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/history/HistoryFacade.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/history/HistoryFacade.java
index 81be234..d5272fe 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/history/HistoryFacade.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/history/HistoryFacade.java
@@ -108,7 +108,7 @@
}
if (timeOffsetsMap.containsKey(rootSession)) {
Long offset = (Long)timeOffsetsMap.get(rootSession);
- return System.currentTimeMillis() + offset.longValue();
+ return System.currentTimeMillis() + offset;
} else {
DatabaseQuery query =
rootSession.getPlatform().getTimestampQuery();
@@ -118,7 +118,7 @@
long endTime = System.currentTimeMillis();
long jvmTime = (endTime - startTime) / 2 + startTime;
long offset = databaseTime.getTime() - jvmTime;
- timeOffsetsMap.put(rootSession, Long.valueOf(offset));
+ timeOffsetsMap.put(rootSession, offset);
return jvmTime + offset;
}
}
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java
index 6634d20..886da8a 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java
@@ -117,14 +117,14 @@
String name = (String)operationNames.nextElement();
Long oldTime = (Long)summary.getOperationTimings().get(name);
long profileTime =
- ((Long)profile.getOperationTimings().get(name)).longValue();
+ (Long) profile.getOperationTimings().get(name);
long newTime;
if (oldTime == null) {
newTime = profileTime;
} else {
- newTime = oldTime.longValue() + profileTime;
+ newTime = oldTime + profileTime;
}
- summary.getOperationTimings().put(name, Long.valueOf(newTime));
+ summary.getOperationTimings().put(name, newTime);
}
}
@@ -168,14 +168,14 @@
String name = (String)operationNames.nextElement();
Long oldTime = (Long)summary.getOperationTimings().get(name);
long profileTime =
- ((Long)profile.getOperationTimings().get(name)).longValue();
+ (Long) profile.getOperationTimings().get(name);
long newTime;
if (oldTime == null) {
newTime = profileTime;
} else {
- newTime = oldTime.longValue() + profileTime;
+ newTime = oldTime + profileTime;
}
- summary.getOperationTimings().put(name, Long.valueOf(newTime));
+ summary.getOperationTimings().put(name, newTime);
}
}
@@ -231,14 +231,14 @@
String name = (String)operationNames.nextElement();
Long oldTime = (Long)summary.getOperationTimings().get(name);
long profileTime =
- ((Long)profile.getOperationTimings().get(name)).longValue();
+ (Long) profile.getOperationTimings().get(name);
long newTime;
if (oldTime == null) {
newTime = profileTime;
} else {
- newTime = oldTime.longValue() + profileTime;
+ newTime = oldTime + profileTime;
}
- summary.getOperationTimings().put(name, Long.valueOf(newTime));
+ summary.getOperationTimings().put(name, newTime);
}
}
diff --git a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java
index 2bea446..dc4f051 100644
--- a/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java
+++ b/foundation/org.eclipse.persistence.core.test.framework/src/main/java/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java
@@ -774,7 +774,7 @@
Class[] parameterTypes = new Class[1];
parameterTypes[0] = String[].class;
Method method = mainClass.getMethod("compile", parameterTypes);
- int result = ((Integer) method.invoke(null, params)).intValue();
+ int result = (Integer) method.invoke(null, params);
if (result != 0) {
throw new RuntimeException(
"Java code compile failed. This could either be a legitimate compile "
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/CMPPolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/CMPPolicy.java
index 2eefcae..23f7748 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/CMPPolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/CMPPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -199,7 +199,7 @@
* @param shouldForceUpdate
*/
public void setForceUpdate(boolean shouldForceUpdate) {
- this.forceUpdate = Boolean.valueOf(shouldForceUpdate);
+ this.forceUpdate = shouldForceUpdate;
}
/**
@@ -220,7 +220,7 @@
* @param shouldUpdatAllFields
*/
public void setUpdateAllFields(boolean shouldUpdatAllFields) {
- this.updateAllFields = Boolean.valueOf(shouldUpdatAllFields);
+ this.updateAllFields = shouldUpdatAllFields;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/InheritancePolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/InheritancePolicy.java
index ea816f0..9575551 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/InheritancePolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/InheritancePolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -1744,7 +1744,7 @@
* By default this is true for root inheritance descriptors, and false for all others.
*/
public void setShouldReadSubclasses(boolean shouldReadSubclasses) {
- this.shouldReadSubclasses = Boolean.valueOf(shouldReadSubclasses);
+ this.shouldReadSubclasses = shouldReadSubclasses;
}
/**
@@ -1808,7 +1808,7 @@
if (shouldReadSubclasses == null) {
return true;
}
- return shouldReadSubclasses.booleanValue();
+ return shouldReadSubclasses;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/VersionLockingPolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/VersionLockingPolicy.java
index ec5734c..7830450 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/VersionLockingPolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/VersionLockingPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -225,7 +225,7 @@
*/
@Override
public Object getBaseValue() {
- return Long.valueOf(0);
+ return 0L;
}
/**
@@ -240,7 +240,7 @@
* returns the initial locking value
*/
protected Object getInitialWriteValue(AbstractSession session) {
- return Long.valueOf(1);
+ return 1L;
}
/**
@@ -322,7 +322,7 @@
// If null, was an insert, use 0.
if (newWriteLockFieldValue == null) {
- newWriteLockFieldValue = Long.valueOf(0);
+ newWriteLockFieldValue = 0L;
}
if (isStoredInCache()) {
@@ -331,7 +331,7 @@
writeLockFieldValue = (Number)lockValueFromObject(domainObject);
}
if (writeLockFieldValue == null){
- writeLockFieldValue = Long.valueOf(0);
+ writeLockFieldValue = 0L;
}
return (int)(newWriteLockFieldValue.longValue() - writeLockFieldValue.longValue());
}
@@ -385,7 +385,7 @@
* Adds 1 to the value passed in.
*/
protected Number incrementWriteLockValue(Number numberValue) {
- return Long.valueOf(numberValue.longValue() + 1);
+ return numberValue.longValue() + 1;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/eis/EISAccessor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/eis/EISAccessor.java
index 4f9c1f2..18b4948 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/eis/EISAccessor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/eis/EISAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -182,9 +182,9 @@
session.log(SessionLog.FINEST, SessionLog.QUERY, "adapter_result", output);
if (eisCall.isNothingReturned()) {
if (success) {
- result = Integer.valueOf(1);
+ result = 1;
} else {
- result = Integer.valueOf(0);
+ result = 0;
}
// Fire the output parameter row to allow app to handle return value.
if (output != null) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DatabaseException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DatabaseException.java
index fd17df7..11e1598 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DatabaseException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DatabaseException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -112,7 +112,7 @@
}
public static DatabaseException couldNotConvertObjectType(int type) {
- Object[] args = { CR, Integer.valueOf(type) };
+ Object[] args = { CR, type};
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, COULD_NOT_CONVERT_OBJECT_TYPE, args));
databaseException.setErrorCode(COULD_NOT_CONVERT_OBJECT_TYPE);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java
index 088f58f..43247fe 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -815,7 +815,7 @@
}
public static DescriptorException invalidDescriptorEventCode(DescriptorEvent event, ClassDescriptor descriptor) {
- Object[] args = { Integer.valueOf(event.getEventCode()) };
+ Object[] args = {event.getEventCode()};
DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, INVALID_DESCRIPTOR_EVENT_CODE, args), descriptor);
descriptorException.setErrorCode(INVALID_DESCRIPTOR_EVENT_CODE);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/EclipseLinkException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/EclipseLinkException.java
index b440fcc..8bf7740 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/EclipseLinkException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/EclipseLinkException.java
@@ -242,7 +242,7 @@
* in the stack trace or the exception message of EclipseLinkExceptions
*/
public static void setShouldPrintInternalException(boolean printException) {
- shouldPrintInternalException = Boolean.valueOf(printException);
+ shouldPrintInternalException = printException;
}
/**
@@ -255,7 +255,7 @@
if (shouldPrintInternalException == null) {
shouldPrintInternalException = Boolean.FALSE;
}
- return shouldPrintInternalException.booleanValue();
+ return shouldPrintInternalException;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/QueryException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/QueryException.java
index 0263de1..caadcbf 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/QueryException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/QueryException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -286,7 +286,7 @@
}
public static QueryException backupCloneIsDeleted(Object clone) {
- Object[] args = { clone, clone.getClass(), Integer.valueOf(System.identityHashCode(clone)), CR };
+ Object[] args = { clone, clone.getClass(), System.identityHashCode(clone), CR };
QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, BACKUP_CLONE_DELETED, args));
queryException.setErrorCode(BACKUP_CLONE_DELETED);
@@ -295,7 +295,7 @@
public static QueryException backupCloneIsOriginalFromParent(Object clone) {
// need to be verified
- Object[] args = { clone, clone.getClass(), Integer.valueOf(System.identityHashCode(clone)), CR };
+ Object[] args = { clone, clone.getClass(), System.identityHashCode(clone), CR };
QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, BACKUP_CLONE_IS_ORIGINAL_FROM_PARENT, args));
queryException.setErrorCode(BACKUP_CLONE_IS_ORIGINAL_FROM_PARENT);
@@ -303,7 +303,7 @@
}
public static QueryException backupCloneIsOriginalFromSelf(Object clone) {
- Object[] args = { clone, clone.getClass(), Integer.valueOf(System.identityHashCode(clone)), CR };
+ Object[] args = { clone, clone.getClass(), System.identityHashCode(clone), CR };
QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, BACKUP_CLONE_IS_ORIGINAL_FROM_SELF, args));
queryException.setErrorCode(BACKUP_CLONE_IS_ORIGINAL_FROM_SELF);
@@ -1078,7 +1078,7 @@
}
public static QueryException reportQueryResultSizeMismatch(int expected, int retrieved) {
- Object[] args = { Integer.valueOf(expected), Integer.valueOf(retrieved) };
+ Object[] args = {expected, retrieved};
QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, REPORT_QUERY_RESULT_SIZE_MISMATCH, args));
queryException.setErrorCode(REPORT_QUERY_RESULT_SIZE_MISMATCH);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SDOException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SDOException.java
index b6cebb4..8b7469a 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SDOException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SDOException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -440,7 +440,7 @@
* This exception occurs only for complex single types.
*/
public static SDOException sequenceDuplicateSettingNotSupportedForComplexSingleObject(int index, String settingPropertyName) {
- Object[] args = { Integer.valueOf(index), settingPropertyName };
+ Object[] args = {index, settingPropertyName };
SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class, SEQUENCE_DUPLICATE_ADD_NOT_SUPPORTED, args));
exception.setErrorCode(SEQUENCE_DUPLICATE_ADD_NOT_SUPPORTED);
return exception;
@@ -522,7 +522,7 @@
* Exception when trying to find a property at an invalid index
*/
public static SDOException propertyNotFoundAtIndex(Exception e, int propIndex) {
- Object[] args = { Integer.valueOf(propIndex) };
+ Object[] args = {propIndex};
SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class, PROPERTY_NOT_FOUND_AT_INDEX, args), e);
exception.setErrorCode(PROPERTY_NOT_FOUND_AT_INDEX);
return exception;
@@ -578,7 +578,7 @@
* Exception trying to pass an invalid index to a method
*/
public static SDOException invalidIndex(IndexOutOfBoundsException nestedException, int index) {
- Object[] args = {Integer.valueOf(index) };
+ Object[] args = {index};
SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class, INVALID_INDEX, args),nestedException);
exception.setErrorCode(INVALID_INDEX);
return exception;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SessionLoaderException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SessionLoaderException.java
index 0e824c4..5ba4e14 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SessionLoaderException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/SessionLoaderException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -102,7 +102,7 @@
}
public static SessionLoaderException finalException(Vector exceptionList) {
- Object[] args = { Integer.valueOf(exceptionList.size()) };
+ Object[] args = {exceptionList.size()};
SessionLoaderException sessionLoaderException = new SessionLoaderException(ExceptionMessageGenerator.buildMessage(SessionLoaderException.class, FINAL_EXCEPTION, args));
sessionLoaderException.setErrorCode(FINAL_EXCEPTION);
@@ -112,7 +112,7 @@
//CR4142
public static SessionLoaderException failedToParseXML(String message, int lineNumber, int columnNumber, Throwable exception) {
- Object[] args = { message, Integer.valueOf(lineNumber), Integer.valueOf(columnNumber) };
+ Object[] args = { message, lineNumber, columnNumber};
SessionLoaderException sessionLoaderException = new SessionLoaderException(ExceptionMessageGenerator.buildMessage(SessionLoaderException.class, UNABLE_TO_PARSE_XML, args), exception);
sessionLoaderException.setErrorCode(UNABLE_TO_PARSE_XML);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/ValidationException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/ValidationException.java
index 3d936f9..7f8f12b 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/ValidationException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/ValidationException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -1959,7 +1959,7 @@
}
public static ValidationException wrongCollectionChangeEventType(int eveType) {
- Object[] args = { Integer.valueOf(eveType) };
+ Object[] args = {eveType};
ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, WRONG_COLLECTION_CHANGE_EVENT_TYPE, args));
validationException.setErrorCode(WRONG_COLLECTION_CHANGE_EVENT_TYPE);
return validationException;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/Expression.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/Expression.java
index 307d405..0a1fb4b 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/Expression.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/Expression.java
@@ -2003,7 +2003,7 @@
* Create a new expression tree with the named operator. Part of the implementation of user-level "get"
*/
public ExpressionOperator getOperator(int selector) {
- ExpressionOperator result = ExpressionOperator.getOperator(Integer.valueOf(selector));
+ ExpressionOperator result = ExpressionOperator.getOperator(selector);
if (result != null) {
return result;
}
@@ -2350,7 +2350,7 @@
List values = new ArrayList(theBytes.length);
for (int index = 0; index < theBytes.length; index++) {
- values.add(Byte.valueOf(theBytes[index]));
+ values.add(theBytes[index]);
}
return in(values);
@@ -2365,7 +2365,7 @@
List values = new ArrayList(theChars.length);
for (int index = 0; index < theChars.length; index++) {
- values.add(Character.valueOf(theChars[index]));
+ values.add(theChars[index]);
}
return in(values);
@@ -2380,7 +2380,7 @@
List values = new ArrayList(theDoubles.length);
for (int index = 0; index < theDoubles.length; index++) {
- values.add(Double.valueOf(theDoubles[index]));
+ values.add(theDoubles[index]);
}
return in(values);
@@ -2395,7 +2395,7 @@
List values = new ArrayList(theFloats.length);
for (int index = 0; index < theFloats.length; index++) {
- values.add(Float.valueOf(theFloats[index]));
+ values.add(theFloats[index]);
}
return in(values);
@@ -2410,7 +2410,7 @@
List values = new ArrayList(theInts.length);
for (int index = 0; index < theInts.length; index++) {
- values.add(Integer.valueOf(theInts[index]));
+ values.add(theInts[index]);
}
return in(values);
@@ -2425,7 +2425,7 @@
List values = new ArrayList(theLongs.length);
for (int index = 0; index < theLongs.length; index++) {
- values.add(Long.valueOf(theLongs[index]));
+ values.add(theLongs[index]);
}
return in(values);
@@ -2455,7 +2455,7 @@
List values = new ArrayList(theShorts.length);
for (int index = 0; index < theShorts.length; index++) {
- values.add(Short.valueOf(theShorts[index]));
+ values.add(theShorts[index]);
}
return in(values);
@@ -2470,7 +2470,7 @@
List values = new ArrayList(theBooleans.length);
for (int index = 0; index < theBooleans.length; index++) {
- values.add(Boolean.valueOf(theBooleans[index]));
+ values.add(theBooleans[index]);
}
return in(values);
@@ -3558,7 +3558,7 @@
List values = new ArrayList(theBytes.length);
for (int index = 0; index < theBytes.length; index++) {
- values.add(Byte.valueOf(theBytes[index]));
+ values.add(theBytes[index]);
}
return notIn(values);
@@ -3573,7 +3573,7 @@
List values = new ArrayList(theChars.length);
for (int index = 0; index < theChars.length; index++) {
- values.add(Character.valueOf(theChars[index]));
+ values.add(theChars[index]);
}
return notIn(values);
@@ -3588,7 +3588,7 @@
List values = new ArrayList(theDoubles.length);
for (int index = 0; index < theDoubles.length; index++) {
- values.add(Double.valueOf(theDoubles[index]));
+ values.add(theDoubles[index]);
}
return notIn(values);
@@ -3603,7 +3603,7 @@
List values = new ArrayList(theFloats.length);
for (int index = 0; index < theFloats.length; index++) {
- values.add(Float.valueOf(theFloats[index]));
+ values.add(theFloats[index]);
}
return notIn(values);
@@ -3618,7 +3618,7 @@
List values = new ArrayList(theInts.length);
for (int index = 0; index < theInts.length; index++) {
- values.add(Integer.valueOf(theInts[index]));
+ values.add(theInts[index]);
}
return notIn(values);
@@ -3633,7 +3633,7 @@
List values = new ArrayList(theLongs.length);
for (int index = 0; index < theLongs.length; index++) {
- values.add(Long.valueOf(theLongs[index]));
+ values.add(theLongs[index]);
}
return notIn(values);
@@ -3668,7 +3668,7 @@
List values = new ArrayList(theShorts.length);
for (int index = 0; index < theShorts.length; index++) {
- values.add(Short.valueOf(theShorts[index]));
+ values.add(theShorts[index]);
}
return notIn(values);
@@ -3683,7 +3683,7 @@
List values = new ArrayList(theBooleans.length);
for (int index = 0; index < theBooleans.length; index++) {
- values.add(Boolean.valueOf(theBooleans[index]));
+ values.add(theBooleans[index]);
}
return notIn(values);
@@ -4779,7 +4779,7 @@
List values = new ArrayList(theBytes.length);
for (int index = 0; index < theBytes.length; index++) {
- values.add(Byte.valueOf(theBytes[index]));
+ values.add(theBytes[index]);
}
return any(values);
@@ -4794,7 +4794,7 @@
List values = new ArrayList(theChars.length);
for (int index = 0; index < theChars.length; index++) {
- values.add(Character.valueOf(theChars[index]));
+ values.add(theChars[index]);
}
return any(values);
@@ -4809,7 +4809,7 @@
List values = new ArrayList(theDoubles.length);
for (int index = 0; index < theDoubles.length; index++) {
- values.add(Double.valueOf(theDoubles[index]));
+ values.add(theDoubles[index]);
}
return any(values);
@@ -4824,7 +4824,7 @@
List values = new ArrayList(theFloats.length);
for (int index = 0; index < theFloats.length; index++) {
- values.add(Float.valueOf(theFloats[index]));
+ values.add(theFloats[index]);
}
return any(values);
@@ -4839,7 +4839,7 @@
List values = new ArrayList(theInts.length);
for (int index = 0; index < theInts.length; index++) {
- values.add(Integer.valueOf(theInts[index]));
+ values.add(theInts[index]);
}
return any(values);
@@ -4854,7 +4854,7 @@
List values = new ArrayList(theLongs.length);
for (int index = 0; index < theLongs.length; index++) {
- values.add(Long.valueOf(theLongs[index]));
+ values.add(theLongs[index]);
}
return any(values);
@@ -4884,7 +4884,7 @@
List values = new ArrayList(theShorts.length);
for (int index = 0; index < theShorts.length; index++) {
- values.add(Short.valueOf(theShorts[index]));
+ values.add(theShorts[index]);
}
return any(values);
@@ -4899,7 +4899,7 @@
List values = new ArrayList(theBooleans.length);
for (int index = 0; index < theBooleans.length; index++) {
- values.add(Boolean.valueOf(theBooleans[index]));
+ values.add(theBooleans[index]);
}
return any(values);
@@ -5042,7 +5042,7 @@
List values = new ArrayList(theBytes.length);
for (int index = 0; index < theBytes.length; index++) {
- values.add(Byte.valueOf(theBytes[index]));
+ values.add(theBytes[index]);
}
return some(values);
@@ -5057,7 +5057,7 @@
List values = new ArrayList(theChars.length);
for (int index = 0; index < theChars.length; index++) {
- values.add(Character.valueOf(theChars[index]));
+ values.add(theChars[index]);
}
return some(values);
@@ -5072,7 +5072,7 @@
List values = new ArrayList(theDoubles.length);
for (int index = 0; index < theDoubles.length; index++) {
- values.add(Double.valueOf(theDoubles[index]));
+ values.add(theDoubles[index]);
}
return some(values);
@@ -5087,7 +5087,7 @@
List values = new ArrayList(theFloats.length);
for (int index = 0; index < theFloats.length; index++) {
- values.add(Float.valueOf(theFloats[index]));
+ values.add(theFloats[index]);
}
return some(values);
@@ -5102,7 +5102,7 @@
List values = new ArrayList(theInts.length);
for (int index = 0; index < theInts.length; index++) {
- values.add(Integer.valueOf(theInts[index]));
+ values.add(theInts[index]);
}
return some(values);
@@ -5117,7 +5117,7 @@
List values = new ArrayList(theLongs.length);
for (int index = 0; index < theLongs.length; index++) {
- values.add(Long.valueOf(theLongs[index]));
+ values.add(theLongs[index]);
}
return some(values);
@@ -5147,7 +5147,7 @@
List values = new ArrayList(theShorts.length);
for (int index = 0; index < theShorts.length; index++) {
- values.add(Short.valueOf(theShorts[index]));
+ values.add(theShorts[index]);
}
return some(values);
@@ -5162,7 +5162,7 @@
List values = new ArrayList(theBooleans.length);
for (int index = 0; index < theBooleans.length; index++) {
- values.add(Boolean.valueOf(theBooleans[index]));
+ values.add(theBooleans[index]);
}
return some(values);
@@ -5204,7 +5204,7 @@
List values = new ArrayList(theBytes.length);
for (int index = 0; index < theBytes.length; index++) {
- values.add(Byte.valueOf(theBytes[index]));
+ values.add(theBytes[index]);
}
return all(values);
@@ -5219,7 +5219,7 @@
List values = new ArrayList(theChars.length);
for (int index = 0; index < theChars.length; index++) {
- values.add(Character.valueOf(theChars[index]));
+ values.add(theChars[index]);
}
return all(values);
@@ -5234,7 +5234,7 @@
List values = new ArrayList(theDoubles.length);
for (int index = 0; index < theDoubles.length; index++) {
- values.add(Double.valueOf(theDoubles[index]));
+ values.add(theDoubles[index]);
}
return all(values);
@@ -5249,7 +5249,7 @@
List values = new ArrayList(theFloats.length);
for (int index = 0; index < theFloats.length; index++) {
- values.add(Float.valueOf(theFloats[index]));
+ values.add(theFloats[index]);
}
return all(values);
@@ -5264,7 +5264,7 @@
List values = new ArrayList(theInts.length);
for (int index = 0; index < theInts.length; index++) {
- values.add(Integer.valueOf(theInts[index]));
+ values.add(theInts[index]);
}
return all(values);
@@ -5279,7 +5279,7 @@
List values = new ArrayList(theLongs.length);
for (int index = 0; index < theLongs.length; index++) {
- values.add(Long.valueOf(theLongs[index]));
+ values.add(theLongs[index]);
}
return all(values);
@@ -5309,7 +5309,7 @@
List values = new ArrayList(theShorts.length);
for (int index = 0; index < theShorts.length; index++) {
- values.add(Short.valueOf(theShorts[index]));
+ values.add(theShorts[index]);
}
return all(values);
@@ -5324,7 +5324,7 @@
List values = new ArrayList(theBooleans.length);
for (int index = 0; index < theBooleans.length; index++) {
- values.add(Boolean.valueOf(theBooleans[index]));
+ values.add(theBooleans[index]);
}
return all(values);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionMath.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionMath.java
index 6b9a9a0..356b945 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionMath.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionMath.java
@@ -200,7 +200,7 @@
* Return the operator.
*/
public static ExpressionOperator getOperator(int selector) {
- ExpressionOperator result = ExpressionOperator.getOperator(Integer.valueOf(selector));
+ ExpressionOperator result = ExpressionOperator.getOperator(selector);
if (result != null) {
return result;
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionOperator.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionOperator.java
index ec3f7c5..413cf69 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionOperator.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/expressions/ExpressionOperator.java
@@ -379,7 +379,7 @@
* Add an operator to the global list of operators.
*/
public static void addOperator(ExpressionOperator exOperator) {
- allOperators.put(Integer.valueOf(exOperator.getSelector()), exOperator);
+ allOperators.put(exOperator.getSelector(), exOperator);
}
/**
@@ -426,49 +426,49 @@
} else if (this.selector == Trim) {
return ((String)source).trim();
} else if (this.selector == Length) {
- return Integer.valueOf(((String)source).length());
+ return ((String) source).length();
}
} else if (source instanceof Number) {
if (this.selector == Ceil) {
- return Double.valueOf(Math.ceil(((Number)source).doubleValue()));
+ return Math.ceil(((Number) source).doubleValue());
} else if (this.selector == Cos) {
- return Double.valueOf(Math.cos(((Number)source).doubleValue()));
+ return Math.cos(((Number) source).doubleValue());
} else if (this.selector == Abs) {
- return Double.valueOf(Math.abs(((Number)source).doubleValue()));
+ return Math.abs(((Number) source).doubleValue());
} else if (this.selector == Acos) {
- return Double.valueOf(Math.acos(((Number)source).doubleValue()));
+ return Math.acos(((Number) source).doubleValue());
} else if (this.selector == Asin) {
- return Double.valueOf(Math.asin(((Number)source).doubleValue()));
+ return Math.asin(((Number) source).doubleValue());
} else if (this.selector == Atan) {
- return Double.valueOf(Math.atan(((Number)source).doubleValue()));
+ return Math.atan(((Number) source).doubleValue());
} else if (this.selector == Exp) {
- return Double.valueOf(Math.exp(((Number)source).doubleValue()));
+ return Math.exp(((Number) source).doubleValue());
} else if (this.selector == Sqrt) {
- return Double.valueOf(Math.sqrt(((Number)source).doubleValue()));
+ return Math.sqrt(((Number) source).doubleValue());
} else if (this.selector == Floor) {
- return Double.valueOf(Math.floor(((Number)source).doubleValue()));
+ return Math.floor(((Number) source).doubleValue());
} else if (this.selector == Log) {
- return Double.valueOf(Math.log(((Number)source).doubleValue()));
+ return Math.log(((Number) source).doubleValue());
} else if ((this.selector == Power) && (arguments.size() == 1) && (arguments.get(0) instanceof Number)) {
- return Double.valueOf(Math.pow(((Number)source).doubleValue(), (((Number)arguments.get(0)).doubleValue())));
+ return Math.pow(((Number) source).doubleValue(), (((Number) arguments.get(0)).doubleValue()));
} else if (this.selector == Round) {
- return Double.valueOf(Math.round(((Number)source).doubleValue()));
+ return (double) Math.round(((Number) source).doubleValue());
} else if (this.selector == Sin) {
- return Double.valueOf(Math.sin(((Number)source).doubleValue()));
+ return Math.sin(((Number) source).doubleValue());
} else if (this.selector == Tan) {
- return Double.valueOf(Math.tan(((Number)source).doubleValue()));
+ return Math.tan(((Number) source).doubleValue());
} else if ((this.selector == Greatest) && (arguments.size() == 1) && (arguments.get(0) instanceof Number)) {
- return Double.valueOf(Math.max(((Number)source).doubleValue(), (((Number)arguments.get(0)).doubleValue())));
+ return Math.max(((Number) source).doubleValue(), (((Number) arguments.get(0)).doubleValue()));
} else if ((this.selector == Least) && (arguments.size() == 1) && (arguments.get(0) instanceof Number)) {
- return Double.valueOf(Math.min(((Number)source).doubleValue(), (((Number)arguments.get(0)).doubleValue())));
+ return Math.min(((Number) source).doubleValue(), (((Number) arguments.get(0)).doubleValue()));
} else if ((this.selector == Add) && (arguments.size() == 1) && (arguments.get(0) instanceof Number)) {
- return Double.valueOf(((Number)source).doubleValue() + (((Number)arguments.get(0)).doubleValue()));
+ return ((Number) source).doubleValue() + (((Number) arguments.get(0)).doubleValue());
} else if ((this.selector == Subtract) && (arguments.size() == 1) && (arguments.get(0) instanceof Number)) {
- return Double.valueOf(((Number)source).doubleValue() - (((Number)arguments.get(0)).doubleValue()));
+ return ((Number) source).doubleValue() - (((Number) arguments.get(0)).doubleValue());
} else if ((this.selector == Divide) && (arguments.size() == 1) && (arguments.get(0) instanceof Number)) {
- return Double.valueOf(((Number)source).doubleValue() / (((Number)arguments.get(0)).doubleValue()));
+ return ((Number) source).doubleValue() / (((Number) arguments.get(0)).doubleValue());
} else if ((this.selector == Multiply) && (arguments.size() == 1) && (arguments.get(0) instanceof Number)) {
- return Double.valueOf(((Number)source).doubleValue() * (((Number)arguments.get(0)).doubleValue()));
+ return ((Number) source).doubleValue() * (((Number) arguments.get(0)).doubleValue());
}
}
@@ -1034,7 +1034,7 @@
else if (((this.selector == Like) || (this.selector == NotLike)) && (right instanceof Vector) && (((Vector)right).size() == 1)) {
Boolean doesLikeConform = JavaPlatform.conformLike(left, ((Vector)right).get(0));
if (doesLikeConform != null) {
- if (doesLikeConform.booleanValue()) {
+ if (doesLikeConform) {
return this.selector == Like;// Negate for NotLike
} else {
return this.selector != Like;// Negate for NotLike
@@ -1045,7 +1045,7 @@
else if ((this.selector == Regexp) && (right instanceof Vector) && (((Vector)right).size() == 1)) {
Boolean doesConform = JavaPlatform.conformRegexp(left, ((Vector)right).get(0));
if (doesConform != null) {
- return doesConform.booleanValue();
+ return doesConform;
}
}
@@ -1408,7 +1408,7 @@
* Initialize a mapping to the platform operator names for usage with exceptions.
*/
public static String getPlatformOperatorName(int operator) {
- String name = (String)getPlatformOperatorNames().get(Integer.valueOf(operator));
+ String name = (String)getPlatformOperatorNames().get(operator);
if (name == null) {
name = String.valueOf(operator);
}
@@ -1429,103 +1429,103 @@
*/
public static Map<Integer, String> initializePlatformOperatorNames() {
Map<Integer, String> platformOperatorNames = new HashMap<>();
- platformOperatorNames.put(Integer.valueOf(ToUpperCase), "ToUpperCase");
- platformOperatorNames.put(Integer.valueOf(ToLowerCase), "ToLowerCase");
- platformOperatorNames.put(Integer.valueOf(Chr), "Chr");
- platformOperatorNames.put(Integer.valueOf(Concat), "Concat");
- platformOperatorNames.put(Integer.valueOf(Coalesce), "Coalesce");
- platformOperatorNames.put(Integer.valueOf(Case), "Case");
- platformOperatorNames.put(Integer.valueOf(CaseCondition), "Case(codition)");
- platformOperatorNames.put(Integer.valueOf(HexToRaw), "HexToRaw");
- platformOperatorNames.put(Integer.valueOf(Initcap), "Initcap");
- platformOperatorNames.put(Integer.valueOf(Instring), "Instring");
- platformOperatorNames.put(Integer.valueOf(Soundex), "Soundex");
- platformOperatorNames.put(Integer.valueOf(LeftPad), "LeftPad");
- platformOperatorNames.put(Integer.valueOf(LeftTrim), "LeftTrim");
- platformOperatorNames.put(Integer.valueOf(RightPad), "RightPad");
- platformOperatorNames.put(Integer.valueOf(RightTrim), "RightTrim");
- platformOperatorNames.put(Integer.valueOf(Substring), "Substring");
- platformOperatorNames.put(Integer.valueOf(SubstringSingleArg), "Substring");
- platformOperatorNames.put(Integer.valueOf(Translate), "Translate");
- platformOperatorNames.put(Integer.valueOf(Ascii), "Ascii");
- platformOperatorNames.put(Integer.valueOf(Length), "Length");
- platformOperatorNames.put(Integer.valueOf(CharIndex), "CharIndex");
- platformOperatorNames.put(Integer.valueOf(CharLength), "CharLength");
- platformOperatorNames.put(Integer.valueOf(Difference), "Difference");
- platformOperatorNames.put(Integer.valueOf(Reverse), "Reverse");
- platformOperatorNames.put(Integer.valueOf(Replicate), "Replicate");
- platformOperatorNames.put(Integer.valueOf(Right), "Right");
- platformOperatorNames.put(Integer.valueOf(Locate), "Locate");
- platformOperatorNames.put(Integer.valueOf(Locate2), "Locate");
- platformOperatorNames.put(Integer.valueOf(ToNumber), "ToNumber");
- platformOperatorNames.put(Integer.valueOf(ToChar), "ToChar");
- platformOperatorNames.put(Integer.valueOf(ToCharWithFormat), "ToChar");
- platformOperatorNames.put(Integer.valueOf(AddMonths), "AddMonths");
- platformOperatorNames.put(Integer.valueOf(DateToString), "DateToString");
- platformOperatorNames.put(Integer.valueOf(MonthsBetween), "MonthsBetween");
- platformOperatorNames.put(Integer.valueOf(NextDay), "NextDay");
- platformOperatorNames.put(Integer.valueOf(RoundDate), "RoundDate");
- platformOperatorNames.put(Integer.valueOf(AddDate), "AddDate");
- platformOperatorNames.put(Integer.valueOf(DateName), "DateName");
- platformOperatorNames.put(Integer.valueOf(DatePart), "DatePart");
- platformOperatorNames.put(Integer.valueOf(DateDifference), "DateDifference");
- platformOperatorNames.put(Integer.valueOf(TruncateDate), "TruncateDate");
- platformOperatorNames.put(Integer.valueOf(Extract), "Extract");
- platformOperatorNames.put(Integer.valueOf(Cast), "Cast");
- platformOperatorNames.put(Integer.valueOf(NewTime), "NewTime");
- platformOperatorNames.put(Integer.valueOf(Nvl), "Nvl");
- platformOperatorNames.put(Integer.valueOf(NewTime), "NewTime");
- platformOperatorNames.put(Integer.valueOf(Ceil), "Ceil");
- platformOperatorNames.put(Integer.valueOf(Cos), "Cos");
- platformOperatorNames.put(Integer.valueOf(Cosh), "Cosh");
- platformOperatorNames.put(Integer.valueOf(Abs), "Abs");
- platformOperatorNames.put(Integer.valueOf(Acos), "Acos");
- platformOperatorNames.put(Integer.valueOf(Asin), "Asin");
- platformOperatorNames.put(Integer.valueOf(Atan), "Atan");
- platformOperatorNames.put(Integer.valueOf(Exp), "Exp");
- platformOperatorNames.put(Integer.valueOf(Sqrt), "Sqrt");
- platformOperatorNames.put(Integer.valueOf(Floor), "Floor");
- platformOperatorNames.put(Integer.valueOf(Ln), "Ln");
- platformOperatorNames.put(Integer.valueOf(Log), "Log");
- platformOperatorNames.put(Integer.valueOf(Mod), "Mod");
- platformOperatorNames.put(Integer.valueOf(Power), "Power");
- platformOperatorNames.put(Integer.valueOf(Round), "Round");
- platformOperatorNames.put(Integer.valueOf(Sign), "Sign");
- platformOperatorNames.put(Integer.valueOf(Sin), "Sin");
- platformOperatorNames.put(Integer.valueOf(Sinh), "Sinh");
- platformOperatorNames.put(Integer.valueOf(Tan), "Tan");
- platformOperatorNames.put(Integer.valueOf(Tanh), "Tanh");
- platformOperatorNames.put(Integer.valueOf(Trunc), "Trunc");
- platformOperatorNames.put(Integer.valueOf(Greatest), "Greatest");
- platformOperatorNames.put(Integer.valueOf(Least), "Least");
- platformOperatorNames.put(Integer.valueOf(Add), "Add");
- platformOperatorNames.put(Integer.valueOf(Subtract), "Subtract");
- platformOperatorNames.put(Integer.valueOf(Divide), "Divide");
- platformOperatorNames.put(Integer.valueOf(Multiply), "Multiply");
- platformOperatorNames.put(Integer.valueOf(Atan2), "Atan2");
- platformOperatorNames.put(Integer.valueOf(Cot), "Cot");
- platformOperatorNames.put(Integer.valueOf(Deref), "Deref");
- platformOperatorNames.put(Integer.valueOf(Ref), "Ref");
- platformOperatorNames.put(Integer.valueOf(RefToHex), "RefToHex");
- platformOperatorNames.put(Integer.valueOf(Value), "Value");
- platformOperatorNames.put(Integer.valueOf(ExtractXml), "ExtractXml");
- platformOperatorNames.put(Integer.valueOf(ExtractValue), "ExtractValue");
- platformOperatorNames.put(Integer.valueOf(ExistsNode), "ExistsNode");
- platformOperatorNames.put(Integer.valueOf(GetStringVal), "GetStringVal");
- platformOperatorNames.put(Integer.valueOf(GetNumberVal), "GetNumberVal");
- platformOperatorNames.put(Integer.valueOf(IsFragment), "IsFragment");
- platformOperatorNames.put(Integer.valueOf(SDO_WITHIN_DISTANCE), "MDSYS.SDO_WITHIN_DISTANCE");
- platformOperatorNames.put(Integer.valueOf(SDO_RELATE), "MDSYS.SDO_RELATE");
- platformOperatorNames.put(Integer.valueOf(SDO_FILTER), "MDSYS.SDO_FILTER");
- platformOperatorNames.put(Integer.valueOf(SDO_NN), "MDSYS.SDO_NN");
- platformOperatorNames.put(Integer.valueOf(NullIf), "NullIf");
- platformOperatorNames.put(Integer.valueOf(Regexp), "REGEXP");
- platformOperatorNames.put(Integer.valueOf(Union), "UNION");
- platformOperatorNames.put(Integer.valueOf(UnionAll), "UNION ALL");
- platformOperatorNames.put(Integer.valueOf(Intersect), "INTERSECT");
- platformOperatorNames.put(Integer.valueOf(IntersectAll), "INTERSECT ALL");
- platformOperatorNames.put(Integer.valueOf(Except), "EXCEPT");
- platformOperatorNames.put(Integer.valueOf(ExceptAll), "EXCEPT ALL");
+ platformOperatorNames.put(ToUpperCase, "ToUpperCase");
+ platformOperatorNames.put(ToLowerCase, "ToLowerCase");
+ platformOperatorNames.put(Chr, "Chr");
+ platformOperatorNames.put(Concat, "Concat");
+ platformOperatorNames.put(Coalesce, "Coalesce");
+ platformOperatorNames.put(Case, "Case");
+ platformOperatorNames.put(CaseCondition, "Case(codition)");
+ platformOperatorNames.put(HexToRaw, "HexToRaw");
+ platformOperatorNames.put(Initcap, "Initcap");
+ platformOperatorNames.put(Instring, "Instring");
+ platformOperatorNames.put(Soundex, "Soundex");
+ platformOperatorNames.put(LeftPad, "LeftPad");
+ platformOperatorNames.put(LeftTrim, "LeftTrim");
+ platformOperatorNames.put(RightPad, "RightPad");
+ platformOperatorNames.put(RightTrim, "RightTrim");
+ platformOperatorNames.put(Substring, "Substring");
+ platformOperatorNames.put(SubstringSingleArg, "Substring");
+ platformOperatorNames.put(Translate, "Translate");
+ platformOperatorNames.put(Ascii, "Ascii");
+ platformOperatorNames.put(Length, "Length");
+ platformOperatorNames.put(CharIndex, "CharIndex");
+ platformOperatorNames.put(CharLength, "CharLength");
+ platformOperatorNames.put(Difference, "Difference");
+ platformOperatorNames.put(Reverse, "Reverse");
+ platformOperatorNames.put(Replicate, "Replicate");
+ platformOperatorNames.put(Right, "Right");
+ platformOperatorNames.put(Locate, "Locate");
+ platformOperatorNames.put(Locate2, "Locate");
+ platformOperatorNames.put(ToNumber, "ToNumber");
+ platformOperatorNames.put(ToChar, "ToChar");
+ platformOperatorNames.put(ToCharWithFormat, "ToChar");
+ platformOperatorNames.put(AddMonths, "AddMonths");
+ platformOperatorNames.put(DateToString, "DateToString");
+ platformOperatorNames.put(MonthsBetween, "MonthsBetween");
+ platformOperatorNames.put(NextDay, "NextDay");
+ platformOperatorNames.put(RoundDate, "RoundDate");
+ platformOperatorNames.put(AddDate, "AddDate");
+ platformOperatorNames.put(DateName, "DateName");
+ platformOperatorNames.put(DatePart, "DatePart");
+ platformOperatorNames.put(DateDifference, "DateDifference");
+ platformOperatorNames.put(TruncateDate, "TruncateDate");
+ platformOperatorNames.put(Extract, "Extract");
+ platformOperatorNames.put(Cast, "Cast");
+ platformOperatorNames.put(NewTime, "NewTime");
+ platformOperatorNames.put(Nvl, "Nvl");
+ platformOperatorNames.put(NewTime, "NewTime");
+ platformOperatorNames.put(Ceil, "Ceil");
+ platformOperatorNames.put(Cos, "Cos");
+ platformOperatorNames.put(Cosh, "Cosh");
+ platformOperatorNames.put(Abs, "Abs");
+ platformOperatorNames.put(Acos, "Acos");
+ platformOperatorNames.put(Asin, "Asin");
+ platformOperatorNames.put(Atan, "Atan");
+ platformOperatorNames.put(Exp, "Exp");
+ platformOperatorNames.put(Sqrt, "Sqrt");
+ platformOperatorNames.put(Floor, "Floor");
+ platformOperatorNames.put(Ln, "Ln");
+ platformOperatorNames.put(Log, "Log");
+ platformOperatorNames.put(Mod, "Mod");
+ platformOperatorNames.put(Power, "Power");
+ platformOperatorNames.put(Round, "Round");
+ platformOperatorNames.put(Sign, "Sign");
+ platformOperatorNames.put(Sin, "Sin");
+ platformOperatorNames.put(Sinh, "Sinh");
+ platformOperatorNames.put(Tan, "Tan");
+ platformOperatorNames.put(Tanh, "Tanh");
+ platformOperatorNames.put(Trunc, "Trunc");
+ platformOperatorNames.put(Greatest, "Greatest");
+ platformOperatorNames.put(Least, "Least");
+ platformOperatorNames.put(Add, "Add");
+ platformOperatorNames.put(Subtract, "Subtract");
+ platformOperatorNames.put(Divide, "Divide");
+ platformOperatorNames.put(Multiply, "Multiply");
+ platformOperatorNames.put(Atan2, "Atan2");
+ platformOperatorNames.put(Cot, "Cot");
+ platformOperatorNames.put(Deref, "Deref");
+ platformOperatorNames.put(Ref, "Ref");
+ platformOperatorNames.put(RefToHex, "RefToHex");
+ platformOperatorNames.put(Value, "Value");
+ platformOperatorNames.put(ExtractXml, "ExtractXml");
+ platformOperatorNames.put(ExtractValue, "ExtractValue");
+ platformOperatorNames.put(ExistsNode, "ExistsNode");
+ platformOperatorNames.put(GetStringVal, "GetStringVal");
+ platformOperatorNames.put(GetNumberVal, "GetNumberVal");
+ platformOperatorNames.put(IsFragment, "IsFragment");
+ platformOperatorNames.put(SDO_WITHIN_DISTANCE, "MDSYS.SDO_WITHIN_DISTANCE");
+ platformOperatorNames.put(SDO_RELATE, "MDSYS.SDO_RELATE");
+ platformOperatorNames.put(SDO_FILTER, "MDSYS.SDO_FILTER");
+ platformOperatorNames.put(SDO_NN, "MDSYS.SDO_NN");
+ platformOperatorNames.put(NullIf, "NullIf");
+ platformOperatorNames.put(Regexp, "REGEXP");
+ platformOperatorNames.put(Union, "UNION");
+ platformOperatorNames.put(UnionAll, "UNION ALL");
+ platformOperatorNames.put(Intersect, "INTERSECT");
+ platformOperatorNames.put(IntersectAll, "INTERSECT ALL");
+ platformOperatorNames.put(Except, "EXCEPT");
+ platformOperatorNames.put(ExceptAll, "EXCEPT ALL");
return platformOperatorNames;
}
@@ -1535,92 +1535,92 @@
*/
public static Map<String, Integer> initializePlatformOperatorSelectors() {
Map<String, Integer> platformOperatorNames = new HashMap<>();
- platformOperatorNames.put("ToUpperCase", Integer.valueOf(ToUpperCase));
- platformOperatorNames.put("ToLowerCase", Integer.valueOf(ToLowerCase));
- platformOperatorNames.put("Chr", Integer.valueOf(Chr));
- platformOperatorNames.put("Concat", Integer.valueOf(Concat));
- platformOperatorNames.put("Coalesce", Integer.valueOf(Coalesce));
- platformOperatorNames.put("Case", Integer.valueOf(Case));
- platformOperatorNames.put("HexToRaw", Integer.valueOf(HexToRaw));
- platformOperatorNames.put("Initcap", Integer.valueOf(Initcap));
- platformOperatorNames.put("Instring", Integer.valueOf(Instring));
- platformOperatorNames.put("Soundex", Integer.valueOf(Soundex));
- platformOperatorNames.put("LeftPad", Integer.valueOf(LeftPad));
- platformOperatorNames.put("LeftTrim", Integer.valueOf(LeftTrim));
- platformOperatorNames.put("RightPad", Integer.valueOf(RightPad));
- platformOperatorNames.put("RightTrim", Integer.valueOf(RightTrim));
- platformOperatorNames.put("Substring", Integer.valueOf(Substring));
- platformOperatorNames.put("Translate", Integer.valueOf(Translate));
- platformOperatorNames.put("Ascii", Integer.valueOf(Ascii));
- platformOperatorNames.put("Length", Integer.valueOf(Length));
- platformOperatorNames.put("CharIndex", Integer.valueOf(CharIndex));
- platformOperatorNames.put("CharLength", Integer.valueOf(CharLength));
- platformOperatorNames.put("Difference", Integer.valueOf(Difference));
- platformOperatorNames.put("Reverse", Integer.valueOf(Reverse));
- platformOperatorNames.put("Replicate", Integer.valueOf(Replicate));
- platformOperatorNames.put("Right", Integer.valueOf(Right));
- platformOperatorNames.put("Locate", Integer.valueOf(Locate));
- platformOperatorNames.put("ToNumber", Integer.valueOf(ToNumber));
- platformOperatorNames.put("ToChar", Integer.valueOf(ToChar));
- platformOperatorNames.put("AddMonths", Integer.valueOf(AddMonths));
- platformOperatorNames.put("DateToString", Integer.valueOf(DateToString));
- platformOperatorNames.put("MonthsBetween", Integer.valueOf(MonthsBetween));
- platformOperatorNames.put("NextDay", Integer.valueOf(NextDay));
- platformOperatorNames.put("RoundDate", Integer.valueOf(RoundDate));
- platformOperatorNames.put("AddDate", Integer.valueOf(AddDate));
- platformOperatorNames.put("DateName", Integer.valueOf(DateName));
- platformOperatorNames.put("DatePart", Integer.valueOf(DatePart));
- platformOperatorNames.put("DateDifference", Integer.valueOf(DateDifference));
- platformOperatorNames.put("TruncateDate", Integer.valueOf(TruncateDate));
- platformOperatorNames.put("NewTime", Integer.valueOf(NewTime));
- platformOperatorNames.put("Nvl", Integer.valueOf(Nvl));
- platformOperatorNames.put("NewTime", Integer.valueOf(NewTime));
- platformOperatorNames.put("Ceil", Integer.valueOf(Ceil));
- platformOperatorNames.put("Cos", Integer.valueOf(Cos));
- platformOperatorNames.put("Cosh", Integer.valueOf(Cosh));
- platformOperatorNames.put("Abs", Integer.valueOf(Abs));
- platformOperatorNames.put("Acos", Integer.valueOf(Acos));
- platformOperatorNames.put("Asin", Integer.valueOf(Asin));
- platformOperatorNames.put("Atan", Integer.valueOf(Atan));
- platformOperatorNames.put("Exp", Integer.valueOf(Exp));
- platformOperatorNames.put("Sqrt", Integer.valueOf(Sqrt));
- platformOperatorNames.put("Floor", Integer.valueOf(Floor));
- platformOperatorNames.put("Ln", Integer.valueOf(Ln));
- platformOperatorNames.put("Log", Integer.valueOf(Log));
- platformOperatorNames.put("Mod", Integer.valueOf(Mod));
- platformOperatorNames.put("Power", Integer.valueOf(Power));
- platformOperatorNames.put("Round", Integer.valueOf(Round));
- platformOperatorNames.put("Sign", Integer.valueOf(Sign));
- platformOperatorNames.put("Sin", Integer.valueOf(Sin));
- platformOperatorNames.put("Sinh", Integer.valueOf(Sinh));
- platformOperatorNames.put("Tan", Integer.valueOf(Tan));
- platformOperatorNames.put("Tanh", Integer.valueOf(Tanh));
- platformOperatorNames.put("Trunc", Integer.valueOf(Trunc));
- platformOperatorNames.put("Greatest", Integer.valueOf(Greatest));
- platformOperatorNames.put("Least", Integer.valueOf(Least));
- platformOperatorNames.put("Add", Integer.valueOf(Add));
- platformOperatorNames.put("Subtract", Integer.valueOf(Subtract));
- platformOperatorNames.put("Divide", Integer.valueOf(Divide));
- platformOperatorNames.put("Multiply", Integer.valueOf(Multiply));
- platformOperatorNames.put("Atan2", Integer.valueOf(Atan2));
- platformOperatorNames.put("Cot", Integer.valueOf(Cot));
- platformOperatorNames.put("Deref", Integer.valueOf(Deref));
- platformOperatorNames.put("Ref", Integer.valueOf(Ref));
- platformOperatorNames.put("RefToHex", Integer.valueOf(RefToHex));
- platformOperatorNames.put("Value", Integer.valueOf(Value));
- platformOperatorNames.put("Cast", Integer.valueOf(Cast));
- platformOperatorNames.put("Extract", Integer.valueOf(Extract));
- platformOperatorNames.put("ExtractXml", Integer.valueOf(ExtractXml));
- platformOperatorNames.put("ExtractValue", Integer.valueOf(ExtractValue));
- platformOperatorNames.put("ExistsNode", Integer.valueOf(ExistsNode));
- platformOperatorNames.put("GetStringVal", Integer.valueOf(GetStringVal));
- platformOperatorNames.put("GetNumberVal", Integer.valueOf(GetNumberVal));
- platformOperatorNames.put("IsFragment", Integer.valueOf(IsFragment));
- platformOperatorNames.put("SDO_WITHIN_DISTANCE", Integer.valueOf(SDO_WITHIN_DISTANCE));
- platformOperatorNames.put("SDO_RELATE", Integer.valueOf(SDO_RELATE));
- platformOperatorNames.put("SDO_FILTER", Integer.valueOf(SDO_FILTER));
- platformOperatorNames.put("SDO_NN", Integer.valueOf(SDO_NN));
- platformOperatorNames.put("NullIf", Integer.valueOf(NullIf));
+ platformOperatorNames.put("ToUpperCase", ToUpperCase);
+ platformOperatorNames.put("ToLowerCase", ToLowerCase);
+ platformOperatorNames.put("Chr", Chr);
+ platformOperatorNames.put("Concat", Concat);
+ platformOperatorNames.put("Coalesce", Coalesce);
+ platformOperatorNames.put("Case", Case);
+ platformOperatorNames.put("HexToRaw", HexToRaw);
+ platformOperatorNames.put("Initcap", Initcap);
+ platformOperatorNames.put("Instring", Instring);
+ platformOperatorNames.put("Soundex", Soundex);
+ platformOperatorNames.put("LeftPad", LeftPad);
+ platformOperatorNames.put("LeftTrim", LeftTrim);
+ platformOperatorNames.put("RightPad", RightPad);
+ platformOperatorNames.put("RightTrim", RightTrim);
+ platformOperatorNames.put("Substring", Substring);
+ platformOperatorNames.put("Translate", Translate);
+ platformOperatorNames.put("Ascii", Ascii);
+ platformOperatorNames.put("Length", Length);
+ platformOperatorNames.put("CharIndex", CharIndex);
+ platformOperatorNames.put("CharLength", CharLength);
+ platformOperatorNames.put("Difference", Difference);
+ platformOperatorNames.put("Reverse", Reverse);
+ platformOperatorNames.put("Replicate", Replicate);
+ platformOperatorNames.put("Right", Right);
+ platformOperatorNames.put("Locate", Locate);
+ platformOperatorNames.put("ToNumber", ToNumber);
+ platformOperatorNames.put("ToChar", ToChar);
+ platformOperatorNames.put("AddMonths", AddMonths);
+ platformOperatorNames.put("DateToString", DateToString);
+ platformOperatorNames.put("MonthsBetween", MonthsBetween);
+ platformOperatorNames.put("NextDay", NextDay);
+ platformOperatorNames.put("RoundDate", RoundDate);
+ platformOperatorNames.put("AddDate", AddDate);
+ platformOperatorNames.put("DateName", DateName);
+ platformOperatorNames.put("DatePart", DatePart);
+ platformOperatorNames.put("DateDifference", DateDifference);
+ platformOperatorNames.put("TruncateDate", TruncateDate);
+ platformOperatorNames.put("NewTime", NewTime);
+ platformOperatorNames.put("Nvl", Nvl);
+ platformOperatorNames.put("NewTime", NewTime);
+ platformOperatorNames.put("Ceil", Ceil);
+ platformOperatorNames.put("Cos", Cos);
+ platformOperatorNames.put("Cosh", Cosh);
+ platformOperatorNames.put("Abs", Abs);
+ platformOperatorNames.put("Acos", Acos);
+ platformOperatorNames.put("Asin", Asin);
+ platformOperatorNames.put("Atan", Atan);
+ platformOperatorNames.put("Exp", Exp);
+ platformOperatorNames.put("Sqrt", Sqrt);
+ platformOperatorNames.put("Floor", Floor);
+ platformOperatorNames.put("Ln", Ln);
+ platformOperatorNames.put("Log", Log);
+ platformOperatorNames.put("Mod", Mod);
+ platformOperatorNames.put("Power", Power);
+ platformOperatorNames.put("Round", Round);
+ platformOperatorNames.put("Sign", Sign);
+ platformOperatorNames.put("Sin", Sin);
+ platformOperatorNames.put("Sinh", Sinh);
+ platformOperatorNames.put("Tan", Tan);
+ platformOperatorNames.put("Tanh", Tanh);
+ platformOperatorNames.put("Trunc", Trunc);
+ platformOperatorNames.put("Greatest", Greatest);
+ platformOperatorNames.put("Least", Least);
+ platformOperatorNames.put("Add", Add);
+ platformOperatorNames.put("Subtract", Subtract);
+ platformOperatorNames.put("Divide", Divide);
+ platformOperatorNames.put("Multiply", Multiply);
+ platformOperatorNames.put("Atan2", Atan2);
+ platformOperatorNames.put("Cot", Cot);
+ platformOperatorNames.put("Deref", Deref);
+ platformOperatorNames.put("Ref", Ref);
+ platformOperatorNames.put("RefToHex", RefToHex);
+ platformOperatorNames.put("Value", Value);
+ platformOperatorNames.put("Cast", Cast);
+ platformOperatorNames.put("Extract", Extract);
+ platformOperatorNames.put("ExtractXml", ExtractXml);
+ platformOperatorNames.put("ExtractValue", ExtractValue);
+ platformOperatorNames.put("ExistsNode", ExistsNode);
+ platformOperatorNames.put("GetStringVal", GetStringVal);
+ platformOperatorNames.put("GetNumberVal", GetNumberVal);
+ platformOperatorNames.put("IsFragment", IsFragment);
+ platformOperatorNames.put("SDO_WITHIN_DISTANCE", SDO_WITHIN_DISTANCE);
+ platformOperatorNames.put("SDO_RELATE", SDO_RELATE);
+ platformOperatorNames.put("SDO_FILTER", SDO_FILTER);
+ platformOperatorNames.put("SDO_NN", SDO_NN);
+ platformOperatorNames.put("NullIf", NullIf);
return platformOperatorNames;
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/AsOfClause.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/AsOfClause.java
index 4201a52..c7a50a3 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/AsOfClause.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/AsOfClause.java
@@ -62,7 +62,7 @@
}
public AsOfClause(long time) {
- this.value = Long.valueOf(time);
+ this.value = time;
}
public AsOfClause(Long time) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/HistoryPolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/HistoryPolicy.java
index cb0ce49..77199d7 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/HistoryPolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/history/HistoryPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -109,7 +109,7 @@
}
if (getMapping() != null) {
- if (tableIndex != null && tableIndex.intValue() > 0) {
+ if (tableIndex != null && tableIndex > 0) {
return null;
}
TableExpression tableExp = null;
@@ -133,7 +133,7 @@
iLast = getHistoricalTables().size() - 1;
} else {
// only return expression for the specified table
- iFirst = tableIndex.intValue();
+ iFirst = tableIndex;
iLast = iFirst;
}
for (int i = iFirst; i <= iLast ; i++) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseAccessor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseAccessor.java
index 8b0077b..6e02a26 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseAccessor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -612,7 +612,7 @@
getActiveBatchWritingMechanism(session).appendCall(session, dbCall);
//bug 4241441: passing 1 back to avoid optimistic lock exceptions since there
// is no way to know if it succeeded on the DB at this point.
- return Integer.valueOf(1);
+ return 1;
} else {
getActiveBatchWritingMechanism(session).executeBatchedStatements(session);
}
@@ -915,7 +915,7 @@
}
}
- return Integer.valueOf(rowCount);
+ return rowCount;
}
/**
@@ -1369,23 +1369,23 @@
// Optimize numeric values to avoid conversion into big-dec and back to primitives.
if ((fieldType == ClassConstants.PLONG) || (fieldType == ClassConstants.LONG)) {
- value = Long.valueOf(resultSet.getLong(columnNumber));
- isPrimitive = ((Long)value).longValue() == 0l;
+ value = resultSet.getLong(columnNumber);
+ isPrimitive = (Long) value == 0l;
} else if ((fieldType == ClassConstants.INTEGER) || (fieldType == ClassConstants.PINT)) {
- value = Integer.valueOf(resultSet.getInt(columnNumber));
- isPrimitive = ((Integer)value).intValue() == 0;
+ value = resultSet.getInt(columnNumber);
+ isPrimitive = (Integer) value == 0;
} else if ((fieldType == ClassConstants.FLOAT) || (fieldType == ClassConstants.PFLOAT)) {
- value = Float.valueOf(resultSet.getFloat(columnNumber));
- isPrimitive = ((Float)value).floatValue() == 0f;
+ value = resultSet.getFloat(columnNumber);
+ isPrimitive = (Float) value == 0f;
} else if ((fieldType == ClassConstants.DOUBLE) || (fieldType == ClassConstants.PDOUBLE)) {
- value = Double.valueOf(resultSet.getDouble(columnNumber));
- isPrimitive = ((Double)value).doubleValue() == 0d;
+ value = resultSet.getDouble(columnNumber);
+ isPrimitive = (Double) value == 0d;
} else if ((fieldType == ClassConstants.SHORT) || (fieldType == ClassConstants.PSHORT)) {
- value = Short.valueOf(resultSet.getShort(columnNumber));
- isPrimitive = ((Short)value).shortValue() == 0;
+ value = resultSet.getShort(columnNumber);
+ isPrimitive = (Short) value == 0;
} else if ((fieldType == ClassConstants.BOOLEAN) || (fieldType == ClassConstants.PBOOLEAN)) {
- value = Boolean.valueOf(resultSet.getBoolean(columnNumber));
- isPrimitive = ((Boolean)value).booleanValue() == false;
+ value = resultSet.getBoolean(columnNumber);
+ isPrimitive = (Boolean) value == false;
} else if ((type == Types.TIME) || (type == Types.DATE) || (type == Types.TIMESTAMP)) {
if (Helper.shouldOptimizeDates) {
// Optimize dates by avoid conversion to timestamp then back to date or time or util.date.
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseCall.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseCall.java
index fa9c6aa..dbbf03e 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseCall.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabaseCall.java
@@ -564,7 +564,7 @@
if (returnsResultSet == null) {
return !shouldBuildOutputRow();
} else {
- return returnsResultSet.booleanValue();
+ return returnsResultSet;
}
}
@@ -999,7 +999,7 @@
* Use this method to tell EclipseLink that the stored procedure will be returning a JDBC ResultSet
*/
public void setReturnsResultSet(boolean returnsResultSet) {
- this.returnsResultSet = Boolean.valueOf(returnsResultSet);
+ this.returnsResultSet = returnsResultSet;
}
/**
@@ -1021,7 +1021,7 @@
* Bound calls can use prepared statement caching.
*/
public void setShouldCacheStatement(boolean shouldCacheStatement) {
- this.shouldCacheStatement = Boolean.valueOf(shouldCacheStatement);
+ this.shouldCacheStatement = shouldCacheStatement;
}
/**
@@ -1035,7 +1035,7 @@
* The call may specify that its parameters should be bound.
*/
public void setUsesBinding(boolean usesBinding) {
- this.usesBinding = Boolean.valueOf(usesBinding);
+ this.usesBinding = usesBinding;
}
/**
@@ -1063,7 +1063,7 @@
if (this.shouldCacheStatement == null) {
return databasePlatform.shouldCacheAllStatements();
} else {
- return this.shouldCacheStatement.booleanValue();
+ return this.shouldCacheStatement;
}
}
@@ -1323,7 +1323,7 @@
if (this.usesBinding == null) {
return databasePlatform.shouldBindAllParameters();
} else {
- return this.usesBinding.booleanValue();
+ return this.usesBinding;
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java
index 8e78017..ec1c0b4 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatabasePlatform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -418,7 +418,7 @@
* Appends a Boolean value as a number
*/
protected void appendBoolean(Boolean bool, Writer writer) throws IOException {
- if (bool.booleanValue()) {
+ if (bool) {
writer.write("1");
} else {
writer.write("0");
@@ -1686,12 +1686,12 @@
public Hashtable maximumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MAX_VALUE));
- values.put(Long.class, Long.valueOf(Long.MAX_VALUE));
- values.put(Double.class, Double.valueOf(Double.MAX_VALUE));
- values.put(Short.class, Short.valueOf(Short.MAX_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MAX_VALUE));
- values.put(Float.class, Float.valueOf(Float.MAX_VALUE));
+ values.put(Integer.class, Integer.MAX_VALUE);
+ values.put(Long.class, Long.MAX_VALUE);
+ values.put(Double.class, Double.MAX_VALUE);
+ values.put(Short.class, Short.MAX_VALUE);
+ values.put(Byte.class, Byte.MAX_VALUE);
+ values.put(Float.class, Float.MAX_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("999999999999999999999999999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("99999999999999999999.9999999999999999999"));
return values;
@@ -1705,12 +1705,12 @@
public Hashtable minimumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MIN_VALUE));
- values.put(Long.class, Long.valueOf(Long.MIN_VALUE));
- values.put(Double.class, Double.valueOf(Double.MIN_VALUE));
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
- values.put(Float.class, Float.valueOf(Float.MIN_VALUE));
+ values.put(Integer.class, Integer.MIN_VALUE);
+ values.put(Long.class, Long.MIN_VALUE);
+ values.put(Double.class, Double.MIN_VALUE);
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
+ values.put(Float.class, Float.MIN_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("-99999999999999999999999999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("-9999999999999999999.9999999999999999999"));
return values;
@@ -1759,7 +1759,7 @@
int nBoundParameters = 0;
writer.write("(");
for (int i = 0; i < theObjects.length; i++) {
- nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, Integer.valueOf(theObjects[i]));
+ nBoundParameters = nBoundParameters + appendParameterInternal(call, writer, theObjects[i]);
if (i < (theObjects.length - 1)) {
writer.write(", ");
}
@@ -2141,7 +2141,7 @@
* With the value of false, outerjoins are performed in the from clause.
*/
public void setPrintOuterJoinInWhereClause(boolean printOuterJoinInWhereClause) {
- this.printOuterJoinInWhereClause = Boolean.valueOf(printOuterJoinInWhereClause);
+ this.printOuterJoinInWhereClause = printOuterJoinInWhereClause;
}
/**
@@ -2151,7 +2151,7 @@
* if false, inner joins are printed in the FROM clause.
*/
public void setPrintInnerJoinInWhereClause(boolean printInnerJoinInWhereClause) {
- this.printInnerJoinInWhereClause = Boolean.valueOf(printInnerJoinInWhereClause);
+ this.printInnerJoinInWhereClause = printInnerJoinInWhereClause;
}
public void setUsesStringBinding(boolean aBool) {
@@ -2585,7 +2585,7 @@
java.sql.Timestamp ts = java.sql.Timestamp.valueOf(java.time.LocalDateTime.of(java.time.LocalDate.ofEpochDay(0), ot.toLocalTime()));
statement.setTimestamp(index, ts);
} else if (parameter instanceof Boolean) {
- statement.setBoolean(index, ((Boolean) parameter).booleanValue());
+ statement.setBoolean(index, (Boolean) parameter);
} else if (parameter == null) {
// Normally null is passed as a DatabaseField so the type is included, but in some case may be passed directly.
statement.setNull(index, getJDBCType((Class)null));
@@ -2690,7 +2690,7 @@
java.sql.Timestamp ts = java.sql.Timestamp.valueOf(java.time.LocalDateTime.of(java.time.LocalDate.ofEpochDay(0), ot.toLocalTime()));
statement.setTimestamp(name, ts);
} else if (parameter instanceof Boolean) {
- statement.setBoolean(name, ((Boolean) parameter).booleanValue());
+ statement.setBoolean(name, (Boolean) parameter);
} else if (parameter == null) {
// Normally null is passed as a DatabaseField so the type is included, but in some case may be passed directly.
statement.setNull(name, getJDBCType((Class)null));
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourceCall.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourceCall.java
index 519e1f6..c5969ae 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourceCall.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourceCall.java
@@ -60,15 +60,15 @@
// The parameter types determine if the parameter is a modify, translation or literal type.
protected List<Integer> parameterTypes;
- public static final Integer LITERAL = Integer.valueOf(1);
- public static final Integer MODIFY = Integer.valueOf(2);
- public static final Integer TRANSLATION = Integer.valueOf(3);
- public static final Integer CUSTOM_MODIFY = Integer.valueOf(4);
- public static final Integer OUT = Integer.valueOf(5);
- public static final Integer INOUT = Integer.valueOf(6);
- public static final Integer IN = Integer.valueOf(7);
- public static final Integer OUT_CURSOR = Integer.valueOf(8);
- public static final Integer INLINE = Integer.valueOf(9);
+ public static final Integer LITERAL = 1;
+ public static final Integer MODIFY = 2;
+ public static final Integer TRANSLATION = 3;
+ public static final Integer CUSTOM_MODIFY = 4;
+ public static final Integer OUT = 5;
+ public static final Integer INOUT = 6;
+ public static final Integer IN = 7;
+ public static final Integer OUT_CURSOR = 8;
+ public static final Integer INLINE = 9;
// Store if the call has been prepared.
protected boolean isPrepared;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java
index 0199811..ab4163f 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java
@@ -90,7 +90,7 @@
protected String endDelimiter = null;
/** Ensures that only one thread at a time can add/remove sequences */
- protected Object sequencesLock = Boolean.valueOf(true);
+ protected Object sequencesLock = Boolean.TRUE;
/** If the native sequence type is not supported, if table sequencing should be used. */
protected boolean defaultNativeSequenceToTable;
@@ -133,7 +133,7 @@
}
protected void addOperator(ExpressionOperator operator) {
- platformOperators.put(Integer.valueOf(operator.getSelector()), operator);
+ platformOperators.put(operator.getSelector(), operator);
}
/**
@@ -295,7 +295,7 @@
* Return the operator for the operator constant defined in ExpressionOperator.
*/
public ExpressionOperator getOperator(int selector) {
- return (ExpressionOperator)getPlatformOperators().get(Integer.valueOf(selector));
+ return (ExpressionOperator)getPlatformOperators().get(selector);
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/InstanceVariableAttributeAccessor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/InstanceVariableAttributeAccessor.java
index 37e8883..b3f52ba 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/InstanceVariableAttributeAccessor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/InstanceVariableAttributeAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -164,12 +164,12 @@
if (org.eclipse.persistence.internal.helper.Helper.isPrimitiveWrapper(fieldClass)) {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
- AccessController.doPrivileged(new PrivilegedSetValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(Integer.valueOf(0), fieldClass)));
+ AccessController.doPrivileged(new PrivilegedSetValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(0, fieldClass)));
} catch (PrivilegedActionException exc) {
throw DescriptorException.nullPointerWhileSettingValueThruInstanceVariableAccessor(getAttributeName(), null, exc.getException());
}
} else {
- org.eclipse.persistence.internal.security.PrivilegedAccessHelper.setValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(Integer.valueOf(0), fieldClass));
+ org.eclipse.persistence.internal.security.PrivilegedAccessHelper.setValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(0, fieldClass));
}
}
return;
@@ -214,12 +214,12 @@
if (org.eclipse.persistence.internal.helper.Helper.isPrimitiveWrapper(fieldClass)) {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
- AccessController.doPrivileged(new PrivilegedSetValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(Integer.valueOf(0), fieldClass)));
+ AccessController.doPrivileged(new PrivilegedSetValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(0, fieldClass)));
} catch (PrivilegedActionException exc) {
throw DescriptorException.nullPointerWhileSettingValueThruInstanceVariableAccessor(getAttributeName(), null, exc.getException());
}
} else {
- org.eclipse.persistence.internal.security.PrivilegedAccessHelper.setValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(Integer.valueOf(0), fieldClass));
+ org.eclipse.persistence.internal.security.PrivilegedAccessHelper.setValueInField(this.attributeField, anObject, ConversionManager.getDefaultManager().convertObject(0, fieldClass));
}
}
} else {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/MethodAttributeAccessor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/MethodAttributeAccessor.java
index c88da78..8b0cc1b 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/MethodAttributeAccessor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/MethodAttributeAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -296,7 +296,7 @@
//Found when fixing Bug2910086
if (fieldClass.isPrimitive() && (attributeValue == null)) {
- parameters[parameters.length-1] = ConversionManager.getDefaultManager().convertObject(Integer.valueOf(0), fieldClass);
+ parameters[parameters.length-1] = ConversionManager.getDefaultManager().convertObject(0, fieldClass);
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
AccessController.doPrivileged(new PrivilegedMethodInvoker(getSetMethod(), domainObject, parameters));
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java
index 7f61824..66cf0e4 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/descriptors/ObjectBuilder.java
@@ -4373,7 +4373,7 @@
if ((attributeValue != null) && mapping.isForeignReferenceMapping() && ((ForeignReferenceMapping)mapping).usesIndirection() && (!((ForeignReferenceMapping)mapping).getIndirectionPolicy().objectIsInstantiated(attributeValue))) {
if (mapping.isObjectReferenceMapping() && ((ObjectReferenceMapping)mapping).isForeignKeyRelationship() && !mapping.isPrimaryKeyMapping()) {
if (isUntriggeredResultSetRecord == null) {
- isUntriggeredResultSetRecord = Boolean.valueOf(databaseRow instanceof ResultSetRecord && ((ResultSetRecord)databaseRow).hasResultSet());
+ isUntriggeredResultSetRecord = databaseRow instanceof ResultSetRecord && ((ResultSetRecord) databaseRow).hasResultSet();
}
if (isUntriggeredResultSetRecord) {
for (DatabaseField field : mapping.getFields()) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/ArgumentListFunctionExpression.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/ArgumentListFunctionExpression.java
index 8f9c966..da46162 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/ArgumentListFunctionExpression.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/ArgumentListFunctionExpression.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -51,7 +51,7 @@
*/
@Override
public synchronized void addChild(Expression argument){
- if (hasLastChild != null && hasLastChild.booleanValue()){
+ if (hasLastChild != null && hasLastChild){
getChildren().add(getChildren().size() - 1, argument);
} else {
super.addChild(argument);
@@ -68,7 +68,7 @@
* @param argument
*/
public synchronized void addRightMostChild(Expression argument){
- if (hasLastChild != null && hasLastChild.booleanValue()){
+ if (hasLastChild != null && hasLastChild){
getChildren().remove(super.getChildren().size() - 1);
super.addChild(argument);
} else {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/FunctionExpression.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/FunctionExpression.java
index 73eeddf..030f8ca 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/FunctionExpression.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/FunctionExpression.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -483,7 +483,7 @@
// some db (derby) require that in EXIST(SELECT...) subquery returns a single column
subQuery.getItems().clear();
- subQuery.addItem("one", new ConstantExpression(Integer.valueOf(1), subQuery.getExpressionBuilder()));
+ subQuery.addItem("one", new ConstantExpression(1, subQuery.getExpressionBuilder()));
Expression subSelectCriteria = subQuery.getSelectionCriteria();
ExpressionBuilder subBuilder = subQuery.getExpressionBuilder();
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/MapEntryExpression.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/MapEntryExpression.java
index db94d5a..637b166 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/MapEntryExpression.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/MapEntryExpression.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -260,7 +260,7 @@
return containerPolicy.isMapKeyAttribute();
}
- return isAttributeExpression.booleanValue();
+ return isAttributeExpression;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/QueryKeyExpression.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/QueryKeyExpression.java
index a5edaf4..b7eb2c7 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/QueryKeyExpression.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/QueryKeyExpression.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -629,21 +629,21 @@
}
QueryKey queryKey = getQueryKeyOrNull();
if (queryKey != null) {
- isAttributeExpression = Boolean.valueOf(queryKey.isDirectQueryKey());
+ isAttributeExpression = queryKey.isDirectQueryKey();
} else {
DatabaseMapping mapping = getMapping();
if (mapping != null) {
if (mapping.isVariableOneToOneMapping()) {
throw QueryException.cannotQueryAcrossAVariableOneToOneMapping(mapping, mapping.getDescriptor());
} else {
- isAttributeExpression = Boolean.valueOf(mapping.isDirectToFieldMapping());
+ isAttributeExpression = mapping.isDirectToFieldMapping();
}
} else {
isAttributeExpression = Boolean.FALSE;
}
}
}
- return isAttributeExpression.booleanValue();
+ return isAttributeExpression;
}
@Override
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/RelationExpression.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/RelationExpression.java
index 4429f20..edb9f3c 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/RelationExpression.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/RelationExpression.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -502,10 +502,10 @@
if ((mapping != null) && (mapping.isDirectCollectionMapping()) && !(this.secondChild.isMapEntryExpression())) {
this.isObjectComparisonExpression = Boolean.FALSE;
} else {
- this.isObjectComparisonExpression = Boolean.valueOf(this.firstChild.isObjectExpression()
+ this.isObjectComparisonExpression = this.firstChild.isObjectExpression()
|| this.firstChild.isValueExpression()
|| this.firstChild.isSubSelectExpression()
- || (this.firstChild.isFunctionExpression() && ((FunctionExpression)this.firstChild).operator.isAnyOrAll()));
+ || (this.firstChild.isFunctionExpression() && ((FunctionExpression) this.firstChild).operator.isAnyOrAll());
}
} else {
this.isObjectComparisonExpression = Boolean.FALSE;
@@ -515,14 +515,14 @@
if ((mapping != null) && (mapping.isDirectCollectionMapping()) && !(this.firstChild.isMapEntryExpression())) {
this.isObjectComparisonExpression = Boolean.FALSE;
} else {
- this.isObjectComparisonExpression = Boolean.valueOf(this.secondChild.isObjectExpression()
+ this.isObjectComparisonExpression = this.secondChild.isObjectExpression()
|| this.secondChild.isValueExpression()
|| this.secondChild.isSubSelectExpression()
- || (this.secondChild.isFunctionExpression() && ((FunctionExpression)this.secondChild).operator.isAnyOrAll()));
+ || (this.secondChild.isFunctionExpression() && ((FunctionExpression) this.secondChild).operator.isAnyOrAll());
}
}
}
- return this.isObjectComparisonExpression.booleanValue();
+ return this.isObjectComparisonExpression;
}
/**
@@ -717,7 +717,7 @@
// some db (derby) require that in EXIST(SELECT...) subquery returns a single column
subQuery.getItems().clear();
- subQuery.addItem("one", new ConstantExpression(Integer.valueOf(1), subQuery.getExpressionBuilder()));
+ subQuery.addItem("one", new ConstantExpression(1, subQuery.getExpressionBuilder()));
Expression subSelectCriteria = subQuery.getSelectionCriteria();
ExpressionBuilder subBuilder = subQuery.getExpressionBuilder();
@@ -752,7 +752,7 @@
// some db (derby) require that in EXIST(SELECT...) subquery returns a single column
subQuery.getItems().clear();
- subQuery.addItem("one", new ConstantExpression(Integer.valueOf(1), subQuery.getExpressionBuilder()));
+ subQuery.addItem("one", new ConstantExpression(1, subQuery.getExpressionBuilder()));
Expression subSelectCriteria = subQuery.getSelectionCriteria();
ExpressionBuilder subBuilder = subQuery.getExpressionBuilder();
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/SQLSelectStatement.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/SQLSelectStatement.java
index f51368f..f802b2e 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/SQLSelectStatement.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/expressions/SQLSelectStatement.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -434,11 +434,11 @@
}
TreeMap indexToExpressionMap = new TreeMap();
mapTableIndexToExpression(holder.outerJoinedMappingCriteria, indexToExpressionMap, tablesInOrder);
- Expression sourceToRelationJoin = (Expression)indexToExpressionMap.get(Integer.valueOf(1));
- Expression relationToTargetJoin = (Expression)indexToExpressionMap.get(Integer.valueOf(2));
+ Expression sourceToRelationJoin = (Expression)indexToExpressionMap.get(1);
+ Expression relationToTargetJoin = (Expression)indexToExpressionMap.get(2);
Expression relationToKeyJoin = null;
if (isMapKeyObject) {
- relationToKeyJoin = (Expression)indexToExpressionMap.get(Integer.valueOf(3));
+ relationToKeyJoin = (Expression)indexToExpressionMap.get(3);
}
if (outerExpression.shouldUseOuterJoin()) {
@@ -2193,7 +2193,7 @@
if(expression instanceof DataExpression) {
DataExpression de = (DataExpression)expression;
if(de.getAliasedField() != null) {
- tables.add(Integer.valueOf(tablesInOrder.indexOf(de.getAliasedField().getTable())));
+ tables.add(tablesInOrder.indexOf(de.getAliasedField().getTable()));
}
return tables;
}
@@ -2255,7 +2255,7 @@
Iterator it = indexToExpressionMap.entrySet().iterator();
while(it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
- int index = ((Integer)entry.getKey()).intValue();
+ int index = (Integer) entry.getKey();
map.put(tablesInOrder.get(index), entry.getValue());
}
return map;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConcurrencyManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConcurrencyManager.java
index 725f3ac..18e1e4b 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConcurrencyManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConcurrencyManager.java
@@ -811,7 +811,7 @@
*/
@Override
public String toString() {
- Object[] args = { Integer.valueOf(getDepth()) };
+ Object[] args = {getDepth()};
return Helper.getShortClassName(getClass()) + ToStringLocalization.buildMessage("nest_level", args);
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java
index 392912b..2d62a8c 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 1998, 2020 IBM Corporation and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 IBM Corporation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -316,7 +316,7 @@
Byte[] objectBytes = (Byte[])sourceObject;
byte[] bytes = new byte[objectBytes.length];
for (int index = 0; index < objectBytes.length; index++) {
- bytes[index] = objectBytes[index].byteValue();
+ bytes[index] = objectBytes[index];
}
bigInteger = new BigInteger(bytes);
} else if (sourceObject instanceof byte[]) {
@@ -338,7 +338,7 @@
*/
protected Boolean convertObjectToBoolean(Object sourceObject) {
if (sourceObject instanceof Character) {
- switch (Character.toLowerCase(((Character)sourceObject).charValue())) {
+ switch (Character.toLowerCase((Character) sourceObject)) {
case '1':
case 't':
return Boolean.TRUE;
@@ -378,7 +378,7 @@
return Byte.valueOf((String)sourceObject);
}
if (sourceObject instanceof Number) {
- return Byte.valueOf(((Number)sourceObject).byteValue());
+ return ((Number) sourceObject).byteValue();
}
} catch (NumberFormatException exception) {
throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.BYTE, exception);
@@ -404,7 +404,7 @@
for (int index = 0; index < objectBytes.length; index++) {
Byte value = objectBytes[index];
if (value != null) {
- bytes[index] = value.byteValue();
+ bytes[index] = value;
}
}
return bytes;
@@ -447,7 +447,7 @@
byte[] bytes = convertObjectToByteArray(sourceObject);
Byte[] objectBytes = new Byte[bytes.length];
for (int index = 0; index < bytes.length; index++) {
- objectBytes[index] = Byte.valueOf(bytes[index]);
+ objectBytes[index] = bytes[index];
}
return objectBytes;
}
@@ -476,11 +476,11 @@
// ELBug336192 - Return default null value of char instead of returning null.
return (Character)getDefaultNullValue(ClassConstants.PCHAR);
}
- return Character.valueOf(((String)sourceObject).charAt(0));
+ return ((String) sourceObject).charAt(0);
}
if (sourceObject instanceof Number) {
- return Character.valueOf((char)((Number)sourceObject).byteValue());
+ return (char) ((Number) sourceObject).byteValue();
}
throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.CHAR);
@@ -493,7 +493,7 @@
String stringValue = convertObjectToString(sourceObject);
Character[] chars = new Character[stringValue.length()];
for (int index = 0; index < stringValue.length(); index++) {
- chars[index] = Character.valueOf(stringValue.charAt(index));
+ chars[index] = stringValue.charAt(index);
}
return chars;
}
@@ -506,7 +506,7 @@
Character[] objectChars = (Character[])sourceObject;
char[] chars = new char[objectChars.length];
for (int index = 0; index < objectChars.length; index++) {
- chars[index] = objectChars[index].charValue();
+ chars[index] = objectChars[index];
}
return chars;
}
@@ -576,7 +576,7 @@
return Double.valueOf((String)sourceObject);
}
if (sourceObject instanceof Number) {
- return Double.valueOf(((Number)sourceObject).doubleValue());
+ return ((Number) sourceObject).doubleValue();
}
} catch (NumberFormatException exception) {
throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.DOUBLE, exception);
@@ -595,7 +595,7 @@
return Float.valueOf((String)sourceObject);
}
if (sourceObject instanceof Number) {
- return Float.valueOf(((Number)sourceObject).floatValue());
+ return ((Number) sourceObject).floatValue();
}
} catch (NumberFormatException exception) {
throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.FLOAT, exception);
@@ -616,14 +616,14 @@
}
if (sourceObject instanceof Number) {
- return Integer.valueOf(((Number)sourceObject).intValue());
+ return ((Number) sourceObject).intValue();
}
if (sourceObject instanceof Boolean) {
- if (((Boolean)sourceObject).booleanValue()) {
- return Integer.valueOf(1);
+ if ((Boolean) sourceObject) {
+ return 1;
} else {
- return Integer.valueOf(0);
+ return 0;
}
}
} catch (NumberFormatException exception) {
@@ -645,20 +645,20 @@
return Long.valueOf((String)sourceObject);
}
if (sourceObject instanceof Number) {
- return Long.valueOf(((Number)sourceObject).longValue());
+ return ((Number) sourceObject).longValue();
}
if (sourceObject instanceof java.util.Date) {
- return Long.valueOf(((java.util.Date)sourceObject).getTime());
+ return ((java.util.Date) sourceObject).getTime();
}
if (sourceObject instanceof java.util.Calendar) {
- return Long.valueOf(((java.util.Calendar)sourceObject).getTimeInMillis());
+ return ((Calendar) sourceObject).getTimeInMillis();
}
if (sourceObject instanceof Boolean) {
- if (((Boolean)sourceObject).booleanValue()) {
- return Long.valueOf(1);
+ if ((Boolean) sourceObject) {
+ return 1L;
} else {
- return Long.valueOf(0);
+ return 0L;
}
}
} catch (NumberFormatException exception) {
@@ -687,7 +687,7 @@
}
if (sourceObject instanceof Boolean) {
- if (((Boolean)sourceObject).booleanValue()) {
+ if ((Boolean) sourceObject) {
return BigDecimal.valueOf(1);
} else {
return BigDecimal.valueOf(0);
@@ -713,14 +713,14 @@
}
if (sourceObject instanceof Number) {
- return Short.valueOf(((Number)sourceObject).shortValue());
+ return ((Number) sourceObject).shortValue();
}
if (sourceObject instanceof Boolean) {
- if (((Boolean)sourceObject).booleanValue()) {
- return Short.valueOf((short)1);
+ if ((Boolean) sourceObject) {
+ return (short) 1;
} else {
- return Short.valueOf((short)0);
+ return (short) 0;
}
}
} catch (Exception exception) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/Helper.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/Helper.java
index ae6d6dd..196f44f 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/Helper.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/Helper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -872,7 +872,7 @@
* Jan 1, 1970). Negative values represent dates prior to the epoch.
*/
public static java.sql.Date dateFromLong(Long longObject) {
- return new java.sql.Date(longObject.longValue());
+ return new java.sql.Date(longObject);
}
/**
@@ -1916,7 +1916,7 @@
* Jan 1, 1970). Negative values represent dates prior to the epoch.
*/
public static java.sql.Time timeFromLong(Long longObject) {
- return new java.sql.Time(longObject.longValue());
+ return new java.sql.Time(longObject);
}
/**
@@ -2182,7 +2182,7 @@
* Jan 1, 1970). Negative values represent dates prior to the epoch.
*/
public static java.util.Date utilDateFromLong(Long longObject) {
- return new java.util.Date(longObject.longValue());
+ return new java.util.Date(longObject);
}
/**
@@ -2248,8 +2248,8 @@
*/
public static boolean isEquivalentToNull(Object value) {
return (!isZeroValidPrimaryKey
- && (((value.getClass() == ClassConstants.LONG) && (((Long)value).longValue() == 0L))
- || ((value.getClass() == ClassConstants.INTEGER) && (((Integer)value).intValue() == 0))));
+ && (((value.getClass() == ClassConstants.LONG) && ((Long) value == 0L))
+ || ((value.getClass() == ClassConstants.INTEGER) && ((Integer) value == 0))));
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/JPAConversionManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/JPAConversionManager.java
index c5e8ab0..5a1fe08 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/JPAConversionManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/JPAConversionManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -51,17 +51,17 @@
}
if (defaultNullValue == null && theClass.isPrimitive()) {
if(Double.TYPE.equals(theClass)){
- return Double.valueOf(0D);
+ return 0D;
} else if(Long.TYPE.equals(theClass)) {
- return Long.valueOf(0L);
+ return 0L;
} else if(Character.TYPE.equals(theClass)){
- return Character.valueOf('\u0000');
+ return '\u0000';
} else if(Float.TYPE.equals(theClass)){
- return Float.valueOf(0F);
+ return 0F;
} else if(Short.TYPE.equals(theClass)){
- return Short.valueOf((short)0);
+ return (short) 0;
} else if(Byte.TYPE.equals(theClass)){
- return Byte.valueOf((byte)0);
+ return (byte) 0;
} else if(Boolean.TYPE.equals(theClass)){
return Boolean.FALSE;
} else {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/MappingCompare.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/MappingCompare.java
index 3e1d103..7705671 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/MappingCompare.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/MappingCompare.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -32,8 +32,8 @@
@Override
public int compare(Object arg1, Object arg2) {
- int arg1Value = ((DatabaseMapping)arg1).getWeight().intValue();
- int arg2Value = ((DatabaseMapping)arg2).getWeight().intValue();
+ int arg1Value = ((DatabaseMapping) arg1).getWeight();
+ int arg2Value = ((DatabaseMapping) arg2).getWeight();
if (arg1Value == arg2Value) {
int result = ((DatabaseMapping)arg1).getClass().getName().compareTo(((DatabaseMapping)arg2).getClass().getName());
// For same classes, compare attribute names.
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/identitymaps/IdentityMapManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/identitymaps/IdentityMapManager.java
index 5f47d3d..7a02858 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/identitymaps/IdentityMapManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/identitymaps/IdentityMapManager.java
@@ -394,7 +394,7 @@
}
try {
Class[] parameters = new Class[]{ClassConstants.PINT, ClassDescriptor.class, AbstractSession.class, boolean.class};
- Object[] values = new Object[]{Integer.valueOf(size), descriptor, this.session, isIsolated};
+ Object[] values = new Object[]{size, descriptor, this.session, isIsolated};
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
Constructor constructor = AccessController.doPrivileged(new PrivilegedGetConstructorFor(identityMapClass, parameters, false));
IdentityMap map = (IdentityMap)AccessController.doPrivileged(new PrivilegedInvokeConstructor(constructor, values));
@@ -1353,7 +1353,7 @@
CacheKey cacheKey = (CacheKey)cacheKeys.next();
parameters[0] = cacheKey.getObject();
writer.write(TraceLocalization.buildMessage("locked_object", parameters) + Helper.cr());
- parameters[0] = Integer.valueOf(cacheKey.getDepth());
+ parameters[0] = cacheKey.getDepth();
writer.write(TraceLocalization.buildMessage("depth", parameters) + Helper.cr());
}
DeferredLockManager deferredLockManager = ConcurrencyManager.getDeferredLockManager(activeThread);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/indirection/TransparentIndirectionPolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/indirection/TransparentIndirectionPolicy.java
index e906f00..34648af 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/indirection/TransparentIndirectionPolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/indirection/TransparentIndirectionPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -115,7 +115,7 @@
}
if (container instanceof IndirectCollection){
if (this.useLazyInstantiation != null){
- ((IndirectCollection)container).setUseLazyInstantiation(this.useLazyInstantiation.booleanValue());
+ ((IndirectCollection)container).setUseLazyInstantiation(this.useLazyInstantiation);
}
}
return container;
@@ -316,7 +316,7 @@
*/
protected static int getDefaultContainerSize() {
//3732
- return defaultContainerSize.intValue();
+ return defaultContainerSize;
}
/**
@@ -580,7 +580,7 @@
*/
public static void setDefaultContainerSize(int defaultSize) {
//3732
- defaultContainerSize = Integer.valueOf(defaultSize);
+ defaultContainerSize = defaultSize;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/BooleanLiteralNode.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/BooleanLiteralNode.java
index ebb664b..70838a5 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/BooleanLiteralNode.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/BooleanLiteralNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -33,7 +33,7 @@
}
public BooleanLiteralNode(boolean thisBoolean) {
- setLiteral(Boolean.valueOf(thisBoolean));
+ setLiteral(thisBoolean);
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/ExistsNode.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/ExistsNode.java
index 6859905..d200875 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/ExistsNode.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/ExistsNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -80,7 +80,7 @@
reportQuery.addNonFetchJoinedAttribute(expr);
}
reportQuery.clearItems();
- Expression one = new ConstantExpression(Integer.valueOf(1), new ExpressionBuilder());
+ Expression one = new ConstantExpression(1, new ExpressionBuilder());
reportQuery.addItem("one", one);
reportQuery.dontUseDistinct();
Expression expr = context.getBaseExpression();
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/UnaryMinus.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/UnaryMinus.java
index fcb92de..62991f7 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/UnaryMinus.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/jpa/parsing/UnaryMinus.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -57,7 +57,7 @@
*/
@Override
public Expression generateExpression(GenerationContext context) {
- Expression whereClause = new ConstantExpression(Integer.valueOf(0), new ExpressionBuilder());
+ Expression whereClause = new ConstantExpression(0, new ExpressionBuilder());
whereClause = ExpressionMath.subtract(whereClause, getLeft().generateExpression(context));
return whereClause;
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLBinaryDataHelper.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLBinaryDataHelper.java
index 26f0d5f..3cbd488 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLBinaryDataHelper.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLBinaryDataHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -180,7 +180,7 @@
public EncodedData getBytesFromByteObjectArray(Byte[] bytes, String mimeType) {
byte[] data = new byte[bytes.length];
for (int i = 0; i < data.length; i++) {
- data[i] = bytes[i].byteValue();
+ data[i] = bytes[i];
}
return new EncodedData(data, mimeType);
}
@@ -258,7 +258,7 @@
Byte[] objectBytes = (Byte[]) obj;
byte[] bytes = new byte[objectBytes.length];
for (int i = 0; i < objectBytes.length; i++) {
- bytes[i] = objectBytes[i].byteValue();
+ bytes[i] = objectBytes[i];
}
try {
return new MimeMultipart(new ByteArrayDataSource(bytes, "multipart/mixed"));
@@ -295,7 +295,7 @@
Byte[] objectBytes = (Byte[]) obj;
byte[] bytes = new byte[objectBytes.length];
for (int i = 0; i < objectBytes.length; i++) {
- bytes[i] = objectBytes[i].byteValue();
+ bytes[i] = objectBytes[i];
}
ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
try {
@@ -405,7 +405,7 @@
Byte[] objectBytes = (Byte[]) obj;
byte[] bytes = new byte[objectBytes.length];
for (int i = 0; i < objectBytes.length; i++) {
- bytes[i] = objectBytes[i].byteValue();
+ bytes[i] = objectBytes[i];
}
return new ByteArraySource(bytes);
} else if(obj instanceof InputStream) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLConversionManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLConversionManager.java
index a1877be..838a679 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLConversionManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLConversionManager.java
@@ -354,7 +354,7 @@
if(sourceObject instanceof String && isNumericQName(schemaTypeQName)){
int integer = Integer.parseInt((String)sourceObject);
- return Character.valueOf((char)integer);
+ return (char) integer;
}
@@ -583,9 +583,9 @@
if(((String) sourceObject).length() == 0) {
return 0d;
}else if(Constants.POSITIVE_INFINITY.equals(sourceObject)){
- return Double.valueOf(Double.POSITIVE_INFINITY);
+ return Double.POSITIVE_INFINITY;
}else if(Constants.NEGATIVE_INFINITY.equals(sourceObject)){
- return Double.valueOf(Double.NEGATIVE_INFINITY);
+ return Double.NEGATIVE_INFINITY;
}else{
return super.convertObjectToDouble(sourceObject);
}
@@ -605,9 +605,9 @@
if(((String) sourceObject).length() == 0) {
return 0f;
} else if(Constants.POSITIVE_INFINITY.equals(sourceObject)){
- return Float.valueOf(Float.POSITIVE_INFINITY);
+ return Float.POSITIVE_INFINITY;
}else if(Constants.NEGATIVE_INFINITY.equals(sourceObject)){
- return Float.valueOf(Float.NEGATIVE_INFINITY);
+ return Float.NEGATIVE_INFINITY;
}
}
return super.convertObjectToFloat(sourceObject);
@@ -1662,7 +1662,7 @@
public String buildBase64StringFromObjectBytes(Byte[] bytes) {
byte[] primitiveBytes = new byte[bytes.length];
for (int i = 0; i < bytes.length; i++) {
- primitiveBytes[i] = bytes[i].byteValue();
+ primitiveBytes[i] = bytes[i];
}
return buildBase64StringFromBytes(primitiveBytes);
}
@@ -1670,7 +1670,7 @@
protected String buildHexStringFromObjectBytes(Byte[] bytes) {
byte[] primitiveBytes = new byte[bytes.length];
for (int i = 0; i < bytes.length; i++) {
- primitiveBytes[i] = bytes[i].byteValue();
+ primitiveBytes[i] = bytes[i];
}
return Helper.buildHexStringFromBytes(primitiveBytes);
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLObjectBuilder.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLObjectBuilder.java
index 35042e2..4f1af81 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLObjectBuilder.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/XMLObjectBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -499,7 +499,7 @@
if (isXMLDescriptor == null) {
isXMLDescriptor = getDescriptor() instanceof Descriptor;
}
- return isXMLDescriptor.booleanValue();
+ return isXMLDescriptor;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/record/UnmarshalRecordImpl.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/record/UnmarshalRecordImpl.java
index 65c8579..dfc85a3 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/record/UnmarshalRecordImpl.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/record/UnmarshalRecordImpl.java
@@ -1338,7 +1338,7 @@
if (null == oldIndex) {
newIndex = 1;
} else {
- newIndex = oldIndex.intValue() + 1;
+ newIndex = oldIndex + 1;
}
}
indexMap.put(xPathFragment, newIndex);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/ContainerPolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/ContainerPolicy.java
index e57f72e..d6c12aa 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/ContainerPolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/ContainerPolicy.java
@@ -694,7 +694,7 @@
}
Object[] arguments = new Object[1];
//Code change for 3732. No longer need to add 1 as this was for JDK 1.1
- arguments[0] = Integer.valueOf(initialCapacity);
+ arguments[0] = initialCapacity;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
return AccessController.doPrivileged(new PrivilegedInvokeConstructor(this.constructor, arguments));
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatabaseQueryMechanism.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatabaseQueryMechanism.java
index 85b1e51..88b9536 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatabaseQueryMechanism.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatabaseQueryMechanism.java
@@ -759,7 +759,7 @@
existQuery.setDescriptor(getDescriptor());
existQuery.setTranslationRow(getTranslationRow());
- doesExist = ((Boolean)getSession().executeQuery(existQuery)).booleanValue();
+ doesExist = (Boolean) getSession().executeQuery(existQuery);
}
if (!doesExist) {
@@ -937,10 +937,10 @@
OptimisticLockingPolicy policy = descriptor.getOptimisticLockingPolicy();
policy.addLockValuesToTranslationRow(writeQuery);
- if (!getModifyRow().isEmpty() || shouldModifyVersionField.booleanValue()) {
+ if (!getModifyRow().isEmpty() || shouldModifyVersionField) {
// Update the row with newer lock value.
policy.updateRowAndObjectForUpdate(writeQuery, object);
- } else if (!shouldModifyVersionField.booleanValue() && (policy instanceof VersionLockingPolicy)) {
+ } else if (!shouldModifyVersionField && (policy instanceof VersionLockingPolicy)) {
// Add the existing write lock value to the for a "read" lock (requires something to update).
((VersionLockingPolicy)policy).writeLockValueIntoRow(writeQuery, object);
}
@@ -959,7 +959,7 @@
if (QueryMonitor.shouldMonitor()) {
QueryMonitor.incrementUpdate(getWriteObjectQuery());
}
- int rowCount = updateObject().intValue();
+ int rowCount = updateObject();
if (rowCount < 1) {
if (session.hasEventManager()) {
@@ -1093,7 +1093,7 @@
if (QueryMonitor.shouldMonitor()) {
QueryMonitor.incrementUpdate(getWriteObjectQuery());
}
- int rowCount = updateObject().intValue();
+ int rowCount = updateObject();
if (rowCount < 1) {
if (session.hasEventManager()) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatasourceCallQueryMechanism.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatasourceCallQueryMechanism.java
index 46bb9ef..0d23fa4 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatasourceCallQueryMechanism.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/DatasourceCallQueryMechanism.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 1998, 2019 IBM Corporation. All rights reserved.
+ * Copyright (c) 1998, 2021 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -240,7 +240,7 @@
for (int index = getCalls().size() - 1; index >= 0; index--) {
DatasourceCall databseCall = (DatasourceCall)getCalls().elementAt(index);
Integer rowCount = (Integer)executeCall(databseCall);
- if ((index == (getCalls().size() - 1)) || (rowCount.intValue() <= 0)) {// Row count returned must be from first table or zero if any are zero.
+ if ((index == (getCalls().size() - 1)) || (rowCount <= 0)) {// Row count returned must be from first table or zero if any are zero.
returnedRowCount = rowCount;
}
}
@@ -303,7 +303,7 @@
for (int index = 0; index < getCalls().size(); index++) {
DatasourceCall databseCall = (DatasourceCall)getCalls().elementAt(index);
Integer rowCount = (Integer)executeCall(databseCall);
- if ((index == 0) || (rowCount.intValue() <= 0)) {// Row count returned must be from first table or zero if any are zero.
+ if ((index == 0) || (rowCount <= 0)) {// Row count returned must be from first table or zero if any are zero.
returnedRowCount = rowCount;
}
}
@@ -864,11 +864,11 @@
Integer rowCount;
if (result instanceof AbstractRecord) {
this.query.setProperty("output", result);
- rowCount = Integer.valueOf(1);
+ rowCount = 1;
} else {
rowCount = (Integer)result;
}
- if ((index == 0) || (rowCount.intValue() <= 0)) {// Row count returned must be from first table or zero if any are zero.
+ if ((index == 0) || (rowCount <= 0)) {// Row count returned must be from first table or zero if any are zero.
returnedRowCount = rowCount;
}
if (returnFields != null) {
@@ -881,7 +881,7 @@
// Set the return row if one was returned (Postgres).
if (result instanceof AbstractRecord) {
this.query.setProperty("output", result);
- returnedRowCount = Integer.valueOf(1);
+ returnedRowCount = 1;
} else {
returnedRowCount = (Integer)result;
}
@@ -964,7 +964,7 @@
try {
DatasourceCall databseCall = (DatasourceCall)getCalls().elementAt(index);
Integer rowCount = (Integer)executeCall(databseCall);
- if ((index == nTables*2) || (rowCount.intValue() <= 0)) {// Row count returned must be from first table or zero if any are zero.
+ if ((index == nTables*2) || (rowCount <= 0)) {// Row count returned must be from first table or zero if any are zero.
returnedRowCount = rowCount;
}
} catch (DatabaseException databaseEx) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/JoinedAttributeManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/JoinedAttributeManager.java
index 0497184..4dc54d1 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/JoinedAttributeManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/JoinedAttributeManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -348,7 +348,7 @@
final ObjectExpression localExpression = objectExpression
.getFirstNonAggregateExpressionAfterExpressionBuilder(new ArrayList(1));
if ((localExpression == objectExpression) && (mapping != null) && mapping.isForeignReferenceMapping()) {
- getJoinedMappingIndexes_().put(mapping, Integer.valueOf(currentIndex));
+ getJoinedMappingIndexes_().put(mapping, currentIndex);
}
final ClassDescriptor descriptor = mapping.getReferenceDescriptor();
int numberOfFields = 0;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/OrderedListContainerPolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/OrderedListContainerPolicy.java
index 8bf2c56..4f74e4c 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/OrderedListContainerPolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/OrderedListContainerPolicy.java
@@ -158,7 +158,7 @@
failed = true;
break;
}
- int intOrderValue = ((Integer)conversionManager.convertObject(orderValue, Integer.class)).intValue();
+ int intOrderValue = (Integer) conversionManager.convertObject(orderValue, Integer.class);
try {
// one or more elements have the same order value
if(NOT_SET != ((List)container).set(intOrderValue, elements.get(i))) {
@@ -220,13 +220,13 @@
}
try {
- if (index == null || (index.intValue() > sizeFor(container))) {
+ if (index == null || (index > sizeFor(container))) {
// The index can be larger than the size on a merge,
// so should be added to the end, it may also be null if the
// index was unknown, such as an event using the add API.
((List)container).add(object);
} else {
- ((List)container).add(index.intValue(), object);
+ ((List)container).add(index, object);
}
} catch (ClassCastException ex1) {
throw QueryException.cannotAddElement(object, container, ex1);
@@ -257,7 +257,7 @@
ListIterator iterator = (ListIterator)iteratorFor(oldList);
while (iterator.hasNext()) {
- Integer index = Integer.valueOf(iterator.nextIndex());
+ Integer index = iterator.nextIndex();
Object value = iterator.next();
oldListValueIndex.put(value, index);
oldListIndexValue.put(index, value);
@@ -270,7 +270,7 @@
// Step i - Gather the list info.
ListIterator iterator = (ListIterator)iteratorFor(newList);
while (iterator.hasNext()) {
- newListValueIndex.put(iterator.next(), Integer.valueOf(iterator.previousIndex()));
+ newListValueIndex.put(iterator.next(), iterator.previousIndex());
}
// Step ii - Go through the new list again.
@@ -284,15 +284,15 @@
// If value is null then nothing can be done with it.
if (currentObject != null) {
if (oldListValueIndex.containsKey(currentObject)) {
- int oldIndex = ((Integer) oldListValueIndex.get(currentObject)).intValue();
+ int oldIndex = (Integer) oldListValueIndex.get(currentObject);
oldListValueIndex.remove(currentObject);
if (index == oldIndex) {
- indicesToRemove.remove(Integer.valueOf(oldIndex));
+ indicesToRemove.remove(oldIndex);
offset = 0; // Reset the offset, assume we're back on track.
} else if (index == (oldIndex + offset)) {
// We're in the right spot according to the offset.
- indicesToRemove.remove(Integer.valueOf(oldIndex));
+ indicesToRemove.remove(oldIndex);
} else {
// Time to be clever and figure out why we're not in the right spot!
int movedObjects = 0;
@@ -303,7 +303,7 @@
++offset;
} else {
for (int i = oldIndex - 1; i >= index; i--) {
- Object oldObject = oldListIndexValue.get(Integer.valueOf(i));
+ Object oldObject = oldListIndexValue.get(i);
if (newListValueIndex.containsKey(oldObject)) {
++movedObjects;
} else {
@@ -321,10 +321,10 @@
} else {
// Assume we moved down unless the object that was
// here before is directly beside us.
- Object oldObject = oldListIndexValue.get(Integer.valueOf(index));
+ Object oldObject = oldListIndexValue.get(index);
if (newListValueIndex.containsKey(oldObject)) {
- if (((newListValueIndex.get(oldObject)).intValue() - index) > 1) {
+ if ((newListValueIndex.get(oldObject) - index) > 1) {
moved = false; // Assume the old object moved up.
--offset;
}
@@ -337,7 +337,7 @@
orderedObjectsToAdd.add(currentObject);
} else {
// Take us off the removed list.
- indicesToRemove.remove(Integer.valueOf(oldIndex));
+ indicesToRemove.remove(oldIndex);
}
}
} else {
@@ -626,11 +626,11 @@
try {
((List) container).remove(index);
} catch (ClassCastException ex1) {
- throw QueryException.cannotRemoveFromContainer(Integer.valueOf(index), container, this);
+ throw QueryException.cannotRemoveFromContainer(index, container, this);
} catch (IllegalArgumentException ex2) {
- throw QueryException.cannotRemoveFromContainer(Integer.valueOf(index), container, this);
+ throw QueryException.cannotRemoveFromContainer(index, container, this);
} catch (UnsupportedOperationException ex3) {
- throw QueryException.cannotRemoveFromContainer(Integer.valueOf(index), container, this);
+ throw QueryException.cannotRemoveFromContainer(index, container, this);
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/StatementQueryMechanism.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/StatementQueryMechanism.java
index 524d4da..ce24816 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/StatementQueryMechanism.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/queries/StatementQueryMechanism.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -104,7 +104,7 @@
if ((this.call == null) && (!hasMultipleCalls())) {
prepareDeleteObject();
if ((this.call == null) && (!hasMultipleCalls())) {
- return Integer.valueOf(1);// Must be 1 otherwise locking error will occur.
+ return 1;// Must be 1 otherwise locking error will occur.
}
}
@@ -454,7 +454,7 @@
if ((this.call == null) && (!hasMultipleCalls())) {
prepareUpdateObject();
if ((this.call == null) && (!hasMultipleCalls())) {
- return Integer.valueOf(1);// Must be 1 otherwise locking error will occur.
+ return 1;// Must be 1 otherwise locking error will occur.
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/RemoteConnectionSequencing.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/RemoteConnectionSequencing.java
index 30392fe..2e44ce2 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/RemoteConnectionSequencing.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/RemoteConnectionSequencing.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -35,12 +35,12 @@
protected int whenShouldAcquireValueForAll;
public static boolean masterSequencingExists(RemoteConnection con) {
- return ((Boolean)con.getSequenceNumberNamed(new SequencingFunctionCall.DoesExist())).booleanValue();
+ return (Boolean) con.getSequenceNumberNamed(new SequencingFunctionCall.DoesExist());
}
public RemoteConnectionSequencing(RemoteConnection remoteConnection) {
this.remoteConnection = remoteConnection;
- whenShouldAcquireValueForAll = ((Integer)processFunctionCall(new SequencingFunctionCall.WhenShouldAcquireValueForAll())).intValue();
+ whenShouldAcquireValueForAll = (Integer) processFunctionCall(new SequencingFunctionCall.WhenShouldAcquireValueForAll());
if (whenShouldAcquireValueForAll == UNDEFINED) {
classToShouldAcquireValueAfterInsert = new Hashtable(20);
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/SequencingManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/SequencingManager.java
index 7fc7bb2..022af71 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/SequencingManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sequencing/SequencingManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -350,14 +350,14 @@
protected void logDebugPreallocation(String seqName, Object firstSequenceValue, Vector sequences) {
if (getOwnerSession().shouldLog(SessionLog.FINEST, SessionLog.SEQUENCING)) {
// the first value has been already removed from sequences vector
- Object[] args = { seqName, Integer.valueOf(sequences.size() + 1), firstSequenceValue, sequences.lastElement() };
+ Object[] args = { seqName, sequences.size() + 1, firstSequenceValue, sequences.lastElement() };
getOwnerSession().log(SessionLog.FINEST, SessionLog.SEQUENCING, "sequencing_preallocation", args);
}
}
protected void logDebugLocalPreallocation(AbstractSession writeSession, String seqName, Vector sequences, Accessor accessor) {
if (writeSession.shouldLog(SessionLog.FINEST, SessionLog.SEQUENCING)) {
- Object[] args = { seqName, Integer.valueOf(sequences.size()), sequences.firstElement(), sequences.lastElement() };
+ Object[] args = { seqName, sequences.size(), sequences.firstElement(), sequences.lastElement() };
writeSession.log(SessionLog.FINEST, SessionLog.SEQUENCING, "sequencing_localPreallocation", args, accessor);
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/AbstractSession.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/AbstractSession.java
index 07b27b6..5c794b4 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/AbstractSession.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/AbstractSession.java
@@ -1344,7 +1344,7 @@
query.setObject(object);
query.checkDatabaseForDoesExist();
query.setIsExecutionClone(true);
- return ((Boolean)executeQuery(query)).booleanValue();
+ return (Boolean) executeQuery(query);
}
/**
@@ -1534,7 +1534,7 @@
if (value == null) {
return 0;
} else {
- return value.intValue();
+ return value;
}
}
@@ -2075,8 +2075,8 @@
result = object;
} else {
if (object instanceof Integer) {
- if (((Integer)result).intValue() != 0) {
- if (((Integer)object).intValue() != 0) {
+ if ((Integer) result != 0) {
+ if ((Integer) object != 0) {
result = object;
}
}
@@ -5061,7 +5061,7 @@
if (value == null) {
return 0;
} else {
- return value.intValue();
+ return value;
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CollectionChangeRecord.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CollectionChangeRecord.java
index 59c2dcd..4c253fe 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CollectionChangeRecord.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CollectionChangeRecord.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -512,7 +512,7 @@
if(index == null) {
throw ValidationException.collectionRemoveEventWithNoIndex(getMapping());
} else {
- currentIndexes.add(index.intValue(), newList.indexOf(obj));
+ currentIndexes.add(index, newList.indexOf(obj));
}
}
}
@@ -560,7 +560,7 @@
if(index == null) {
throw ValidationException.collectionRemoveEventWithNoIndex(getMapping());
} else {
- originalList.add(index.intValue(), obj);
+ originalList.add(index, obj);
}
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CommitManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CommitManager.java
index fe4c4e5..985e69f 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CommitManager.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/CommitManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -58,13 +58,13 @@
protected Map<Object, Integer> commitState;
/** The commit is in progress, but the row has not been written. */
- protected static final Integer PRE = Integer.valueOf(1);
+ protected static final Integer PRE = 1;
/** The commit is in progress, and the row has been written. */
- protected static final Integer POST = Integer.valueOf(2);
+ protected static final Integer POST = 2;
/** The commit is complete for the object. */
- protected static final Integer COMPLETE = Integer.valueOf(3);
+ protected static final Integer COMPLETE = 3;
/** This object should be ignored. */
- protected static final Integer IGNORE = Integer.valueOf(4);
+ protected static final Integer IGNORE = 4;
/** Set of objects that had partial row written to resolve constraints. */
protected Map shallowCommits;
@@ -677,7 +677,7 @@
*/
@Override
public String toString() {
- Object[] args = { Integer.valueOf(this.commitDepth) };
+ Object[] args = {this.commitDepth};
return Helper.getShortClassName(getClass()) + ToStringLocalization.buildMessage("commit_depth", args);
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DatabaseSessionImpl.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DatabaseSessionImpl.java
index 4c2a7ce..adde1b3 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DatabaseSessionImpl.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DatabaseSessionImpl.java
@@ -878,7 +878,7 @@
// in a persitence.xml or passed into the create EMF call).
if (getProperties().containsKey(PersistenceUnitProperties.MULTITENANT_SHARED_EMF)) {
String value = (String) getProperties().get(PersistenceUnitProperties.MULTITENANT_SHARED_EMF);
- if (!Boolean.valueOf(value)) {
+ if (!Boolean.parseBoolean(value)) {
for (String property : getMultitenantContextProperties()) {
if (! getProperties().containsKey(property)) {
throw ValidationException.multitenantContextPropertyForNonSharedEMFNotSpecified(property);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DirectCollectionChangeRecord.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DirectCollectionChangeRecord.java
index a148e08..f2ad899 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DirectCollectionChangeRecord.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/DirectCollectionChangeRecord.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -90,22 +90,22 @@
*/
public void addAdditionChange(Object key, Integer count){
if (getRemoveObjectMap().containsKey(key)) {
- int removeValue = ((Integer)getRemoveObjectMap().get(key)).intValue();
- int addition = count.intValue();
+ int removeValue = (Integer) getRemoveObjectMap().get(key);
+ int addition = count;
int result = removeValue - addition;
if (result > 0 ) { // more removes still
- getRemoveObjectMap().put(key, Integer.valueOf(result));
+ getRemoveObjectMap().put(key, result);
} else if (result < 0) { // more adds now
getRemoveObjectMap().remove(key);
- getAddObjectMap().put(key, Integer.valueOf(Math.abs(result)));
+ getAddObjectMap().put(key, Math.abs(result));
} else { // equal
getRemoveObjectMap().remove(key);
}
} else {
if (this.getAddObjectMap().containsKey(key)) {
- int addValue = ((Integer)this.getAddObjectMap().get(key)).intValue();
- addValue += count.intValue();
- this.getAddObjectMap().put(key, Integer.valueOf(addValue));
+ int addValue = (Integer) this.getAddObjectMap().get(key);
+ addValue += count;
+ this.getAddObjectMap().put(key, addValue);
} else {
this.getAddObjectMap().put(key, count);
}
@@ -117,12 +117,12 @@
}
}
// this is an attribute change track add keep count
- int addValue = count.intValue();
+ int addValue = count;
int commitValue = 0;
if (getCommitAddMap().containsKey(key)) {
- commitValue = ((Integer)getCommitAddMap().get(key)).intValue();
+ commitValue = (Integer) getCommitAddMap().get(key);
}
- getCommitAddMap().put(key, Integer.valueOf(addValue + commitValue));
+ getCommitAddMap().put(key, addValue + commitValue);
}
/**
@@ -146,22 +146,22 @@
*/
public void addRemoveChange(Object key, Integer count){
if (getAddObjectMap().containsKey(key)) {
- int removeValue = ((Integer)getAddObjectMap().get(key)).intValue();
- int addition = count.intValue();
+ int removeValue = (Integer) getAddObjectMap().get(key);
+ int addition = count;
int result = removeValue - addition;
if (result > 0 ) { // more removes still
- getAddObjectMap().put(key, Integer.valueOf(result));
+ getAddObjectMap().put(key, result);
} else if (result < 0) { // more adds now
getAddObjectMap().remove(key);
- getRemoveObjectMap().put(key, Integer.valueOf(Math.abs(result)));
+ getRemoveObjectMap().put(key, Math.abs(result));
} else { // equal
getAddObjectMap().remove(key);
}
} else {
if (this.getRemoveObjectMap().containsKey(key)){
- int addValue = ((Integer)this.getRemoveObjectMap().get(key)).intValue();
- addValue += count.intValue();
- this.getRemoveObjectMap().put(key, Integer.valueOf(addValue));
+ int addValue = (Integer) this.getRemoveObjectMap().get(key);
+ addValue += count;
+ this.getRemoveObjectMap().put(key, addValue);
} else {
this.getRemoveObjectMap().put(key, count);
}
@@ -172,12 +172,12 @@
return;
}
}
- int removeValue = count.intValue();
+ int removeValue = count;
int commitValue = 0;
if (getCommitAddMap().containsKey(key)){
- commitValue = ((Integer)getCommitAddMap().get(key)).intValue();
+ commitValue = (Integer) getCommitAddMap().get(key);
}
- getCommitAddMap().put(key, Integer.valueOf(commitValue - removeValue));
+ getCommitAddMap().put(key, commitValue - removeValue);
}
/**
@@ -211,10 +211,10 @@
*/
public void incrementDatabaseCount(Object object){
if (getCommitAddMap().containsKey(object)) {
- int count = ((Integer)getCommitAddMap().get(object)).intValue();
- getCommitAddMap().put(object, Integer.valueOf(++count));
+ int count = (Integer) getCommitAddMap().get(object);
+ getCommitAddMap().put(object, ++count);
} else {
- getCommitAddMap().put(object, Integer.valueOf(1));
+ getCommitAddMap().put(object, 1);
}
}
@@ -223,9 +223,9 @@
*/
public void decrementDatabaseCount(Object object){
if (getCommitAddMap().containsKey(object)) {
- int count = ((Integer)getCommitAddMap().get(object)).intValue();
+ int count = (Integer) getCommitAddMap().get(object);
if(count > 1) {
- getCommitAddMap().put(object, Integer.valueOf(--count));
+ getCommitAddMap().put(object, --count);
} else {
getCommitAddMap().remove(object);
}
@@ -241,7 +241,7 @@
Vector vector = new Vector();
for (Iterator iterator = getAddObjectMap().keySet().iterator(); iterator.hasNext();){
Object object = iterator.next();
- int count = ((Integer)getAddObjectMap().get(object)).intValue();
+ int count = (Integer) getAddObjectMap().get(object);
while (count > 0){
vector.add(object);
--count;
@@ -279,7 +279,7 @@
Vector vector = new Vector();
for (Iterator iterator = getRemoveObjectMap().keySet().iterator(); iterator.hasNext();){
Object object = iterator.next();
- int count = ((Integer)getRemoveObjectMap().get(object)).intValue();
+ int count = (Integer) getRemoveObjectMap().get(object);
while (count > 0){
vector.add(object);
--count;
@@ -339,7 +339,7 @@
Object removed = iterator.next();
if (!((DirectCollectionChangeRecord)mergeFromRecord).getCommitAddMap().containsKey(removed)){
// we have not recorded a change of this type in this class before so add it
- this.getCommitAddMap().put(removed, Integer.valueOf(1));
+ this.getCommitAddMap().put(removed, 1);
}
this.addRemoveChange(removed, (Integer)removeMapToMerge.get(removed));
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java
index 8855449..b25ebdf 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java
@@ -638,7 +638,7 @@
*/
public void setShouldModifyVersionField(Boolean shouldModifyVersionField) {
this.shouldModifyVersionField = shouldModifyVersionField;
- if(shouldModifyVersionField != null && shouldModifyVersionField.booleanValue()) {
+ if(shouldModifyVersionField != null && shouldModifyVersionField) {
// mark the version number as 'dirty'
// Note that at this point there is no newWriteLockValue - it will be set later.
// This flag is set to indicate that the change set WILL have changes.
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java
index bff16a0..a771be7 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/UnitOfWorkImpl.java
@@ -845,7 +845,7 @@
existQuery.setDescriptor(descriptor);
existQuery.setIsExecutionClone(true);
- return ((Boolean) executeQuery(existQuery)).booleanValue();
+ return (Boolean) executeQuery(existQuery);
}
/**
@@ -1937,7 +1937,7 @@
if (descriptor == null) {
throw DescriptorException.missingDescriptor(lockObject.getClass().toString());
}
- getOptimisticReadLockObjects().put(descriptor.getObjectBuilder().unwrapObject(lockObject, this), Boolean.valueOf(shouldModifyVersionField));
+ getOptimisticReadLockObjects().put(descriptor.getObjectBuilder().unwrapObject(lockObject, this), shouldModifyVersionField);
}
/**
@@ -3695,7 +3695,7 @@
existQuery.setIsExecutionClone(true);
existQuery.setCheckCacheFirst(true);
- if (((Boolean)executeQuery(existQuery)).booleanValue()){
+ if ((Boolean) executeQuery(existQuery)){
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("cannot_remove_detatched_entity", new Object[]{toBeDeleted}));
}//else, it is a new or previously deleted object that should be ignored (and delete should cascade)
} else {
@@ -4427,7 +4427,7 @@
existQuery.setObject(newObject);
existQuery.setDescriptor(descriptor);
existQuery.setIsExecutionClone(true);
- if (((Boolean)executeQuery(existQuery)).booleanValue()) {
+ if ((Boolean) executeQuery(existQuery)) {
throw ValidationException.cannotPersistExistingObject(newObject, this);
}
}
@@ -5829,7 +5829,7 @@
* INTERNAL:
*/
public void addPessimisticLockedClone(Object clone) {
- log(SessionLog.FINEST, SessionLog.TRANSACTION, "tracking_pl_object", clone, Integer.valueOf(this.hashCode()));
+ log(SessionLog.FINEST, SessionLog.TRANSACTION, "tracking_pl_object", clone, this.hashCode());
getPessimisticLockedObjects().put(clone, clone);
}
@@ -5994,9 +5994,9 @@
//ignore for bug 290703
}
if(accessor!=null && accessor instanceof DatasourceAccessor){
- getProperties().put(DatasourceAccessor.READ_STATEMENTS_COUNT_PROPERTY,Integer.valueOf(((DatasourceAccessor)accessor).getReadStatementsCount()));
- getProperties().put(DatasourceAccessor.WRITE_STATEMENTS_COUNT_PROPERTY,Integer.valueOf(((DatasourceAccessor)accessor).getWriteStatementsCount()));
- getProperties().put(DatasourceAccessor.STOREDPROCEDURE_STATEMENTS_COUNT_PROPERTY,Integer.valueOf(((DatasourceAccessor)accessor).getStoredProcedureStatementsCount()));
+ getProperties().put(DatasourceAccessor.READ_STATEMENTS_COUNT_PROPERTY, ((DatasourceAccessor) accessor).getReadStatementsCount());
+ getProperties().put(DatasourceAccessor.WRITE_STATEMENTS_COUNT_PROPERTY, ((DatasourceAccessor) accessor).getWriteStatementsCount());
+ getProperties().put(DatasourceAccessor.STOREDPROCEDURE_STATEMENTS_COUNT_PROPERTY, ((DatasourceAccessor) accessor).getStoredProcedureStatementsCount());
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/EclipseLinkObjectPersistenceRuntimeXMLProject.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/EclipseLinkObjectPersistenceRuntimeXMLProject.java
index 69f63a6..d7290d6 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/EclipseLinkObjectPersistenceRuntimeXMLProject.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/EclipseLinkObjectPersistenceRuntimeXMLProject.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -309,7 +309,7 @@
sqlTypeMapping.setGetMethodName("getSqlType");
sqlTypeMapping.setSetMethodName("setSqlType");
sqlTypeMapping.setXPath(getPrimaryNamespaceXPath() + "@sql-typecode");
- sqlTypeMapping.setNullValue(Integer.valueOf(NULL_SQL_TYPE));
+ sqlTypeMapping.setNullValue(NULL_SQL_TYPE);
NullPolicy nullPolicy = new NullPolicy();
nullPolicy.setNullRepresentedByEmptyNode(false);
nullPolicy.setNullRepresentedByXsiNil(false);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject.java
index 62f4f59..8c8e103 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -933,7 +933,7 @@
stringBindingSizeMapping.setGetMethodName("getStringBindingSize");
stringBindingSizeMapping.setSetMethodName("setStringBindingSize");
stringBindingSizeMapping.setXPath(getPrimaryNamespaceXPath() + "string-binding-size/text()");
- stringBindingSizeMapping.setNullValue(Integer.valueOf(255));
+ stringBindingSizeMapping.setNullValue(255);
descriptor.addMapping(stringBindingSizeMapping);
XMLDirectMapping usesStreamsForBindingMapping = new XMLDirectMapping();
@@ -1033,8 +1033,8 @@
XMLDirectMapping operatorMapping = new XMLDirectMapping();
operatorMapping.setAttributeName("operator");
ObjectTypeConverter operatorConverter = new ObjectTypeConverter();
- operatorConverter.addConversionValue("and", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.And)));
- operatorConverter.addConversionValue("or", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Or)));
+ operatorConverter.addConversionValue("and", ExpressionOperator.getOperator(ExpressionOperator.And));
+ operatorConverter.addConversionValue("or", ExpressionOperator.getOperator(ExpressionOperator.Or));
operatorMapping.setConverter(operatorConverter);
operatorMapping.setXPath("@operator");
descriptor.addMapping(operatorMapping);
@@ -1085,14 +1085,14 @@
XMLDirectMapping operatorMapping = new XMLDirectMapping();
operatorMapping.setAttributeName("operator");
ObjectTypeConverter operatorConverter = new ObjectTypeConverter();
- operatorConverter.addConversionValue("equal", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Equal)));
- operatorConverter.addConversionValue("notEqual", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotEqual)));
- operatorConverter.addConversionValue("like", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Like)));
- operatorConverter.addConversionValue("notLike", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotLike)));
- operatorConverter.addConversionValue("greaterThan", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.GreaterThan)));
- operatorConverter.addConversionValue("greaterThanEqual", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.GreaterThanEqual)));
- operatorConverter.addConversionValue("lessThan", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.LessThan)));
- operatorConverter.addConversionValue("lessThanEqual", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.LessThanEqual)));
+ operatorConverter.addConversionValue("equal", ExpressionOperator.getOperator(ExpressionOperator.Equal));
+ operatorConverter.addConversionValue("notEqual", ExpressionOperator.getOperator(ExpressionOperator.NotEqual));
+ operatorConverter.addConversionValue("like", ExpressionOperator.getOperator(ExpressionOperator.Like));
+ operatorConverter.addConversionValue("notLike", ExpressionOperator.getOperator(ExpressionOperator.NotLike));
+ operatorConverter.addConversionValue("greaterThan", ExpressionOperator.getOperator(ExpressionOperator.GreaterThan));
+ operatorConverter.addConversionValue("greaterThanEqual", ExpressionOperator.getOperator(ExpressionOperator.GreaterThanEqual));
+ operatorConverter.addConversionValue("lessThan", ExpressionOperator.getOperator(ExpressionOperator.LessThan));
+ operatorConverter.addConversionValue("lessThanEqual", ExpressionOperator.getOperator(ExpressionOperator.LessThanEqual));
operatorMapping.setConverter(operatorConverter);
operatorMapping.setXPath("@operator");
descriptor.addMapping(operatorMapping);
@@ -1253,26 +1253,26 @@
XMLDirectMapping operatorMapping = new XMLDirectMapping();
operatorMapping.setAttributeName("operator");
ExpressionOperatorConverter operatorConverter = new ExpressionOperatorConverter();
- operatorConverter.addConversionValue("like", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Like)));
- operatorConverter.addConversionValue("notLike", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotLike)));
- operatorConverter.addConversionValue("not", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Not)));
- operatorConverter.addConversionValue("isNull", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.IsNull)));
- operatorConverter.addConversionValue("notNull", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotNull)));
- operatorConverter.addConversionValue("ascending", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Ascending)));
- operatorConverter.addConversionValue("descending", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Descending)));
+ operatorConverter.addConversionValue("like", ExpressionOperator.getOperator(ExpressionOperator.Like));
+ operatorConverter.addConversionValue("notLike", ExpressionOperator.getOperator(ExpressionOperator.NotLike));
+ operatorConverter.addConversionValue("not", ExpressionOperator.getOperator(ExpressionOperator.Not));
+ operatorConverter.addConversionValue("isNull", ExpressionOperator.getOperator(ExpressionOperator.IsNull));
+ operatorConverter.addConversionValue("notNull", ExpressionOperator.getOperator(ExpressionOperator.NotNull));
+ operatorConverter.addConversionValue("ascending", ExpressionOperator.getOperator(ExpressionOperator.Ascending));
+ operatorConverter.addConversionValue("descending", ExpressionOperator.getOperator(ExpressionOperator.Descending));
// These are platform specific so not on operator.
operatorConverter.addConversionValue("upper", new ExpressionOperator(ExpressionOperator.ToUpperCase, NonSynchronizedVector.newInstance(0)));
operatorConverter.addConversionValue("lower", new ExpressionOperator(ExpressionOperator.ToLowerCase, NonSynchronizedVector.newInstance(0)));
// Aggregate functions
- operatorConverter.addConversionValue("count", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Count)));
- operatorConverter.addConversionValue("sum", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Sum)));
- operatorConverter.addConversionValue("average", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Average)));
- operatorConverter.addConversionValue("maximum", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Maximum)));
- operatorConverter.addConversionValue("minimum", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Minimum)));
+ operatorConverter.addConversionValue("count", ExpressionOperator.getOperator(ExpressionOperator.Count));
+ operatorConverter.addConversionValue("sum", ExpressionOperator.getOperator(ExpressionOperator.Sum));
+ operatorConverter.addConversionValue("average", ExpressionOperator.getOperator(ExpressionOperator.Average));
+ operatorConverter.addConversionValue("maximum", ExpressionOperator.getOperator(ExpressionOperator.Maximum));
+ operatorConverter.addConversionValue("minimum", ExpressionOperator.getOperator(ExpressionOperator.Minimum));
// standardDeviation is platform specific.
operatorConverter.addConversionValue("standardDeviation", new ExpressionOperator(ExpressionOperator.StandardDeviation, NonSynchronizedVector.newInstance(0)));
operatorConverter.addConversionValue("variance", new ExpressionOperator(ExpressionOperator.Variance, NonSynchronizedVector.newInstance(0)));
- operatorConverter.addConversionValue("distinct", ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Distinct)));
+ operatorConverter.addConversionValue("distinct", ExpressionOperator.getOperator(ExpressionOperator.Distinct));
operatorMapping.setConverter(operatorConverter);
operatorMapping.setXPath("@function");
descriptor.addMapping(operatorMapping);
@@ -1426,7 +1426,7 @@
queryTimeoutMapping.setGetMethodName("getQueryTimeout");
queryTimeoutMapping.setSetMethodName("setQueryTimeout");
queryTimeoutMapping.setXPath(getPrimaryNamespaceXPath() + "timeout/text()");
- queryTimeoutMapping.setNullValue(Integer.valueOf(DescriptorQueryManager.DefaultTimeout));
+ queryTimeoutMapping.setNullValue(DescriptorQueryManager.DefaultTimeout);
descriptor.addMapping(queryTimeoutMapping);
// feaure 2297
@@ -1471,7 +1471,7 @@
maximumCachedResultsMapping.setGetMethodName("getMaximumCachedResults");
maximumCachedResultsMapping.setSetMethodName("setMaximumCachedResults");
maximumCachedResultsMapping.setXPath(getPrimaryNamespaceXPath() + "maximum-cached-results/text()");
- maximumCachedResultsMapping.setNullValue(Integer.valueOf(100));
+ maximumCachedResultsMapping.setNullValue(100);
descriptor.addMapping(maximumCachedResultsMapping);
return descriptor;
@@ -1552,7 +1552,7 @@
maxRowsMapping.setGetMethodName("getMaxRows");
maxRowsMapping.setSetMethodName("setMaxRows");
maxRowsMapping.setXPath(getPrimaryNamespaceXPath() + "max-rows/text()");
- maxRowsMapping.setNullValue(Integer.valueOf(0));
+ maxRowsMapping.setNullValue(0);
descriptor.addMapping(maxRowsMapping);
XMLDirectMapping firstResultMapping = new XMLDirectMapping();
@@ -1560,14 +1560,14 @@
firstResultMapping.setGetMethodName("getFirstResult");
firstResultMapping.setSetMethodName("setFirstResult");
firstResultMapping.setXPath(getPrimaryNamespaceXPath() + "first-result/text()");
- firstResultMapping.setNullValue(Integer.valueOf(0));
+ firstResultMapping.setNullValue(0);
descriptor.addMapping(firstResultMapping);
XMLDirectMapping fetchSizeMapping = new XMLDirectMapping();
fetchSizeMapping.setAttributeName("fetchSize");
fetchSizeMapping.setGetMethodName("getFetchSize");
fetchSizeMapping.setSetMethodName("setFetchSize");
fetchSizeMapping.setXPath(getPrimaryNamespaceXPath() + "fetch-size/text()");
- fetchSizeMapping.setNullValue(Integer.valueOf(0));
+ fetchSizeMapping.setNullValue(0);
descriptor.addMapping(fetchSizeMapping);
XMLCompositeObjectMapping queryResultCachingPolicyMapping = new XMLCompositeObjectMapping();
@@ -1612,11 +1612,11 @@
cascadePolicyMapping.setGetMethodName("getCascadePolicy");
cascadePolicyMapping.setSetMethodName("setCascadePolicy");
ObjectTypeConverter cascadePolicyConverter = new ObjectTypeConverter();
- cascadePolicyConverter.addConversionValue("none", Integer.valueOf(DatabaseQuery.NoCascading));
- cascadePolicyConverter.addConversionValue("all", Integer.valueOf(DatabaseQuery.CascadeAllParts));
- cascadePolicyConverter.addConversionValue("private", Integer.valueOf(DatabaseQuery.CascadePrivateParts));
+ cascadePolicyConverter.addConversionValue("none", DatabaseQuery.NoCascading);
+ cascadePolicyConverter.addConversionValue("all", DatabaseQuery.CascadeAllParts);
+ cascadePolicyConverter.addConversionValue("private", DatabaseQuery.CascadePrivateParts);
cascadePolicyMapping.setConverter(cascadePolicyConverter);
- cascadePolicyMapping.setNullValue(Integer.valueOf(DatabaseQuery.NoCascading));
+ cascadePolicyMapping.setNullValue(DatabaseQuery.NoCascading);
cascadePolicyMapping.setXPath(getPrimaryNamespaceXPath() + "cascade-policy/text()");
descriptor.addMapping(cascadePolicyMapping);
@@ -1626,15 +1626,15 @@
cacheUsageMapping.setSetMethodName("setCacheUsage");
cacheUsageMapping.setXPath(getPrimaryNamespaceXPath() + "cache-usage/text()");
ObjectTypeConverter cacheUsageConverter = new ObjectTypeConverter();
- cacheUsageConverter.addConversionValue("exact-primary-key", Integer.valueOf(ObjectLevelReadQuery.CheckCacheByExactPrimaryKey));
- cacheUsageConverter.addConversionValue("primary-key", Integer.valueOf(ObjectLevelReadQuery.CheckCacheByPrimaryKey));
- cacheUsageConverter.addConversionValue("cache-only", Integer.valueOf(ObjectLevelReadQuery.CheckCacheOnly));
- cacheUsageConverter.addConversionValue("cache-then-database", Integer.valueOf(ObjectLevelReadQuery.CheckCacheThenDatabase));
- cacheUsageConverter.addConversionValue("conform", Integer.valueOf(ObjectLevelReadQuery.ConformResultsInUnitOfWork));
- cacheUsageConverter.addConversionValue("none", Integer.valueOf(ObjectLevelReadQuery.DoNotCheckCache));
- cacheUsageConverter.addConversionValue("use-descriptor-setting", Integer.valueOf(ObjectLevelReadQuery.UseDescriptorSetting));
+ cacheUsageConverter.addConversionValue("exact-primary-key", ObjectLevelReadQuery.CheckCacheByExactPrimaryKey);
+ cacheUsageConverter.addConversionValue("primary-key", ObjectLevelReadQuery.CheckCacheByPrimaryKey);
+ cacheUsageConverter.addConversionValue("cache-only", ObjectLevelReadQuery.CheckCacheOnly);
+ cacheUsageConverter.addConversionValue("cache-then-database", ObjectLevelReadQuery.CheckCacheThenDatabase);
+ cacheUsageConverter.addConversionValue("conform", ObjectLevelReadQuery.ConformResultsInUnitOfWork);
+ cacheUsageConverter.addConversionValue("none", ObjectLevelReadQuery.DoNotCheckCache);
+ cacheUsageConverter.addConversionValue("use-descriptor-setting", ObjectLevelReadQuery.UseDescriptorSetting);
cacheUsageMapping.setConverter(cacheUsageConverter);
- cacheUsageMapping.setNullValue(Integer.valueOf(ObjectLevelReadQuery.UseDescriptorSetting));
+ cacheUsageMapping.setNullValue(ObjectLevelReadQuery.UseDescriptorSetting);
descriptor.addMapping(cacheUsageMapping);
XMLDirectMapping lockModeMapping = new XMLDirectMapping();
@@ -1643,12 +1643,12 @@
lockModeMapping.setSetMethodName("setLockMode");
lockModeMapping.setXPath(getPrimaryNamespaceXPath() + "lock-mode/text()");
ObjectTypeConverter lockModeConverter = new ObjectTypeConverter();
- lockModeConverter.addConversionValue("default", Short.valueOf(ObjectLevelReadQuery.DEFAULT_LOCK_MODE));
- lockModeConverter.addConversionValue("lock", Short.valueOf(ObjectLevelReadQuery.LOCK));
- lockModeConverter.addConversionValue("lock-no-wait", Short.valueOf(ObjectLevelReadQuery.LOCK_NOWAIT));
- lockModeConverter.addConversionValue("none", Short.valueOf(ObjectLevelReadQuery.NO_LOCK));
+ lockModeConverter.addConversionValue("default", ObjectLevelReadQuery.DEFAULT_LOCK_MODE);
+ lockModeConverter.addConversionValue("lock", ObjectLevelReadQuery.LOCK);
+ lockModeConverter.addConversionValue("lock-no-wait", ObjectLevelReadQuery.LOCK_NOWAIT);
+ lockModeConverter.addConversionValue("none", ObjectLevelReadQuery.NO_LOCK);
lockModeMapping.setConverter(lockModeConverter);
- lockModeMapping.setNullValue(Short.valueOf(ObjectLevelReadQuery.DEFAULT_LOCK_MODE));
+ lockModeMapping.setNullValue(ObjectLevelReadQuery.DEFAULT_LOCK_MODE);
descriptor.addMapping(lockModeMapping);
XMLDirectMapping distinctStateMapping = new XMLDirectMapping();
@@ -1657,11 +1657,11 @@
distinctStateMapping.setSetMethodName("setDistinctState");
distinctStateMapping.setXPath(getPrimaryNamespaceXPath() + "distinct-state/text()");
ObjectTypeConverter distinctStateConverter = new ObjectTypeConverter();
- distinctStateConverter.addConversionValue("dont-use-distinct", Short.valueOf(ObjectLevelReadQuery.DONT_USE_DISTINCT));
- distinctStateConverter.addConversionValue("none", Short.valueOf(ObjectLevelReadQuery.UNCOMPUTED_DISTINCT));
- distinctStateConverter.addConversionValue("use-distinct", Short.valueOf(ObjectLevelReadQuery.USE_DISTINCT));
+ distinctStateConverter.addConversionValue("dont-use-distinct", ObjectLevelReadQuery.DONT_USE_DISTINCT);
+ distinctStateConverter.addConversionValue("none", ObjectLevelReadQuery.UNCOMPUTED_DISTINCT);
+ distinctStateConverter.addConversionValue("use-distinct", ObjectLevelReadQuery.USE_DISTINCT);
distinctStateMapping.setConverter(distinctStateConverter);
- distinctStateMapping.setNullValue(Short.valueOf(ObjectLevelReadQuery.UNCOMPUTED_DISTINCT));
+ distinctStateMapping.setNullValue(ObjectLevelReadQuery.UNCOMPUTED_DISTINCT);
descriptor.addMapping(distinctStateMapping);
XMLCompositeObjectMapping inMemoryQueryIndirectionPolicyMapping = new XMLCompositeObjectMapping();
@@ -1803,12 +1803,12 @@
existenceCheckMapping.setSetMethodName("setExistencePolicy");
existenceCheckMapping.setXPath(getPrimaryNamespaceXPath() + "existence-check/text()");
ObjectTypeConverter existenceCheckConverter = new ObjectTypeConverter();
- existenceCheckConverter.addConversionValue("check-cache", Integer.valueOf(DoesExistQuery.CheckCache));
- existenceCheckConverter.addConversionValue("check-database", Integer.valueOf(DoesExistQuery.CheckDatabase));
- existenceCheckConverter.addConversionValue("assume-existence", Integer.valueOf(DoesExistQuery.AssumeExistence));
- existenceCheckConverter.addConversionValue("assume-non-existence", Integer.valueOf(DoesExistQuery.AssumeNonExistence));
+ existenceCheckConverter.addConversionValue("check-cache", DoesExistQuery.CheckCache);
+ existenceCheckConverter.addConversionValue("check-database", DoesExistQuery.CheckDatabase);
+ existenceCheckConverter.addConversionValue("assume-existence", DoesExistQuery.AssumeExistence);
+ existenceCheckConverter.addConversionValue("assume-non-existence", DoesExistQuery.AssumeNonExistence);
existenceCheckMapping.setConverter(existenceCheckConverter);
- existenceCheckMapping.setNullValue(Integer.valueOf(DoesExistQuery.CheckCache));
+ existenceCheckMapping.setNullValue(DoesExistQuery.CheckCache);
descriptor.addMapping(existenceCheckMapping);
return descriptor;
@@ -1871,22 +1871,22 @@
returnChoiceMapping.setAttributeName("returnChoice");
returnChoiceMapping.setXPath(getPrimaryNamespaceXPath() + "return-choice/text()");
ObjectTypeConverter returnChoiceConverter = new ObjectTypeConverter();
- returnChoiceConverter.addConversionValue("return-single-result", Integer.valueOf(ReportQuery.ShouldReturnSingleResult));
- returnChoiceConverter.addConversionValue("return-single-value", Integer.valueOf(ReportQuery.ShouldReturnSingleValue));
- returnChoiceConverter.addConversionValue("return-single-attribute", Integer.valueOf(ReportQuery.ShouldReturnSingleAttribute));
+ returnChoiceConverter.addConversionValue("return-single-result", ReportQuery.ShouldReturnSingleResult);
+ returnChoiceConverter.addConversionValue("return-single-value", ReportQuery.ShouldReturnSingleValue);
+ returnChoiceConverter.addConversionValue("return-single-attribute", ReportQuery.ShouldReturnSingleAttribute);
returnChoiceMapping.setConverter(returnChoiceConverter);
- returnChoiceMapping.setNullValue(Integer.valueOf(0));
+ returnChoiceMapping.setNullValue(0);
descriptor.addMapping(returnChoiceMapping);
XMLDirectMapping retrievePrimaryKeysMapping = new XMLDirectMapping();
retrievePrimaryKeysMapping.setAttributeName("shouldRetrievePrimaryKeys");
retrievePrimaryKeysMapping.setXPath(getPrimaryNamespaceXPath() + "retrieve-primary-keys/text()");
ObjectTypeConverter retrievePrimaryKeysConverter = new ObjectTypeConverter();
- retrievePrimaryKeysConverter.addConversionValue("full-primary-key", Integer.valueOf(ReportQuery.FULL_PRIMARY_KEY));
- retrievePrimaryKeysConverter.addConversionValue("first-primary-key", Integer.valueOf(ReportQuery.FIRST_PRIMARY_KEY));
- retrievePrimaryKeysConverter.addConversionValue("no-primary-key", Integer.valueOf(ReportQuery.NO_PRIMARY_KEY));
+ retrievePrimaryKeysConverter.addConversionValue("full-primary-key", ReportQuery.FULL_PRIMARY_KEY);
+ retrievePrimaryKeysConverter.addConversionValue("first-primary-key", ReportQuery.FIRST_PRIMARY_KEY);
+ retrievePrimaryKeysConverter.addConversionValue("no-primary-key", ReportQuery.NO_PRIMARY_KEY);
retrievePrimaryKeysMapping.setConverter(retrievePrimaryKeysConverter);
- returnChoiceMapping.setNullValue(Integer.valueOf(ReportQuery.NO_PRIMARY_KEY));
+ returnChoiceMapping.setNullValue(ReportQuery.NO_PRIMARY_KEY);
descriptor.addMapping(retrievePrimaryKeysMapping);
XMLCompositeCollectionMapping reportItemsMapping = new XMLCompositeCollectionMapping();
@@ -1957,12 +1957,12 @@
policyMapping.setSetMethodName("setPolicy");
policyMapping.setXPath(getPrimaryNamespaceXPath() + "policy/text()");
ObjectTypeConverter policyConverter = new ObjectTypeConverter();
- policyConverter.addConversionValue("ignore-exceptions-return-conformed", Integer.valueOf(InMemoryQueryIndirectionPolicy.SHOULD_IGNORE_EXCEPTION_RETURN_CONFORMED));
- policyConverter.addConversionValue("ignore-exceptions-returned-not-conformed", Integer.valueOf(InMemoryQueryIndirectionPolicy.SHOULD_IGNORE_EXCEPTION_RETURN_NOT_CONFORMED));
- policyConverter.addConversionValue("trigger-indirection", Integer.valueOf(InMemoryQueryIndirectionPolicy.SHOULD_THROW_INDIRECTION_EXCEPTION));
- policyConverter.addConversionValue("throw-indirection-exception", Integer.valueOf(InMemoryQueryIndirectionPolicy.SHOULD_TRIGGER_INDIRECTION));
+ policyConverter.addConversionValue("ignore-exceptions-return-conformed", InMemoryQueryIndirectionPolicy.SHOULD_IGNORE_EXCEPTION_RETURN_CONFORMED);
+ policyConverter.addConversionValue("ignore-exceptions-returned-not-conformed", InMemoryQueryIndirectionPolicy.SHOULD_IGNORE_EXCEPTION_RETURN_NOT_CONFORMED);
+ policyConverter.addConversionValue("trigger-indirection", InMemoryQueryIndirectionPolicy.SHOULD_THROW_INDIRECTION_EXCEPTION);
+ policyConverter.addConversionValue("throw-indirection-exception", InMemoryQueryIndirectionPolicy.SHOULD_TRIGGER_INDIRECTION);
policyMapping.setConverter(policyConverter);
- policyMapping.setNullValue(Integer.valueOf(InMemoryQueryIndirectionPolicy.SHOULD_THROW_INDIRECTION_EXCEPTION));
+ policyMapping.setNullValue(InMemoryQueryIndirectionPolicy.SHOULD_THROW_INDIRECTION_EXCEPTION);
descriptor.addMapping(policyMapping);
return descriptor;
}
@@ -2234,7 +2234,7 @@
identityMapSizeMapping.setGetMethodName("getIdentityMapSize");
identityMapSizeMapping.setSetMethodName("setIdentityMapSize");
identityMapSizeMapping.setXPath(getPrimaryNamespaceXPath() + "caching/" + getPrimaryNamespaceXPath() + "cache-size/text()");
- identityMapSizeMapping.setNullValue(Integer.valueOf(100));
+ identityMapSizeMapping.setNullValue(100);
descriptor.addMapping(identityMapSizeMapping);
XMLDirectMapping remoteIdentityMapSizeMapping = new XMLDirectMapping();
@@ -2242,7 +2242,7 @@
remoteIdentityMapSizeMapping.setGetMethodName("getRemoteIdentityMapSize");
remoteIdentityMapSizeMapping.setSetMethodName("setRemoteIdentityMapSize");
remoteIdentityMapSizeMapping.setXPath(getPrimaryNamespaceXPath() + "remote-caching/" + getPrimaryNamespaceXPath() + "cache-size/text()");
- remoteIdentityMapSizeMapping.setNullValue(Integer.valueOf(100));
+ remoteIdentityMapSizeMapping.setNullValue(100);
descriptor.addMapping(remoteIdentityMapSizeMapping);
XMLDirectMapping shouldAlwaysRefreshCacheMapping = new XMLDirectMapping();
@@ -2311,12 +2311,12 @@
unitOfWorkCacheIsolationLevelMapping.setSetMethodName("setUnitOfWorkCacheIsolationLevel");
unitOfWorkCacheIsolationLevelMapping.setXPath(getPrimaryNamespaceXPath() + "caching/" + getPrimaryNamespaceXPath() + "unitofwork-isolation-level/text()");
ObjectTypeConverter unitOfWorkCacheIsolationLevelConverter = new ObjectTypeConverter();
- unitOfWorkCacheIsolationLevelConverter.addConversionValue("use-session-cache-after-transaction", Integer.valueOf(ClassDescriptor.USE_SESSION_CACHE_AFTER_TRANSACTION));
- unitOfWorkCacheIsolationLevelConverter.addConversionValue("isolate-new-data-after-transaction", Integer.valueOf(ClassDescriptor.ISOLATE_NEW_DATA_AFTER_TRANSACTION));
- unitOfWorkCacheIsolationLevelConverter.addConversionValue("isolate-cache-after-transaction", Integer.valueOf(ClassDescriptor.ISOLATE_CACHE_AFTER_TRANSACTION));
- unitOfWorkCacheIsolationLevelConverter.addConversionValue("isolate-cache-always", Integer.valueOf(ClassDescriptor.ISOLATE_CACHE_ALWAYS));
+ unitOfWorkCacheIsolationLevelConverter.addConversionValue("use-session-cache-after-transaction", ClassDescriptor.USE_SESSION_CACHE_AFTER_TRANSACTION);
+ unitOfWorkCacheIsolationLevelConverter.addConversionValue("isolate-new-data-after-transaction", ClassDescriptor.ISOLATE_NEW_DATA_AFTER_TRANSACTION);
+ unitOfWorkCacheIsolationLevelConverter.addConversionValue("isolate-cache-after-transaction", ClassDescriptor.ISOLATE_CACHE_AFTER_TRANSACTION);
+ unitOfWorkCacheIsolationLevelConverter.addConversionValue("isolate-cache-always", ClassDescriptor.ISOLATE_CACHE_ALWAYS);
unitOfWorkCacheIsolationLevelMapping.setConverter(unitOfWorkCacheIsolationLevelConverter);
- unitOfWorkCacheIsolationLevelMapping.setNullValue(Integer.valueOf(ClassDescriptor.ISOLATE_NEW_DATA_AFTER_TRANSACTION));
+ unitOfWorkCacheIsolationLevelMapping.setNullValue(ClassDescriptor.ISOLATE_NEW_DATA_AFTER_TRANSACTION);
descriptor.addMapping(unitOfWorkCacheIsolationLevelMapping);
XMLCompositeObjectMapping cacheInvalidationPolicyMapping = new XMLCompositeObjectMapping();
@@ -2331,12 +2331,12 @@
cacheSyncTypeMapping.setSetMethodName("setCacheSynchronizationType");
cacheSyncTypeMapping.setXPath(getPrimaryNamespaceXPath() + "caching/" + getPrimaryNamespaceXPath() + "cache-sync-type/text()");
ObjectTypeConverter cacheSyncTypeConverter = new ObjectTypeConverter();
- cacheSyncTypeConverter.addConversionValue("invalidation", Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS));
- cacheSyncTypeConverter.addConversionValue("no-changes", Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES));
- cacheSyncTypeConverter.addConversionValue("change-set-with-new-objects", Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES));
- cacheSyncTypeConverter.addConversionValue("change-set", Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES));
+ cacheSyncTypeConverter.addConversionValue("invalidation", ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
+ cacheSyncTypeConverter.addConversionValue("no-changes", ClassDescriptor.DO_NOT_SEND_CHANGES);
+ cacheSyncTypeConverter.addConversionValue("change-set-with-new-objects", ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES);
+ cacheSyncTypeConverter.addConversionValue("change-set", ClassDescriptor.SEND_OBJECT_CHANGES);
cacheSyncTypeMapping.setConverter(cacheSyncTypeConverter);
- cacheSyncTypeMapping.setNullValue(Integer.valueOf(ClassDescriptor.UNDEFINED_OBJECT_CHANGE_BEHAVIOR));
+ cacheSyncTypeMapping.setNullValue(ClassDescriptor.UNDEFINED_OBJECT_CHANGE_BEHAVIOR);
descriptor.addMapping(cacheSyncTypeMapping);
XMLCompositeObjectMapping historyPolicyMapping = new XMLCompositeObjectMapping();
@@ -3662,8 +3662,8 @@
joinFetchMapping.setAttributeName("joinFetch");
joinFetchMapping.setXPath(getPrimaryNamespaceXPath() + "join-fetch/text()");
ObjectTypeConverter joinFetchConverter = new ObjectTypeConverter();
- joinFetchConverter.addConversionValue("true", Integer.valueOf(ForeignReferenceMapping.INNER_JOIN));
- joinFetchConverter.addConversionValue("false", Integer.valueOf(ForeignReferenceMapping.NONE));
+ joinFetchConverter.addConversionValue("true", ForeignReferenceMapping.INNER_JOIN);
+ joinFetchConverter.addConversionValue("false", ForeignReferenceMapping.NONE);
joinFetchMapping.setConverter(joinFetchConverter);
joinFetchMapping.setNullValue(ForeignReferenceMapping.NONE);
descriptor.addMapping(joinFetchMapping);
@@ -4067,7 +4067,7 @@
queryTimeoutMapping.setGetMethodName("getQueryTimeout");
queryTimeoutMapping.setSetMethodName("setQueryTimeout");
queryTimeoutMapping.setXPath(getPrimaryNamespaceXPath() + "timeout/text()");
- queryTimeoutMapping.setNullValue(Integer.valueOf(DescriptorQueryManager.DefaultTimeout));
+ queryTimeoutMapping.setNullValue(DescriptorQueryManager.DefaultTimeout);
descriptor.addMapping(queryTimeoutMapping);
XMLCompositeObjectMapping insertQueryMapping = new XMLCompositeObjectMapping();
@@ -4902,10 +4902,10 @@
nodeTypeMapping.setXPath(getPrimaryNamespaceXPath() + "node-type/text()");
ObjectTypeConverter nodeTypeConverter = new ObjectTypeConverter();
- nodeTypeConverter.addConversionValue("element", Integer.valueOf(XMLSchemaReference.ELEMENT));
- nodeTypeConverter.addConversionValue("simple-type", Integer.valueOf(XMLSchemaReference.SIMPLE_TYPE));
- nodeTypeConverter.addConversionValue("complex-type", Integer.valueOf(XMLSchemaReference.COMPLEX_TYPE));
- nodeTypeConverter.addConversionValue("group", Integer.valueOf(XMLSchemaReference.GROUP));
+ nodeTypeConverter.addConversionValue("element", XMLSchemaReference.ELEMENT);
+ nodeTypeConverter.addConversionValue("simple-type", XMLSchemaReference.SIMPLE_TYPE);
+ nodeTypeConverter.addConversionValue("complex-type", XMLSchemaReference.COMPLEX_TYPE);
+ nodeTypeConverter.addConversionValue("group", XMLSchemaReference.GROUP);
nodeTypeMapping.setConverter(nodeTypeConverter);
descriptor.addMapping(nodeTypeMapping);
@@ -5120,12 +5120,12 @@
modificationDeferralLevelMapping.setGetMethodName("getDeferModificationsUntilCommit");
modificationDeferralLevelMapping.setSetMethodName("setDeferModificationsUntilCommit");
ObjectTypeConverter modificationDeferralLevelConverter = new ObjectTypeConverter();
- modificationDeferralLevelConverter.addConversionValue("all-modifications", Integer.valueOf(CMPPolicy.ALL_MODIFICATIONS));
- modificationDeferralLevelConverter.addConversionValue("update-modifications", Integer.valueOf(CMPPolicy.UPDATE_MODIFICATIONS));
- modificationDeferralLevelConverter.addConversionValue("none", Integer.valueOf(CMPPolicy.NONE));
+ modificationDeferralLevelConverter.addConversionValue("all-modifications", CMPPolicy.ALL_MODIFICATIONS);
+ modificationDeferralLevelConverter.addConversionValue("update-modifications", CMPPolicy.UPDATE_MODIFICATIONS);
+ modificationDeferralLevelConverter.addConversionValue("none", CMPPolicy.NONE);
modificationDeferralLevelMapping.setConverter(modificationDeferralLevelConverter);
modificationDeferralLevelMapping.setXPath(getPrimaryNamespaceXPath() + "defer-until-commit/text()");
- modificationDeferralLevelMapping.setNullValue(Integer.valueOf(CMPPolicy.ALL_MODIFICATIONS));
+ modificationDeferralLevelMapping.setNullValue(CMPPolicy.ALL_MODIFICATIONS);
descriptor.addMapping(modificationDeferralLevelMapping);
XMLDirectMapping nonDeferredCreateTimeMapping = new XMLDirectMapping();
@@ -5133,12 +5133,12 @@
nonDeferredCreateTimeMapping.setGetMethodName("getNonDeferredCreateTime");
nonDeferredCreateTimeMapping.setSetMethodName("setNonDeferredCreateTime");
ObjectTypeConverter nonDeferredCreateTimeConverter = new ObjectTypeConverter();
- nonDeferredCreateTimeConverter.addConversionValue("after-ejbcreate", Integer.valueOf(CMPPolicy.AFTER_EJBCREATE));
- nonDeferredCreateTimeConverter.addConversionValue("after-ejbpostcreate", Integer.valueOf(CMPPolicy.AFTER_EJBPOSTCREATE));
- nonDeferredCreateTimeConverter.addConversionValue("undefined", Integer.valueOf(CMPPolicy.UNDEFINED));
+ nonDeferredCreateTimeConverter.addConversionValue("after-ejbcreate", CMPPolicy.AFTER_EJBCREATE);
+ nonDeferredCreateTimeConverter.addConversionValue("after-ejbpostcreate", CMPPolicy.AFTER_EJBPOSTCREATE);
+ nonDeferredCreateTimeConverter.addConversionValue("undefined", CMPPolicy.UNDEFINED);
nonDeferredCreateTimeMapping.setConverter(nonDeferredCreateTimeConverter);
nonDeferredCreateTimeMapping.setXPath(getPrimaryNamespaceXPath() + "non-deferred-create-time/text()");
- nonDeferredCreateTimeMapping.setNullValue(Integer.valueOf(CMPPolicy.UNDEFINED));
+ nonDeferredCreateTimeMapping.setNullValue(CMPPolicy.UNDEFINED);
descriptor.addMapping(nonDeferredCreateTimeMapping);
XMLCompositeObjectMapping pessimisticLockingPolicyMapping = new XMLCompositeObjectMapping();
@@ -5163,8 +5163,8 @@
lockingModeMapping.setGetMethodName("getLockingMode");
lockingModeMapping.setSetMethodName("setLockingMode");
ObjectTypeConverter lockingModeConverter = new ObjectTypeConverter();
- lockingModeConverter.addConversionValue("wait", Short.valueOf(ObjectLevelReadQuery.LOCK));
- lockingModeConverter.addConversionValue("no-wait", Short.valueOf(ObjectLevelReadQuery.LOCK_NOWAIT));
+ lockingModeConverter.addConversionValue("wait", ObjectLevelReadQuery.LOCK);
+ lockingModeConverter.addConversionValue("no-wait", ObjectLevelReadQuery.LOCK_NOWAIT);
lockingModeMapping.setConverter(lockingModeConverter);
descriptor.addMapping(lockingModeMapping);
@@ -5199,7 +5199,7 @@
preallocationSizeMapping.setGetMethodName("getPreallocationSize");
preallocationSizeMapping.setSetMethodName("setPreallocationSize");
preallocationSizeMapping.setXPath(getPrimaryNamespaceXPath() + "preallocation-size/text()");
- preallocationSizeMapping.setNullValue(Integer.valueOf(50));
+ preallocationSizeMapping.setNullValue(50);
descriptor.addMapping(preallocationSizeMapping);
return descriptor;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject_11_1_1.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject_11_1_1.java
index 8734e4d..87d85d8 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject_11_1_1.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/ObjectPersistenceRuntimeXMLProject_11_1_1.java
@@ -411,9 +411,9 @@
joinFetchMapping.setAttributeName("joinFetch");
joinFetchMapping.setXPath(getPrimaryNamespaceXPath() + "join-fetch/text()");
ObjectTypeConverter joinFetchConverter = new ObjectTypeConverter();
- joinFetchConverter.addConversionValue("inner-join", Integer.valueOf(ForeignReferenceMapping.INNER_JOIN));
- joinFetchConverter.addConversionValue("outer-join", Integer.valueOf(ForeignReferenceMapping.OUTER_JOIN));
- joinFetchConverter.addConversionValue("none", Integer.valueOf(ForeignReferenceMapping.NONE));
+ joinFetchConverter.addConversionValue("inner-join", ForeignReferenceMapping.INNER_JOIN);
+ joinFetchConverter.addConversionValue("outer-join", ForeignReferenceMapping.OUTER_JOIN);
+ joinFetchConverter.addConversionValue("none", ForeignReferenceMapping.NONE);
joinFetchMapping.setConverter(joinFetchConverter);
joinFetchMapping.setNullValue(ForeignReferenceMapping.NONE);
descriptor.addMapping(joinFetchMapping);
@@ -452,9 +452,9 @@
joinFetchMapping.setAttributeName("joinFetch");
joinFetchMapping.setXPath(getPrimaryNamespaceXPath() + "join-fetch/text()");
ObjectTypeConverter joinFetchConverter = new ObjectTypeConverter();
- joinFetchConverter.addConversionValue("inner-join", Integer.valueOf(ForeignReferenceMapping.INNER_JOIN));
- joinFetchConverter.addConversionValue("outer-join", Integer.valueOf(ForeignReferenceMapping.OUTER_JOIN));
- joinFetchConverter.addConversionValue("none", Integer.valueOf(ForeignReferenceMapping.NONE));
+ joinFetchConverter.addConversionValue("inner-join", ForeignReferenceMapping.INNER_JOIN);
+ joinFetchConverter.addConversionValue("outer-join", ForeignReferenceMapping.OUTER_JOIN);
+ joinFetchConverter.addConversionValue("none", ForeignReferenceMapping.NONE);
joinFetchMapping.setConverter(joinFetchConverter);
joinFetchMapping.setNullValue(ForeignReferenceMapping.NONE);
descriptor.addMapping(joinFetchMapping);
@@ -470,9 +470,9 @@
joinFetchMapping.setAttributeName("joinFetch");
joinFetchMapping.setXPath(getPrimaryNamespaceXPath() + "join-fetch/text()");
ObjectTypeConverter joinFetchConverter = new ObjectTypeConverter();
- joinFetchConverter.addConversionValue("inner-join", Integer.valueOf(ForeignReferenceMapping.INNER_JOIN));
- joinFetchConverter.addConversionValue("outer-join", Integer.valueOf(ForeignReferenceMapping.OUTER_JOIN));
- joinFetchConverter.addConversionValue("none", Integer.valueOf(ForeignReferenceMapping.NONE));
+ joinFetchConverter.addConversionValue("inner-join", ForeignReferenceMapping.INNER_JOIN);
+ joinFetchConverter.addConversionValue("outer-join", ForeignReferenceMapping.OUTER_JOIN);
+ joinFetchConverter.addConversionValue("none", ForeignReferenceMapping.NONE);
joinFetchMapping.setConverter(joinFetchConverter);
joinFetchMapping.setNullValue(ForeignReferenceMapping.NONE);
descriptor.addMapping(joinFetchMapping);
@@ -488,9 +488,9 @@
joinFetchMapping.setAttributeName("joinFetch");
joinFetchMapping.setXPath(getPrimaryNamespaceXPath() + "join-fetch/text()");
ObjectTypeConverter joinFetchConverter = new ObjectTypeConverter();
- joinFetchConverter.addConversionValue("inner-join", Integer.valueOf(ForeignReferenceMapping.INNER_JOIN));
- joinFetchConverter.addConversionValue("outer-join", Integer.valueOf(ForeignReferenceMapping.OUTER_JOIN));
- joinFetchConverter.addConversionValue("none", Integer.valueOf(ForeignReferenceMapping.NONE));
+ joinFetchConverter.addConversionValue("inner-join", ForeignReferenceMapping.INNER_JOIN);
+ joinFetchConverter.addConversionValue("outer-join", ForeignReferenceMapping.OUTER_JOIN);
+ joinFetchConverter.addConversionValue("none", ForeignReferenceMapping.NONE);
joinFetchMapping.setConverter(joinFetchConverter);
joinFetchMapping.setNullValue(ForeignReferenceMapping.NONE);
descriptor.addMapping(joinFetchMapping);
@@ -522,9 +522,9 @@
joinFetchMapping.setAttributeName("joinFetch");
joinFetchMapping.setXPath(getPrimaryNamespaceXPath() + "join-fetch/text()");
ObjectTypeConverter joinFetchConverter = new ObjectTypeConverter();
- joinFetchConverter.addConversionValue("inner-join", Integer.valueOf(ForeignReferenceMapping.INNER_JOIN));
- joinFetchConverter.addConversionValue("outer-join", Integer.valueOf(ForeignReferenceMapping.OUTER_JOIN));
- joinFetchConverter.addConversionValue("none", Integer.valueOf(ForeignReferenceMapping.NONE));
+ joinFetchConverter.addConversionValue("inner-join", ForeignReferenceMapping.INNER_JOIN);
+ joinFetchConverter.addConversionValue("outer-join", ForeignReferenceMapping.OUTER_JOIN);
+ joinFetchConverter.addConversionValue("none", ForeignReferenceMapping.NONE);
joinFetchMapping.setConverter(joinFetchConverter);
joinFetchMapping.setNullValue(ForeignReferenceMapping.NONE);
descriptor.addMapping(joinFetchMapping);
@@ -711,8 +711,8 @@
XMLDirectMapping unitOfWorkCacheIsolationLevelMapping = (XMLDirectMapping)descriptor.getMappingForAttributeName("unitOfWorkCacheIsolationLevel");
ObjectTypeConverter unitOfWorkCacheIsolationLevelConverter = (ObjectTypeConverter)unitOfWorkCacheIsolationLevelMapping.getConverter();
- unitOfWorkCacheIsolationLevelConverter.addConversionValue("default", Integer.valueOf(ClassDescriptor.UNDEFINED_ISOLATATION));
- unitOfWorkCacheIsolationLevelMapping.setNullValue(Integer.valueOf(ClassDescriptor.UNDEFINED_ISOLATATION));
+ unitOfWorkCacheIsolationLevelConverter.addConversionValue("default", ClassDescriptor.UNDEFINED_ISOLATATION);
+ unitOfWorkCacheIsolationLevelMapping.setNullValue(ClassDescriptor.UNDEFINED_ISOLATATION);
return descriptor;
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/SessionsFactory.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/SessionsFactory.java
index f2940cc..9105b8c 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/SessionsFactory.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/SessionsFactory.java
@@ -472,7 +472,7 @@
if (datasourceName != null) {
try {
JNDIConnector jndiConnector = new JNDIConnector(new javax.naming.InitialContext(), datasourceName);
- jndiConnector.setLookupType(databaseLoginConfig.getLookupType().intValue());
+ jndiConnector.setLookupType(databaseLoginConfig.getLookupType());
databaseLogin.setConnector(jndiConnector);
} catch (Exception exception) {
throw SessionLoaderException.failedToLoadTag("datasource", datasourceName, exception);
@@ -512,7 +512,7 @@
// Max batch writing size - XML Schema default is 32000
Integer maxBatchWritingSize = databaseLoginConfig.getMaxBatchWritingSize();
if (maxBatchWritingSize != null) {
- databaseLogin.setMaxBatchWritingSize(maxBatchWritingSize.intValue());
+ databaseLogin.setMaxBatchWritingSize(maxBatchWritingSize);
}
// Native SQL - XML Schema default is false
@@ -686,13 +686,13 @@
// Max connections
Integer maxConnections = poolConfig.getMaxConnections();
if (maxConnections != null) {
- serverSession.getSequencingControl().setMaxPoolSize(maxConnections.intValue());
+ serverSession.getSequencingControl().setMaxPoolSize(maxConnections);
}
// Min connections
Integer minConnections = poolConfig.getMinConnections();
if (minConnections != null) {
- serverSession.getSequencingControl().setMinPoolSize(minConnections.intValue());
+ serverSession.getSequencingControl().setMinPoolSize(minConnections);
}
// Name - no need to process
@@ -810,13 +810,13 @@
// Max connections
Integer maxConnections = poolConfig.getMaxConnections();
if (maxConnections != null) {
- connectionPool.setMaxNumberOfConnections(maxConnections.intValue());
+ connectionPool.setMaxNumberOfConnections(maxConnections);
}
// Min connections
Integer minConnections = poolConfig.getMinConnections();
if (minConnections != null) {
- connectionPool.setMinNumberOfConnections(minConnections.intValue());
+ connectionPool.setMinNumberOfConnections(minConnections);
}
}
@@ -983,7 +983,7 @@
}
String name = sequenceConfig.getName();
- int size = sequenceConfig.getPreallocationSize().intValue();
+ int size = sequenceConfig.getPreallocationSize();
if (sequenceConfig instanceof DefaultSequenceConfig) {
return new DefaultSequence(name, size);
@@ -1286,19 +1286,19 @@
protected void processLogConfig(LogConfig logConfig, SessionLog log) {
if (logConfig.getLoggingOptions() != null) {
if (logConfig.getLoggingOptions().getShouldLogExceptionStackTrace() != null) {
- log.setShouldLogExceptionStackTrace(logConfig.getLoggingOptions().getShouldLogExceptionStackTrace().booleanValue());
+ log.setShouldLogExceptionStackTrace(logConfig.getLoggingOptions().getShouldLogExceptionStackTrace());
}
if (logConfig.getLoggingOptions().getShouldPrintConnection() != null) {
- log.setShouldPrintConnection(logConfig.getLoggingOptions().getShouldPrintConnection().booleanValue());
+ log.setShouldPrintConnection(logConfig.getLoggingOptions().getShouldPrintConnection());
}
if (logConfig.getLoggingOptions().getShouldPrintDate() != null) {
- log.setShouldPrintDate(logConfig.getLoggingOptions().getShouldPrintDate().booleanValue());
+ log.setShouldPrintDate(logConfig.getLoggingOptions().getShouldPrintDate());
}
if (logConfig.getLoggingOptions().getShouldPrintSession() != null) {
- log.setShouldPrintSession(logConfig.getLoggingOptions().getShouldPrintSession().booleanValue());
+ log.setShouldPrintSession(logConfig.getLoggingOptions().getShouldPrintSession());
}
if (logConfig.getLoggingOptions().getShouldPrintThread() != null) {
- log.setShouldPrintThread(logConfig.getLoggingOptions().getShouldPrintThread().booleanValue());
+ log.setShouldPrintThread(logConfig.getLoggingOptions().getShouldPrintThread());
}
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject.java
index 9f0f6fa..4ba6b91 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -255,7 +255,7 @@
cacheSyncMapping.setGetMethodName("getCacheSync");
cacheSyncMapping.setSetMethodName("setCacheSync");
cacheSyncMapping.setXPath("cache-sync/text()");
- cacheSyncMapping.setNullValue(Boolean.valueOf(CACHE_SYNC_DEFAULT));
+ cacheSyncMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(cacheSyncMapping);
return descriptor;
@@ -270,7 +270,7 @@
exclusiveConnectionMapping.setGetMethodName("getUseExclusiveConnection");
exclusiveConnectionMapping.setSetMethodName("setUseExclusiveConnection");
exclusiveConnectionMapping.setXPath("exclusive-connection/text()");
- exclusiveConnectionMapping.setNullValue(Boolean.valueOf(EXCLUSIVE_CONNECTION_DEFAULT));
+ exclusiveConnectionMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(exclusiveConnectionMapping);
XMLDirectMapping lazyMapping = new XMLDirectMapping();
@@ -278,7 +278,7 @@
lazyMapping.setGetMethodName("getLazy");
lazyMapping.setSetMethodName("setLazy");
lazyMapping.setXPath("lazy/text()");
- lazyMapping.setNullValue(Boolean.valueOf(LAZY_DEFAULT));
+ lazyMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(lazyMapping);
return descriptor;
@@ -300,7 +300,7 @@
maxConnectionsMapping.setGetMethodName("getMaxConnections");
maxConnectionsMapping.setSetMethodName("setMaxConnections");
maxConnectionsMapping.setXPath("max-connections/text()");
- maxConnectionsMapping.setNullValue(Integer.valueOf(CONNECTION_POOL_MAX_DEFAULT));
+ maxConnectionsMapping.setNullValue(CONNECTION_POOL_MAX_DEFAULT);
descriptor.addMapping(maxConnectionsMapping);
XMLDirectMapping minConnectionsMapping = new XMLDirectMapping();
@@ -308,7 +308,7 @@
minConnectionsMapping.setGetMethodName("getMinConnections");
minConnectionsMapping.setSetMethodName("setMinConnections");
minConnectionsMapping.setXPath("min-connections/text()");
- minConnectionsMapping.setNullValue(Integer.valueOf(CONNECTION_POOL_MIN_DEFAULT));
+ minConnectionsMapping.setNullValue(CONNECTION_POOL_MIN_DEFAULT);
descriptor.addMapping(minConnectionsMapping);
XMLCompositeObjectMapping loginConfigMapping = new XMLCompositeObjectMapping();
@@ -375,11 +375,11 @@
lookupTypeMapping.setAttributeName("m_lookupType");
lookupTypeMapping.setGetMethodName("getLookupType");
lookupTypeMapping.setSetMethodName("setLookupType");
- lookupTypeMapping.setNullValue(Integer.valueOf(DATASOURCE_LOOKUP_TYPE_DEFAULT));
+ lookupTypeMapping.setNullValue(DATASOURCE_LOOKUP_TYPE_DEFAULT);
ObjectTypeConverter converter = new ObjectTypeConverter();
- converter.addConversionValue("string", Integer.valueOf(JNDIConnector.STRING_LOOKUP));
- converter.addConversionValue("composite-name", Integer.valueOf(JNDIConnector.COMPOSITE_NAME_LOOKUP));
- converter.addConversionValue("compound-name", Integer.valueOf(JNDIConnector.COMPOUND_NAME_LOOKUP));
+ converter.addConversionValue("string", JNDIConnector.STRING_LOOKUP);
+ converter.addConversionValue("composite-name", JNDIConnector.COMPOSITE_NAME_LOOKUP);
+ converter.addConversionValue("compound-name", JNDIConnector.COMPOUND_NAME_LOOKUP);
lookupTypeMapping.setConverter(converter);
lookupTypeMapping.setXPath("datasource/@lookup");
descriptor.addMapping(lookupTypeMapping);
@@ -389,7 +389,7 @@
bindAllParametersMapping.setGetMethodName("getBindAllParameters");
bindAllParametersMapping.setSetMethodName("setBindAllParameters");
bindAllParametersMapping.setXPath("bind-all-parameters/text()");
- bindAllParametersMapping.setNullValue(Boolean.valueOf(BIND_ALL_PARAMETERS_DEFAULT));
+ bindAllParametersMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(bindAllParametersMapping);
XMLDirectMapping cacheAllStatementsMapping = new XMLDirectMapping();
@@ -397,7 +397,7 @@
cacheAllStatementsMapping.setGetMethodName("getCacheAllStatements");
cacheAllStatementsMapping.setSetMethodName("setCacheAllStatements");
cacheAllStatementsMapping.setXPath("cache-all-statements/text()");
- cacheAllStatementsMapping.setNullValue(Boolean.valueOf(CACHE_ALL_STATEMENTS_DEFAULT));
+ cacheAllStatementsMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(cacheAllStatementsMapping);
XMLDirectMapping byteArrayBindingMapping = new XMLDirectMapping();
@@ -405,7 +405,7 @@
byteArrayBindingMapping.setGetMethodName("getByteArrayBinding");
byteArrayBindingMapping.setSetMethodName("setByteArrayBinding");
byteArrayBindingMapping.setXPath("byte-array-binding/text()");
- byteArrayBindingMapping.setNullValue(Boolean.valueOf(BYTE_ARRAY_BINDING_DEFAULT));
+ byteArrayBindingMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(byteArrayBindingMapping);
XMLDirectMapping stringBindingMapping = new XMLDirectMapping();
@@ -413,7 +413,7 @@
stringBindingMapping.setGetMethodName("getStringBinding");
stringBindingMapping.setSetMethodName("setStringBinding");
stringBindingMapping.setXPath("string-binding/text()");
- stringBindingMapping.setNullValue(Boolean.valueOf(STRING_BINDING_DEFAULT));
+ stringBindingMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(stringBindingMapping);
XMLDirectMapping streamsForBindingMapping = new XMLDirectMapping();
@@ -421,7 +421,7 @@
streamsForBindingMapping.setGetMethodName("getStreamsForBinding");
streamsForBindingMapping.setSetMethodName("setStreamsForBinding");
streamsForBindingMapping.setXPath("streams-for-binding/text()");
- streamsForBindingMapping.setNullValue(Boolean.valueOf(STREAMS_FOR_BINDING_DEFAULT));
+ streamsForBindingMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(streamsForBindingMapping);
XMLDirectMapping forceFieldNamesToUppercaseMapping = new XMLDirectMapping();
@@ -429,7 +429,7 @@
forceFieldNamesToUppercaseMapping.setGetMethodName("getForceFieldNamesToUppercase");
forceFieldNamesToUppercaseMapping.setSetMethodName("setForceFieldNamesToUppercase");
forceFieldNamesToUppercaseMapping.setXPath("force-field-names-to-upper-case/text()");
- forceFieldNamesToUppercaseMapping.setNullValue(Boolean.valueOf(FORCE_FIELD_NAMES_TO_UPPERCASE_DEFAULT));
+ forceFieldNamesToUppercaseMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(forceFieldNamesToUppercaseMapping);
XMLDirectMapping optimizeDataConversionMapping = new XMLDirectMapping();
@@ -437,7 +437,7 @@
optimizeDataConversionMapping.setGetMethodName("getOptimizeDataConversion");
optimizeDataConversionMapping.setSetMethodName("setOptimizeDataConversion");
optimizeDataConversionMapping.setXPath("optimize-data-conversion/text()");
- optimizeDataConversionMapping.setNullValue(Boolean.valueOf(OPTIMIZE_DATA_CONVERSION_DEFAULT));
+ optimizeDataConversionMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(optimizeDataConversionMapping);
XMLDirectMapping trimStringsMapping = new XMLDirectMapping();
@@ -445,7 +445,7 @@
trimStringsMapping.setGetMethodName("getTrimStrings");
trimStringsMapping.setSetMethodName("setTrimStrings");
trimStringsMapping.setXPath("trim-strings/text()");
- trimStringsMapping.setNullValue(Boolean.valueOf(TRIM_STRINGS_DEFAULT));
+ trimStringsMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(trimStringsMapping);
XMLDirectMapping batchWritingMapping = new XMLDirectMapping();
@@ -453,7 +453,7 @@
batchWritingMapping.setGetMethodName("getBatchWriting");
batchWritingMapping.setSetMethodName("setBatchWriting");
batchWritingMapping.setXPath("batch-writing/text()");
- batchWritingMapping.setNullValue(Boolean.valueOf(BATCH_WRITING_DEFAULT));
+ batchWritingMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(batchWritingMapping);
XMLDirectMapping jdbc20BatchWritingMapping = new XMLDirectMapping();
@@ -461,7 +461,7 @@
jdbc20BatchWritingMapping.setGetMethodName("getJdbcBatchWriting");
jdbc20BatchWritingMapping.setSetMethodName("setJdbcBatchWriting");
jdbc20BatchWritingMapping.setXPath("jdbc-batch-writing/text()");
- jdbc20BatchWritingMapping.setNullValue(Boolean.valueOf(JDBC20_BATCH_WRITING_DEFAULT));
+ jdbc20BatchWritingMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(jdbc20BatchWritingMapping);
XMLDirectMapping maxBatchWritingSizeMapping = new XMLDirectMapping();
@@ -469,7 +469,7 @@
maxBatchWritingSizeMapping.setGetMethodName("getMaxBatchWritingSize");
maxBatchWritingSizeMapping.setSetMethodName("setMaxBatchWritingSize");
maxBatchWritingSizeMapping.setXPath("max-batch-writing-size/text()");
- maxBatchWritingSizeMapping.setNullValue(Integer.valueOf(MAX_BATCH_WRITING_SIZE_DEFAULT));
+ maxBatchWritingSizeMapping.setNullValue(MAX_BATCH_WRITING_SIZE_DEFAULT);
descriptor.addMapping(maxBatchWritingSizeMapping);
XMLDirectMapping nativeSQLMapping = new XMLDirectMapping();
@@ -477,7 +477,7 @@
nativeSQLMapping.setGetMethodName("getNativeSQL");
nativeSQLMapping.setSetMethodName("setNativeSQL");
nativeSQLMapping.setXPath("native-sql/text()");
- nativeSQLMapping.setNullValue(Boolean.valueOf(NATIVE_SQL_DEFAULT));
+ nativeSQLMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(nativeSQLMapping);
XMLCompositeObjectMapping structConverterConfigMapping = new XMLCompositeObjectMapping();
@@ -627,7 +627,7 @@
multicastPortMapping.setGetMethodName("getMulticastPort");
multicastPortMapping.setSetMethodName("setMulticastPort");
multicastPortMapping.setXPath("multicast-port/text()");
- multicastPortMapping.setNullValue(Integer.valueOf(MULTICAST_PORT_DEFAULT));
+ multicastPortMapping.setNullValue(MULTICAST_PORT_DEFAULT);
descriptor.addMapping(multicastPortMapping);
XMLDirectMapping announcementDelayMapping = new XMLDirectMapping();
@@ -635,7 +635,7 @@
announcementDelayMapping.setGetMethodName("getAnnouncementDelay");
announcementDelayMapping.setSetMethodName("setAnnouncementDelay");
announcementDelayMapping.setXPath("announcement-delay/text()");
- announcementDelayMapping.setNullValue(Integer.valueOf(ANNOUNCEMENT_DELAY_DEFAULT));
+ announcementDelayMapping.setNullValue(ANNOUNCEMENT_DELAY_DEFAULT);
descriptor.addMapping(announcementDelayMapping);
XMLDirectMapping packetTimeToLiveMapping = new XMLDirectMapping();
@@ -643,7 +643,7 @@
packetTimeToLiveMapping.setGetMethodName("getPacketTimeToLive");
packetTimeToLiveMapping.setSetMethodName("setPacketTimeToLive");
packetTimeToLiveMapping.setXPath("packet-time-to-live/text()");
- packetTimeToLiveMapping.setNullValue(Integer.valueOf(PACKET_TIME_TO_LIVE_DEFAULT));
+ packetTimeToLiveMapping.setNullValue(PACKET_TIME_TO_LIVE_DEFAULT);
descriptor.addMapping(packetTimeToLiveMapping);
return descriptor;
@@ -926,7 +926,7 @@
externalConnectionPoolMapping.setGetMethodName("getExternalConnectionPooling");
externalConnectionPoolMapping.setSetMethodName("setExternalConnectionPooling");
externalConnectionPoolMapping.setXPath("external-connection-pooling/text()");
- externalConnectionPoolMapping.setNullValue(Boolean.valueOf(EXTERNAL_CONNECTION_POOL_DEFAULT));
+ externalConnectionPoolMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(externalConnectionPoolMapping);
XMLDirectMapping externalTransactionControllerMapping = new XMLDirectMapping();
@@ -934,7 +934,7 @@
externalTransactionControllerMapping.setGetMethodName("getExternalTransactionController");
externalTransactionControllerMapping.setSetMethodName("setExternalTransactionController");
externalTransactionControllerMapping.setXPath("external-transaction-controller/text()");
- externalTransactionControllerMapping.setNullValue(Boolean.valueOf(EXTERNAL_TRANSACTION_CONTROLLER_DEFAULT));
+ externalTransactionControllerMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(externalTransactionControllerMapping);
XMLCompositeObjectMapping sequencingMapping = new XMLCompositeObjectMapping();
@@ -1126,7 +1126,7 @@
maxConnectionsMapping.setGetMethodName("getMaxConnections");
maxConnectionsMapping.setSetMethodName("setMaxConnections");
maxConnectionsMapping.setXPath("max-connections/text()");
- maxConnectionsMapping.setNullValue(Integer.valueOf(READ_CONNECTION_POOL_MAX_DEFAULT));
+ maxConnectionsMapping.setNullValue(READ_CONNECTION_POOL_MAX_DEFAULT);
descriptor.addMapping(maxConnectionsMapping);
XMLDirectMapping minConnectionsMapping = new XMLDirectMapping();
@@ -1134,7 +1134,7 @@
minConnectionsMapping.setGetMethodName("getMinConnections");
minConnectionsMapping.setSetMethodName("setMinConnections");
minConnectionsMapping.setXPath("min-connections/text()");
- minConnectionsMapping.setNullValue(Integer.valueOf(READ_CONNECTION_POOL_MIN_DEFAULT));
+ minConnectionsMapping.setNullValue(READ_CONNECTION_POOL_MIN_DEFAULT);
descriptor.addMapping(minConnectionsMapping);
XMLCompositeObjectMapping loginConfigMapping = new XMLCompositeObjectMapping();
@@ -1150,7 +1150,7 @@
exclusiveMapping.setGetMethodName("getExclusive");
exclusiveMapping.setSetMethodName("setExclusive");
exclusiveMapping.setXPath("exclusive/text()");
- exclusiveMapping.setNullValue(Boolean.valueOf(EXCLUSIVE_DEFAULT));
+ exclusiveMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(exclusiveMapping);
return descriptor;
@@ -1211,7 +1211,7 @@
enableRuntimeServicesMapping.setGetMethodName("getEnableRuntimeServices");
enableRuntimeServicesMapping.setSetMethodName("setEnableRuntimeServices");
enableRuntimeServicesMapping.setXPath("enable-runtime-services/text()");
- enableRuntimeServicesMapping.setNullValue(Boolean.valueOf(ENABLE_RUNTIME_SERVICES_DEFAULT));
+ enableRuntimeServicesMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(enableRuntimeServicesMapping);
XMLDirectMapping enableJTAMapping = new XMLDirectMapping();
@@ -1219,7 +1219,7 @@
enableJTAMapping.setGetMethodName("getEnableJTA");
enableJTAMapping.setSetMethodName("setEnableJTA");
enableJTAMapping.setXPath("enable-jta/text()");
- enableJTAMapping.setNullValue(Boolean.valueOf(ENABLE_JTA_DEFAULT));
+ enableJTAMapping.setNullValue(Boolean.TRUE);
descriptor.addMapping(enableJTAMapping);
return descriptor;
@@ -1483,7 +1483,7 @@
preallocationSizeMapping.setGetMethodName("getPreallocationSize");
preallocationSizeMapping.setSetMethodName("setPreallocationSize");
preallocationSizeMapping.setXPath("preallocation-size/text()");
- preallocationSizeMapping.setNullValue(Integer.valueOf(50));
+ preallocationSizeMapping.setNullValue(50);
descriptor.addMapping(preallocationSizeMapping);
return descriptor;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject_11_1_1.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject_11_1_1.java
index 0365f87..daf14d0 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject_11_1_1.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/XMLSessionConfigProject_11_1_1.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -106,7 +106,7 @@
ClassDescriptor descriptor = super.buildDatabaseLoginConfigDescriptor();
XMLDirectMapping bindAllParametersMapping = (XMLDirectMapping)descriptor.getMappingForAttributeName("m_bindAllParameters");
- bindAllParametersMapping.setNullValue(Boolean.valueOf(BIND_ALL_PARAMETERS_DEFAULT));
+ bindAllParametersMapping.setNullValue(Boolean.TRUE);
XMLDirectMapping validateConnectionHealthOnErrorMapping = new XMLDirectMapping();
validateConnectionHealthOnErrorMapping.setAttributeName("connectionHealthValidatedOnError");
@@ -154,7 +154,7 @@
useSingleThreadedNotificationMapping.setGetMethodName("useSingleThreadedNotification");
useSingleThreadedNotificationMapping.setSetMethodName("setUseSingleThreadedNotification");
useSingleThreadedNotificationMapping.setXPath("use-single-threaded-notification/text()");
- useSingleThreadedNotificationMapping.setNullValue(Boolean.valueOf(USE_SINGLE_THREADED_NOTIFICATION_DEFAULT));
+ useSingleThreadedNotificationMapping.setNullValue(Boolean.FALSE);
descriptor.addMapping(useSingleThreadedNotificationMapping);
XMLDirectMapping topicNameMapping = new XMLDirectMapping();
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/model/sequencing/SequencingConfig.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/model/sequencing/SequencingConfig.java
index 2c81d0f..857f175 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/model/sequencing/SequencingConfig.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/factories/model/sequencing/SequencingConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -145,7 +145,7 @@
sequenceConfig = tableSequenceConfig;
}
sequenceConfig.setName("");
- sequenceConfig.setPreallocationSize(Integer.valueOf(50));
+ sequenceConfig.setPreallocationSize(50);
setDefaultSequenceConfig(sequenceConfig);
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/RemoteSessionController.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/RemoteSessionController.java
index 28a3bad..4c9477a 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/RemoteSessionController.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/RemoteSessionController.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -293,9 +293,9 @@
//unwrap the remote cursored stream
CursoredStream stream = (CursoredStream)getRemoteCursors().get(remoteCursoredStreamOid.getObject());
if (stream != null) {
- transporter.setObject(Integer.valueOf(stream.size()));
+ transporter.setObject(stream.size());
} else {
- transporter.setObject(Integer.valueOf(0));
+ transporter.setObject(0);
}
} catch (RuntimeException exception) {
transporter.setException(exception);
@@ -656,7 +656,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.absolute(rows)));
+ transporter.setObject(stream.absolute(rows));
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -723,9 +723,9 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Integer.valueOf(stream.currentIndex()));
+ transporter.setObject(stream.currentIndex());
} else {
- transporter.setObject(Integer.valueOf(0));
+ transporter.setObject(0);
}
} catch (RuntimeException exception) {
transporter.setException(exception);
@@ -741,7 +741,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.first()));
+ transporter.setObject(stream.first());
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -759,7 +759,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.isAfterLast()));
+ transporter.setObject(stream.isAfterLast());
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -777,7 +777,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.isBeforeFirst()));
+ transporter.setObject(stream.isBeforeFirst());
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -795,7 +795,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.isFirst()));
+ transporter.setObject(stream.isFirst());
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -813,7 +813,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.isLast()));
+ transporter.setObject(stream.isLast());
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -831,7 +831,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.last()));
+ transporter.setObject(stream.last());
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -909,7 +909,7 @@
try {
ScrollableCursor stream = (ScrollableCursor)getRemoteCursors().get(remoteScrollableCursorOid.getObject());
if (stream != null) {
- transporter.setObject(Boolean.valueOf(stream.relative(rows)));
+ transporter.setObject(stream.relative(rows));
} else {
transporter.setObject(Boolean.FALSE);
}
@@ -928,9 +928,9 @@
//unwrap the remote cursored stream
ScrollableCursor cursor = (ScrollableCursor)getRemoteCursors().get(remoteCursorOid.getObject());
if (cursor != null) {
- transporter.setObject(Integer.valueOf(cursor.size()));
+ transporter.setObject(cursor.size());
} else {
- transporter.setObject(Integer.valueOf(0));
+ transporter.setObject(0);
}
} catch (RuntimeException exception) {
transporter.setException(exception);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/SequencingFunctionCall.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/SequencingFunctionCall.java
index 5c834ee..b3b78aa 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/SequencingFunctionCall.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/sessions/remote/SequencingFunctionCall.java
@@ -27,14 +27,14 @@
public static class DoesExist extends SimpleFunctionCall {
@Override
protected Object execute(AbstractSession session) {
- return Boolean.valueOf(session.getSequencing() != null);
+ return session.getSequencing() != null;
}
}
public static class WhenShouldAcquireValueForAll extends SimpleFunctionCall {
@Override
protected Object execute(AbstractSession session) {
- return Integer.valueOf(session.getSequencing().whenShouldAcquireValueForAll());
+ return session.getSequencing().whenShouldAcquireValueForAll();
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java
index 3718329..14b9c1e 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java
@@ -257,7 +257,7 @@
@Override
public boolean shouldDisplayData() {
if (this.shouldDisplayData != null) {
- return shouldDisplayData.booleanValue();
+ return shouldDisplayData;
} else {
return this.level < SessionLog.CONFIG;
}
@@ -595,7 +595,7 @@
*/
@Override
public boolean shouldPrintSession() {
- return (shouldPrintSession == null) || shouldPrintSession.booleanValue();
+ return (shouldPrintSession == null) || shouldPrintSession;
}
/**
@@ -616,7 +616,7 @@
*/
@Override
public boolean shouldPrintConnection() {
- return (shouldPrintConnection == null) || shouldPrintConnection.booleanValue();
+ return (shouldPrintConnection == null) || shouldPrintConnection;
}
/**
@@ -640,7 +640,7 @@
if (shouldLogExceptionStackTrace == null) {
return getLevel() <= FINER;
} else {
- return shouldLogExceptionStackTrace.booleanValue();
+ return shouldLogExceptionStackTrace;
}
}
@@ -671,7 +671,7 @@
*/
@Override
public boolean shouldPrintDate() {
- return (shouldPrintDate == null) || (shouldPrintDate.booleanValue());
+ return (shouldPrintDate == null) || (shouldPrintDate);
}
/**
@@ -695,7 +695,7 @@
if (shouldPrintThread == null) {
return getLevel() <= FINE;
} else {
- return shouldPrintThread.booleanValue();
+ return shouldPrintThread;
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/CollectionMapping.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/CollectionMapping.java
index 6ed661e..a9a3bae 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/CollectionMapping.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/CollectionMapping.java
@@ -1595,7 +1595,7 @@
if (fireChangeEvents) {
// Objects removed from the first position in the list, so the index of the removed object is always 0.
// When event is processed the index is used only in listOrderField case, ignored otherwise.
- Integer zero = Integer.valueOf(0);
+ Integer zero = 0;
while (containerPolicy.hasNext(iterator)) {
CollectionChangeEvent event = containerPolicy.createChangeEvent(target, getAttributeName(), valueOfTarget, containerPolicy.next(iterator, mergeSession), CollectionChangeEvent.REMOVE, zero, false);
listener.internalPropertyChange(event);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DatabaseMapping.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DatabaseMapping.java
index 01c3f0e..dc269c0 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DatabaseMapping.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DatabaseMapping.java
@@ -111,11 +111,11 @@
protected static final Vector NO_FIELDS = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(0);
/** Used to share integer instance to reduce memory. */
- protected static final Integer NO_WEIGHT = Integer.valueOf(Integer.MAX_VALUE);
- protected static final Integer WEIGHT_DIRECT = Integer.valueOf(1);
- protected static final Integer WEIGHT_TRANSFORM = Integer.valueOf(100);
- protected static final Integer WEIGHT_AGGREGATE = Integer.valueOf(200);
- protected static final Integer WEIGHT_TO_ONE = Integer.valueOf(400);
+ protected static final Integer NO_WEIGHT = Integer.MAX_VALUE;
+ protected static final Integer WEIGHT_DIRECT = 1;
+ protected static final Integer WEIGHT_TRANSFORM = 100;
+ protected static final Integer WEIGHT_AGGREGATE = 200;
+ protected static final Integer WEIGHT_TO_ONE = 400;
/** ClassDescriptor to which this mapping belongs to */
protected ClassDescriptor descriptor;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DirectCollectionMapping.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DirectCollectionMapping.java
index 75637db..e4cc44b 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DirectCollectionMapping.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/DirectCollectionMapping.java
@@ -627,9 +627,9 @@
} else {
Integer count = (Integer)originalKeyValues.get(secondObject);
if (count == null) {
- originalKeyValues.put(secondObject, Integer.valueOf(1));
+ originalKeyValues.put(secondObject, 1);
} else {
- originalKeyValues.put(secondObject, Integer.valueOf(count.intValue() + 1));
+ originalKeyValues.put(secondObject, count + 1);
}
}
}
@@ -662,15 +662,15 @@
//Add it to the additions hashtable
if (cloneCount == null) {
- cloneKeyValues.put(firstObject, Integer.valueOf(1));
+ cloneKeyValues.put(firstObject, 1);
} else {
- cloneKeyValues.put(firstObject, Integer.valueOf(cloneCount.intValue() + 1));
+ cloneKeyValues.put(firstObject, cloneCount + 1);
}
- } else if (count.intValue() == 1) {
+ } else if (count == 1) {
//There is only one object so remove the whole reference
originalKeyValues.remove(firstObject);
} else {
- originalKeyValues.put(firstObject, Integer.valueOf(count.intValue() - 1));
+ originalKeyValues.put(firstObject, count - 1);
}
}
}
@@ -685,12 +685,12 @@
((DirectCollectionChangeRecord)changeRecord).setLatestCollection(null);
//For CR#2258, produce a changeRecord which reflects the addition and removal of null values.
if (numberOfNewNulls != 0) {
- ((DirectCollectionChangeRecord)changeRecord).getCommitAddMap().put(null, Integer.valueOf(databaseNullCount));
+ ((DirectCollectionChangeRecord)changeRecord).getCommitAddMap().put(null, databaseNullCount);
if (numberOfNewNulls > 0) {
- ((DirectCollectionChangeRecord)changeRecord).addAdditionChange(null, Integer.valueOf(numberOfNewNulls));
+ ((DirectCollectionChangeRecord)changeRecord).addAdditionChange(null, numberOfNewNulls);
} else {
numberOfNewNulls *= -1;
- ((DirectCollectionChangeRecord)changeRecord).addRemoveChange(null, Integer.valueOf(numberOfNewNulls));
+ ((DirectCollectionChangeRecord)changeRecord).addRemoveChange(null, numberOfNewNulls);
}
}
}
@@ -851,20 +851,20 @@
containerPolicy.hasNext(iter);) {
Object object = containerPolicy.next(iter, session);
if (firstCounter.containsKey(object)) {
- int count = ((Integer)firstCounter.get(object)).intValue();
- firstCounter.put(object, Integer.valueOf(++count));
+ int count = (Integer) firstCounter.get(object);
+ firstCounter.put(object, ++count);
} else {
- firstCounter.put(object, Integer.valueOf(1));
+ firstCounter.put(object, 1);
}
}
for (Object iter = containerPolicy.iteratorFor(secondCollection);
containerPolicy.hasNext(iter);) {
Object object = containerPolicy.next(iter, session);
if (secondCounter.containsKey(object)) {
- int count = ((Integer)secondCounter.get(object)).intValue();
- secondCounter.put(object, Integer.valueOf(++count));
+ int count = (Integer) secondCounter.get(object);
+ secondCounter.put(object, ++count);
} else {
- secondCounter.put(object, Integer.valueOf(1));
+ secondCounter.put(object, 1);
}
}
for (Iterator iterator = firstCounter.keySet().iterator(); iterator.hasNext();) {
@@ -2038,7 +2038,7 @@
// Next iterate over the changes and add them to the container
for (Iterator iterator = addObjects.keySet().iterator(); iterator.hasNext();) {
Object object = iterator.next();
- int objectCount = ((Integer)addObjects.get(object)).intValue();
+ int objectCount = (Integer) addObjects.get(object);
for (int i = 0; i < objectCount; ++i) {
if (mergeManager.shouldMergeChangesIntoDistributedCache()) {
//bug#4458089 and 4544532- check if collection contains new item before adding during merge into distributed cache
@@ -2052,7 +2052,7 @@
}
for (Iterator iterator = removeObjects.keySet().iterator(); iterator.hasNext();) {
Object object = iterator.next();
- int objectCount = ((Integer)removeObjects.get(object)).intValue();
+ int objectCount = (Integer) removeObjects.get(object);
for (int i = 0; i < objectCount; ++i) {
containerPolicy.removeFrom(object, valueOfTarget, session);
}
@@ -2151,7 +2151,7 @@
fireCollectionChangeEvents = true;
//Collections may not be indirect list or may have been replaced with user collection.
Object iterator = containerPolicy.iteratorFor(valueOfTarget);
- Integer zero = Integer.valueOf(0);//remove does not seem to use index.
+ Integer zero = 0;//remove does not seem to use index.
while (containerPolicy.hasNext(iterator)) {
// Bug304251: let the containerPolicy build the proper remove CollectionChangeEvent
CollectionChangeEvent event = containerPolicy.createChangeEvent(target, getAttributeName(), valueOfTarget, containerPolicy.next(iterator, mergeManager.getSession()), CollectionChangeEvent.REMOVE, zero, false);
@@ -2175,7 +2175,7 @@
Object sourceValue = containerPolicy.next(sourceValuesIterator, mergeManager.getSession());
if (fireCollectionChangeEvents) {
// Bug304251: let the containerPolicy build the proper remove CollectionChangeEvent
- CollectionChangeEvent event = containerPolicy.createChangeEvent(target, getAttributeName(), valueOfTarget, sourceValue, CollectionChangeEvent.ADD, Integer.valueOf(i), false);
+ CollectionChangeEvent event = containerPolicy.createChangeEvent(target, getAttributeName(), valueOfTarget, sourceValue, CollectionChangeEvent.ADD, i, false);
listener.internalPropertyChange(event);
}
containerPolicy.addInto(sourceValue, valueOfTarget, mergeManager.getSession());
@@ -2429,7 +2429,7 @@
writeQuery.getSession().getCommitManager().addDataModificationEvent(this, event);
Integer count = (Integer)changeRecord.getCommitAddMap().get(object);
if (count != null) {
- for (int counter = count.intValue(); counter > 0; --counter) {
+ for (int counter = count; counter > 0; --counter) {
thisRow = writeQuery.getTranslationRow().clone();
thisRow.add(getDirectField(), value);
// Hey I might actually want to use an inner class here... ok array for now.
@@ -2445,7 +2445,7 @@
iterator.hasNext();) {
Object object = iterator.next();
Integer count = (Integer)changeRecord.getAddObjectMap().get(object);
- for (int counter = count.intValue(); counter > 0; --counter) {
+ for (int counter = count; counter > 0; --counter) {
AbstractRecord thisRow = writeQuery.getTranslationRow().clone();
Object value = object;
if (getValueConverter() != null) {
@@ -3068,7 +3068,7 @@
}
}
if(!collectionChangeRecord.isDeferred() && this.listOrderField == null) {
- collectionChangeRecord.addAdditionChange(objectToAdd, Integer.valueOf(1));
+ collectionChangeRecord.addAdditionChange(objectToAdd, 1);
}
}
@@ -3110,7 +3110,7 @@
}
}
if(!collectionChangeRecord.isDeferred() && this.listOrderField == null) {
- collectionChangeRecord.addRemoveChange(objectToRemove, Integer.valueOf(1));
+ collectionChangeRecord.addRemoveChange(objectToRemove, 1);
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/ForeignReferenceMapping.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/ForeignReferenceMapping.java
index 262317a..29630e9 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/ForeignReferenceMapping.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/ForeignReferenceMapping.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -2390,7 +2390,7 @@
// this also helps the field indexing match.
int fieldStartIndex;
if (value instanceof Integer) {
- fieldStartIndex = ((Integer)value).intValue();
+ fieldStartIndex = (Integer) value;
} else {
// must be Map of classes to Integers
Map map = (Map)value;
@@ -2400,7 +2400,7 @@
} else {
cls = getDescriptor().getJavaClass();
}
- fieldStartIndex = ((Integer)map.get(cls)).intValue();
+ fieldStartIndex = (Integer) map.get(cls);
}
Vector trimedFields = new NonSynchronizedSubVector(row.getFields(), fieldStartIndex, row.size());
Vector trimedValues = new NonSynchronizedSubVector(row.getValues(), fieldStartIndex, row.size());
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/foundation/AbstractDirectMapping.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/foundation/AbstractDirectMapping.java
index 740a957..d41eef2 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/foundation/AbstractDirectMapping.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/mappings/foundation/AbstractDirectMapping.java
@@ -150,7 +150,7 @@
if (isMutable == null) {
return false;
}
- return isMutable.booleanValue();
+ return isMutable;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/mappings/nullpolicy/IsSetNullPolicy.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/mappings/nullpolicy/IsSetNullPolicy.java
index 03878fd..09903d5 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/mappings/nullpolicy/IsSetNullPolicy.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/mappings/nullpolicy/IsSetNullPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -168,7 +168,7 @@
private boolean isSet(Object object) {
try {
Boolean isSet = (Boolean) PrivilegedAccessHelper.invokeMethod(getIsSetMethod(object.getClass()), object, isSetParameters);
- return isSet.booleanValue();
+ return isSet;
} catch (Exception e) {
throw new RuntimeException(e);
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/record/MarshalRecord.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/record/MarshalRecord.java
index a86dda4..d1faaa5 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/record/MarshalRecord.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/oxm/record/MarshalRecord.java
@@ -528,7 +528,7 @@
if (null == index) {
start = 1;
} else {
- start = index.intValue();
+ start = index;
}
for (int x = start; x < xPathFragment.getIndexValue(); x++) {
element(xPathFragment);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/AccessPlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/AccessPlatform.java
index 6008fd7..3c33402 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/AccessPlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/AccessPlatform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -124,12 +124,12 @@
public Hashtable maximumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MAX_VALUE));
- values.put(Long.class, Long.valueOf(Long.MAX_VALUE));
- values.put(Double.class, Double.valueOf(Double.MAX_VALUE));
- values.put(Short.class, Short.valueOf(Short.MAX_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MAX_VALUE));
- values.put(Float.class, Float.valueOf(123456789));
+ values.put(Integer.class, Integer.MAX_VALUE);
+ values.put(Long.class, Long.MAX_VALUE);
+ values.put(Double.class, Double.MAX_VALUE);
+ values.put(Short.class, Short.MAX_VALUE);
+ values.put(Byte.class, Byte.MAX_VALUE);
+ values.put(Float.class, 123456789F);
values.put(java.math.BigInteger.class, new java.math.BigInteger("999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("99999999999999999999.9999999999999999999"));
return values;
@@ -144,12 +144,12 @@
public Hashtable minimumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MIN_VALUE));
- values.put(Long.class, Long.valueOf(Long.MIN_VALUE));
- values.put(Double.class, Double.valueOf(Double.MIN_VALUE));
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
- values.put(Float.class, Float.valueOf(-123456789));
+ values.put(Integer.class, Integer.MIN_VALUE);
+ values.put(Long.class, Long.MIN_VALUE);
+ values.put(Double.class, Double.MIN_VALUE);
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
+ values.put(Float.class, (float) -123456789);
values.put(java.math.BigInteger.class, new java.math.BigInteger("-999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("-9999999999999999999.9999999999999999999"));
return values;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java
index eb22a99..0c2ac95 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java
@@ -499,12 +499,12 @@
public Hashtable maximumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MAX_VALUE));
- values.put(Long.class, Long.valueOf(Integer.MAX_VALUE));
- values.put(Float.class, Float.valueOf(123456789));
- values.put(Double.class, Double.valueOf(Float.MAX_VALUE));
- values.put(Short.class, Short.valueOf(Short.MAX_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MAX_VALUE));
+ values.put(Integer.class, Integer.MAX_VALUE);
+ values.put(Long.class, (long) Integer.MAX_VALUE);
+ values.put(Float.class, 123456789F);
+ values.put(Double.class, (double) Float.MAX_VALUE);
+ values.put(Short.class, Short.MAX_VALUE);
+ values.put(Byte.class, Byte.MAX_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("0.999999999999999"));
return values;
@@ -523,12 +523,12 @@
public Hashtable minimumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MIN_VALUE));
- values.put(Long.class, Long.valueOf(Integer.MIN_VALUE));
- values.put(Float.class, Float.valueOf(-123456789));
- values.put(Double.class, Double.valueOf(Float.MIN_VALUE));
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
+ values.put(Integer.class, Integer.MIN_VALUE);
+ values.put(Long.class, (long) Integer.MIN_VALUE);
+ values.put(Float.class, (float) -123456789);
+ values.put(Double.class, (double) Float.MIN_VALUE);
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("-999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("-0.999999999999999"));
return values;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2ZPlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2ZPlatform.java
index 1fcbb3b..eaf7649 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2ZPlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2ZPlatform.java
@@ -334,7 +334,7 @@
} else if (parameter instanceof Boolean) {
methodName = "setJccBooleanAtName";
methodArgs = new Class[] {String.class, boolean.class};
- parameters = new Object[] {name, ((Boolean) parameter).booleanValue()};
+ parameters = new Object[] {name, (Boolean) parameter};
} else if (parameter == null) {
// Normally null is passed as a DatabaseField so the type is included, but in some case may be passed directly.
methodName = "setJccNullAtName";
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DBasePlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DBasePlatform.java
index 96706fa..b8f8a82 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DBasePlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DBasePlatform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -137,11 +137,11 @@
public Hashtable maximumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MAX_VALUE));
+ values.put(Integer.class, Integer.MAX_VALUE);
values.put(Long.class, Long.valueOf("922337203685478000"));
values.put(Double.class, Double.valueOf("99999999.999999999"));
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
values.put(Float.class, Float.valueOf("99999999.999999999"));
values.put(java.math.BigInteger.class, new java.math.BigInteger("922337203685478000"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("999999.999999999"));
@@ -157,11 +157,11 @@
public Hashtable minimumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MIN_VALUE));
+ values.put(Integer.class, Integer.MIN_VALUE);
values.put(Long.class, Long.valueOf("-922337203685478000"));
values.put(Double.class, Double.valueOf("-99999999.999999999"));
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
values.put(Float.class, Float.valueOf("-99999999.999999999"));
values.put(java.math.BigInteger.class, new java.math.BigInteger("-922337203685478000"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("-999999.999999999"));
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Informix11Platform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Informix11Platform.java
index 5d8647b..c8fccab 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Informix11Platform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Informix11Platform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2018 Jenzabar, Inc. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -121,7 +121,7 @@
*/
@Override
protected void initializePlatformOperators() {
- final ExpressionOperator distinctOverride = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Distinct));
+ final ExpressionOperator distinctOverride = ExpressionOperator.getOperator(ExpressionOperator.Distinct);
assert distinctOverride != null;
distinctOverride.printsAs("DISTINCT "); // no parens, one space
super.initializePlatformOperators();
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/InformixPlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/InformixPlatform.java
index 3b0fac8..9952e59 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/InformixPlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/InformixPlatform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2015 IBM Corporation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -242,12 +242,12 @@
public Hashtable maximumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MAX_VALUE));
- values.put(Long.class, Long.valueOf(Long.MAX_VALUE));
- values.put(Double.class, Double.valueOf(Float.MAX_VALUE));
- values.put(Short.class, Short.valueOf(Short.MAX_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MAX_VALUE));
- values.put(Float.class, Float.valueOf(Float.MAX_VALUE));
+ values.put(Integer.class, Integer.MAX_VALUE);
+ values.put(Long.class, Long.MAX_VALUE);
+ values.put(Double.class, (double) Float.MAX_VALUE);
+ values.put(Short.class, Short.MAX_VALUE);
+ values.put(Byte.class, Byte.MAX_VALUE);
+ values.put(Float.class, Float.MAX_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("99999999999999999999999999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("9999999999999999999.9999999999999999999"));
return values;
@@ -262,12 +262,12 @@
public Hashtable minimumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MIN_VALUE));
- values.put(Long.class, Long.valueOf(Long.MIN_VALUE));
- values.put(Double.class, Double.valueOf(1.4012984643247149E-44));// The double values are weird. They lose precision at E-45
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
- values.put(Float.class, Float.valueOf(Float.MIN_VALUE));
+ values.put(Integer.class, Integer.MIN_VALUE);
+ values.put(Long.class, Long.MIN_VALUE);
+ values.put(Double.class, 1.4012984643247149E-44);// The double values are weird. They lose precision at E-45
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
+ values.put(Float.class, Float.MIN_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("-99999999999999999999999999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("-9999999999999999999.9999999999999999999"));
return values;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Oracle8Platform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Oracle8Platform.java
index fbd59aa..a5b3809 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Oracle8Platform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/Oracle8Platform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -177,13 +177,13 @@
java.sql.Blob blob = (java.sql.Blob) resultSet.getObject(field.getName());
blob.setBytes(1, (byte[]) value);
//impose the localization
- session.log(SessionLog.FINEST, SessionLog.SQL, "write_BLOB", Long.valueOf(blob.length()), field.getName());
+ session.log(SessionLog.FINEST, SessionLog.SQL, "write_BLOB", blob.length(), field.getName());
} else if (isClob(field.getType())) {
// change for 338585 to use getName instead of getNameDelimited
java.sql.Clob clob = (java.sql.Clob) resultSet.getObject(field.getName());
clob.setString(1, (String) value);
//impose the localization
- session.log(SessionLog.FINEST, SessionLog.SQL, "write_CLOB", Long.valueOf(clob.length()), field.getName());
+ session.log(SessionLog.FINEST, SessionLog.SQL, "write_CLOB", clob.length(), field.getName());
} else {
// do nothing for now, open to BFILE or NCLOB types
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/OraclePlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/OraclePlatform.java
index 8a54cd8..d5c899e 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/OraclePlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/OraclePlatform.java
@@ -467,7 +467,7 @@
@Override
public String getSelectForUpdateWaitString(Integer waitTimeout) {
- return " FOR UPDATE WAIT " + waitTimeout.intValue();
+ return " FOR UPDATE WAIT " + waitTimeout;
}
@Override
@@ -677,12 +677,12 @@
public Hashtable maximumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MAX_VALUE));
- values.put(Long.class, Long.valueOf(Long.MAX_VALUE));
- values.put(Double.class, Double.valueOf(9.9999E125));
- values.put(Short.class, Short.valueOf(Short.MAX_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MAX_VALUE));
- values.put(Float.class, Float.valueOf(Float.MAX_VALUE));
+ values.put(Integer.class, Integer.MAX_VALUE);
+ values.put(Long.class, Long.MAX_VALUE);
+ values.put(Double.class, 9.9999E125);
+ values.put(Short.class, Short.MAX_VALUE);
+ values.put(Byte.class, Byte.MAX_VALUE);
+ values.put(Float.class, Float.MAX_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("0"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal(new java.math.BigInteger("0"), 38));
return values;
@@ -697,12 +697,12 @@
public Hashtable minimumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MIN_VALUE));
- values.put(Long.class, Long.valueOf(Long.MIN_VALUE));
- values.put(Double.class, Double.valueOf(-1E-129));
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
- values.put(Float.class, Float.valueOf(Float.MIN_VALUE));
+ values.put(Integer.class, Integer.MIN_VALUE);
+ values.put(Long.class, Long.MIN_VALUE);
+ values.put(Double.class, -1E-129);
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
+ values.put(Float.class, Float.MIN_VALUE);
values.put(java.math.BigInteger.class, new java.math.BigInteger("0"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal(new java.math.BigInteger("0"), 38));
return values;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/PostgreSQLPlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/PostgreSQLPlatform.java
index 14c844b..c989deb 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/PostgreSQLPlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/PostgreSQLPlatform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -93,7 +93,7 @@
*/
@Override
protected void appendBoolean(Boolean bool, Writer writer) throws IOException {
- if (bool.booleanValue()) {
+ if (bool) {
writer.write("\'1\'");
} else {
writer.write("\'0\'");
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SQLServerPlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SQLServerPlatform.java
index c95ab93..f363638 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SQLServerPlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SQLServerPlatform.java
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 1998, 2019 IBM Corporation. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -566,12 +566,12 @@
public Hashtable maximumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MAX_VALUE));
- values.put(Long.class, Long.valueOf(Long.MAX_VALUE));
- values.put(Double.class, Double.valueOf(0));
- values.put(Short.class, Short.valueOf(Short.MAX_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MAX_VALUE));
- values.put(Float.class, Float.valueOf(0));
+ values.put(Integer.class, Integer.MAX_VALUE);
+ values.put(Long.class, Long.MAX_VALUE);
+ values.put(Double.class, (double) 0);
+ values.put(Short.class, Short.MAX_VALUE);
+ values.put(Byte.class, Byte.MAX_VALUE);
+ values.put(Float.class, (float) 0);
values.put(java.math.BigInteger.class, new java.math.BigInteger("9999999999999999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("999999999.9999999999999999999"));
return values;
@@ -586,12 +586,12 @@
public Hashtable minimumNumericValues() {
Hashtable values = new Hashtable();
- values.put(Integer.class, Integer.valueOf(Integer.MIN_VALUE));
- values.put(Long.class, Long.valueOf(Long.MIN_VALUE));
- values.put(Double.class, Double.valueOf(-9));
- values.put(Short.class, Short.valueOf(Short.MIN_VALUE));
- values.put(Byte.class, Byte.valueOf(Byte.MIN_VALUE));
- values.put(Float.class, Float.valueOf(-9));
+ values.put(Integer.class, Integer.MIN_VALUE);
+ values.put(Long.class, Long.MIN_VALUE);
+ values.put(Double.class, (double) -9);
+ values.put(Short.class, Short.MIN_VALUE);
+ values.put(Byte.class, Byte.MIN_VALUE);
+ values.put(Float.class, (float) -9);
values.put(java.math.BigInteger.class, new java.math.BigInteger("-9999999999999999999999999999"));
values.put(java.math.BigDecimal.class, new java.math.BigDecimal("-999999999.9999999999999999999"));
return values;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SybasePlatform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SybasePlatform.java
index 5b91c6e..91b7ab1 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SybasePlatform.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/SybasePlatform.java
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 1998, 2019 IBM Corporation. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -578,7 +578,7 @@
values.put(Integer.class, Integer.MAX_VALUE);
values.put(Long.class, Long.MAX_VALUE);
- values.put(Double.class, Double.valueOf(Float.MAX_VALUE));
+ values.put(Double.class, (double) Float.MAX_VALUE);
values.put(Short.class, Short.MAX_VALUE);
values.put(Byte.class, Byte.MAX_VALUE);
values.put(Float.class, Float.MAX_VALUE);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/server/wls/WebLogicPlatformDetector.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/server/wls/WebLogicPlatformDetector.java
index 7c6a932..5f9bb3c 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/server/wls/WebLogicPlatformDetector.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/server/wls/WebLogicPlatformDetector.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -43,7 +43,7 @@
if (serverNameAndVersion != null) {
int idx = serverNameAndVersion.indexOf('.');
try {
- int version = Integer.valueOf(serverNameAndVersion.substring(0, idx));
+ int version = Integer.parseInt(serverNameAndVersion.substring(0, idx));
if (version >= 12) {
platform = TargetServer.WebLogic_12;
} else {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/xml/XMLPlatformException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/xml/XMLPlatformException.java
index e09a5e8..e544562 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/xml/XMLPlatformException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/xml/XMLPlatformException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -98,7 +98,7 @@
* @see org.eclipse.persistence.platform.xml.XMLSchemaReference#getType()
*/
public static XMLPlatformException xmlPlatformInvalidTypeException(int type) {
- Object[] args = { Integer.valueOf(type) };
+ Object[] args = {type};
int errorCode = XML_PLATFORM_INVALID_TYPE;
XMLPlatformException exception = new XMLPlatformException(ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
exception.setErrorCode(errorCode);
@@ -124,7 +124,7 @@
}
public static XMLPlatformException xmlPlatformSAXParseException(SAXParseException nestedException) {
- Object[] args = { Integer.valueOf(nestedException.getLineNumber()), nestedException.getSystemId(), nestedException.getMessage() };
+ Object[] args = {nestedException.getLineNumber(), nestedException.getSystemId(), nestedException.getMessage() };
int errorCode = XML_PLATFORM_PARSER_SAX_PARSE_EXCEPTION;
XMLPlatformException exception = new XMLPlatformException(ExceptionMessageGenerator.buildMessage(XMLPlatformException.class, errorCode, args));
exception.setErrorCode(errorCode);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DatabaseQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DatabaseQuery.java
index 88116d7..5b95dfe 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DatabaseQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DatabaseQuery.java
@@ -2362,7 +2362,7 @@
* PUBLIC: Bind all arguments to any SQL statement.
*/
public void setShouldBindAllParameters(boolean shouldBindAllParameters) {
- this.shouldBindAllParameters = Boolean.valueOf(shouldBindAllParameters);
+ this.shouldBindAllParameters = shouldBindAllParameters;
setIsPrepared(false);
}
@@ -2379,7 +2379,7 @@
* binding as well.
*/
public void setShouldCacheStatement(boolean shouldCacheStatement) {
- this.shouldCacheStatement = Boolean.valueOf(shouldCacheStatement);
+ this.shouldCacheStatement = shouldCacheStatement;
setIsPrepared(false);
}
@@ -2501,7 +2501,7 @@
public boolean shouldAllowNativeSQLQuery(boolean projectAllowsNativeQueries) {
// If allow native SQL query is undefined, use the project setting
// otherwise use the allow native SQL setting.
- return (allowNativeSQLQuery == null) ? projectAllowsNativeQueries : allowNativeSQLQuery.booleanValue();
+ return (allowNativeSQLQuery == null) ? projectAllowsNativeQueries : allowNativeSQLQuery;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteAllQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteAllQuery.java
index 88702e2..ba3941c 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteAllQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteAllQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -163,7 +163,7 @@
}
if (this.isInMemoryOnly) {
- result = Integer.valueOf(0);
+ result = 0;
} else {
result = this.queryMechanism.deleteAll();
}
@@ -201,7 +201,7 @@
}
} else {
if (this.isInMemoryOnly) {
- result = Integer.valueOf(0);
+ result = 0;
} else {
result = this.queryMechanism.deleteAll();// fire the SQL to the database
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteObjectQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteObjectQuery.java
index 3244ddd..51e4428 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteObjectQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DeleteObjectQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -221,7 +221,7 @@
// Cascade delete does not check optimistic lock, assume ok.
rowCount = 1;
} else {
- rowCount = getQueryMechanism().deleteObject().intValue();
+ rowCount = getQueryMechanism().deleteObject();
}
if (rowCount < 1) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DoesExistQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DoesExistQuery.java
index 29e2ea3..db7e48e 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DoesExistQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/DoesExistQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -245,7 +245,7 @@
AbstractRecord databaseRow = getQueryMechanism().selectRowForDoesExist(field);
// Null means no row was returned.
- return Boolean.valueOf(databaseRow != null);
+ return databaseRow != null;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/LoadGroup.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/LoadGroup.java
index 05360c1..8127dc7 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/LoadGroup.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/LoadGroup.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -96,7 +96,7 @@
if (this.isConcurrent == null) {
return false;
}
- return this.isConcurrent.booleanValue();
+ return this.isConcurrent;
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ModifyAllQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ModifyAllQuery.java
index 4a786a9..82bccb3 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ModifyAllQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ModifyAllQuery.java
@@ -209,7 +209,7 @@
* by the query.
*/
protected void invalidateCache() {
- if(result != null && result.intValue() == 0) {
+ if(result != null && result == 0) {
// no rows modified in the db - nothing to invalidate
return;
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectBuildingQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectBuildingQuery.java
index cf1f93f..5f63d61 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectBuildingQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectBuildingQuery.java
@@ -542,7 +542,7 @@
* with an object the acquires deferred locks behaves the same as its owner
*/
public boolean requiresDeferredLocks() {
- return requiresDeferredLocks != null && requiresDeferredLocks.booleanValue();
+ return requiresDeferredLocks != null && requiresDeferredLocks;
}
/**
@@ -611,7 +611,7 @@
if (session != null && session.getProject().isQueryCacheForceDeferredLocks()) {
this.requiresDeferredLocks = true;
} else {
- this.requiresDeferredLocks = Boolean.valueOf(cascadeDeferredLocks);
+ this.requiresDeferredLocks = cascadeDeferredLocks;
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectLevelReadQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectLevelReadQuery.java
index 3e8db6b..9092285 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectLevelReadQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ObjectLevelReadQuery.java
@@ -507,7 +507,7 @@
final Boolean useCustomQuery = checkCustomQueryFlag(session, translationRow);
checkDescriptor(session);
ObjectLevelReadQuery customQuery;
- if (useCustomQuery != null && useCustomQuery.booleanValue()) {
+ if (useCustomQuery != null && useCustomQuery) {
customQuery = getReadQuery();
if (this.accessors != null) {
customQuery = (ObjectLevelReadQuery) customQuery.clone();
@@ -2194,7 +2194,7 @@
if (timeout == null) {
setLockMode(ObjectBuildingQuery.LOCK);
} else {
- if (timeout.intValue() == 0) {
+ if (timeout == 0) {
setLockMode(ObjectBuildingQuery.LOCK_NOWAIT);
} else {
convertedTimeout = TimeUnit.SECONDS.convert(timeout, timeoutUnit);
@@ -2770,7 +2770,7 @@
if (shouldOuterJoinSubclasses == null) {
return false;
}
- return shouldOuterJoinSubclasses.booleanValue();
+ return shouldOuterJoinSubclasses;
}
/**
@@ -2780,7 +2780,7 @@
* a root or branch inheritance class that has subclasses that span multiple tables.
*/
public void setShouldOuterJoinSubclasses(boolean shouldOuterJoinSubclasses) {
- this.shouldOuterJoinSubclasses = Boolean.valueOf(shouldOuterJoinSubclasses);
+ this.shouldOuterJoinSubclasses = shouldOuterJoinSubclasses;
setIsPrepared(false);
}
@@ -2843,9 +2843,9 @@
*/
protected boolean isReferenceClassLocked() {
if (isReferenceClassLocked == null) {
- isReferenceClassLocked = Boolean.valueOf(isLockQuery() && lockingClause.isReferenceClassLocked());
+ isReferenceClassLocked = isLockQuery() && lockingClause.isReferenceClassLocked();
}
- return isReferenceClassLocked.booleanValue();
+ return isReferenceClassLocked;
}
/**
@@ -2944,7 +2944,7 @@
* Set if the query should be optimized to build directly from the result set.
*/
public void setIsResultSetAccessOptimizedQuery(boolean isResultSetAccessOptimizedQuery) {
- if (this.isResultSetAccessOptimizedQuery == null || this.isResultSetAccessOptimizedQuery.booleanValue() != isResultSetOptimizedQuery) {
+ if (this.isResultSetAccessOptimizedQuery == null || this.isResultSetAccessOptimizedQuery != isResultSetOptimizedQuery) {
this.isResultSetAccessOptimizedQuery = isResultSetAccessOptimizedQuery;
this.usesResultSetAccessOptimization = null;
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReadAllQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReadAllQuery.java
index 289c2ac..019a16d 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReadAllQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReadAllQuery.java
@@ -277,7 +277,7 @@
&& isDefaultPropertiesQuery() && (!hasOrderByExpressions())
&& descriptor.getQueryManager().hasReadAllQuery();
setIsCustomQueryUsed(useCustomQueryValue);
- return Boolean.valueOf(useCustomQueryValue);
+ return useCustomQueryValue;
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReportQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReportQuery.java
index 2b5df3c..91ed4f1 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReportQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/ReportQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -947,7 +947,7 @@
Vector fieldExpressions = NonSynchronizedVector.newInstance(getItems().size());
if (shouldSelectValue1()) {
- Expression one = new ConstantExpression(Integer.valueOf(1), new ExpressionBuilder());
+ Expression one = new ConstantExpression(1, new ExpressionBuilder());
this.addItem("one", one);
this.dontUseDistinct();
fieldExpressions.addElement(one);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/WriteObjectQuery.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/WriteObjectQuery.java
index f9f6b39..11902cc 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/WriteObjectQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/queries/WriteObjectQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -85,7 +85,7 @@
existQuery.setDescriptor(this.descriptor);
existQuery.setTranslationRow(getTranslationRow());
- doesExist = ((Boolean)getSession().executeQuery(existQuery)).booleanValue();
+ doesExist = (Boolean) getSession().executeQuery(existQuery);
}
// Do insert of update
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sequencing/QuerySequence.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sequencing/QuerySequence.java
index 30a1e17..2f107dd 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sequencing/QuerySequence.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sequencing/QuerySequence.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -271,7 +271,7 @@
*/
@Override
protected Number updateAndSelectSequence(Accessor accessor, AbstractSession writeSession, String seqName, int size) {
- Integer sizeInteger = Integer.valueOf(size);
+ Integer sizeInteger = size;
if (shouldSkipUpdate()) {
return (Number)select(accessor, writeSession, seqName, sizeInteger);
} else {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/services/RuntimeServices.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/services/RuntimeServices.java
index 97d926c..7be75e0 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/services/RuntimeServices.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/services/RuntimeServices.java
@@ -262,8 +262,8 @@
if (ClassConstants.ServerSession_Class.isAssignableFrom(getSession().getClass())) {
ConnectionPool connectionPool = ((ServerSession)getSession()).getConnectionPool(poolName);
if (connectionPool != null) {
- results.add(Integer.valueOf(connectionPool.getMaxNumberOfConnections()));
- results.add(Integer.valueOf(connectionPool.getMinNumberOfConnections()));
+ results.add(connectionPool.getMaxNumberOfConnections());
+ results.add(connectionPool.getMinNumberOfConnections());
}
}
return results;
@@ -346,7 +346,7 @@
*/
public Integer getNumberOfObjectsInIdentityMap(String className) throws ClassNotFoundException {
Class classToChange = (Class)getSession().getDatasourcePlatform().getConversionManager().convertObject(className, ClassConstants.CLASS);
- return Integer.valueOf(getSession().getIdentityMapAccessorInstance().getIdentityMap(classToChange).getSize());
+ return getSession().getIdentityMapAccessorInstance().getIdentityMap(classToChange).getSize();
}
/**
@@ -377,12 +377,12 @@
*/
public Integer getNumberOfObjectsInIdentityMapSubCache(String className) throws ClassNotFoundException {
//This needs to use the Session's active class loader (not implemented yet)
- Integer result = Integer.valueOf(0);
+ Integer result = 0;
Class classToChange = (Class)getSession().getDatasourcePlatform().getConversionManager().convertObject(className, ClassConstants.CLASS);
IdentityMap map = getSession().getIdentityMapAccessorInstance().getIdentityMap(classToChange);
if (map.getClass().isAssignableFrom(ClassConstants.HardCacheWeakIdentityMap_Class)) {
List subCache = ((HardCacheWeakIdentityMap)map).getReferenceCache();
- result = Integer.valueOf(subCache.size());
+ result = subCache.size();
}
return result;
}
@@ -478,7 +478,7 @@
* This will log at the INFO level a summary of all elements in the profile.
*/
public void printProfileSummary() {
- if (!this.getUsesEclipseLinkProfiling().booleanValue()) {
+ if (!this.getUsesEclipseLinkProfiling()) {
return;
}
PerformanceProfiler performanceProfiler = (PerformanceProfiler)getSession().getProfiler();
@@ -509,7 +509,7 @@
* by Class.
*/
public void printProfileSummaryByClass() {
- if (!this.getUsesEclipseLinkProfiling().booleanValue()) {
+ if (!this.getUsesEclipseLinkProfiling()) {
return;
}
PerformanceProfiler performanceProfiler = (PerformanceProfiler)getSession().getProfiler();
@@ -523,7 +523,7 @@
* by Query.
*/
public void printProfileSummaryByQuery() {
- if (!this.getUsesEclipseLinkProfiling().booleanValue()) {
+ if (!this.getUsesEclipseLinkProfiling()) {
return;
}
PerformanceProfiler performanceProfiler = (PerformanceProfiler)getSession().getProfiler();
@@ -535,7 +535,7 @@
* Possible values are: "EclipseLink" or "None".
*/
public synchronized String getProfilingType() {
- if (getUsesEclipseLinkProfiling().booleanValue()) {
+ if (getUsesEclipseLinkProfiling()) {
return EclipseLink_Product_Name;
} else {
return "None";
@@ -559,7 +559,7 @@
* This method is used to turn on EclipseLink Performance Profiling
*/
public void setUseEclipseLinkProfiling() {
- if (getUsesEclipseLinkProfiling().booleanValue()) {
+ if (getUsesEclipseLinkProfiling()) {
return;
}
getSession().setProfiler(new PerformanceProfiler());
@@ -577,7 +577,7 @@
* This method answers true if EclipseLink Performance Profiling is on.
*/
public Boolean getUsesEclipseLinkProfiling() {
- return Boolean.valueOf(getSession().getProfiler() instanceof PerformanceProfiler);
+ return getSession().getProfiler() instanceof PerformanceProfiler;
}
/**
@@ -888,7 +888,7 @@
if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) {
return Boolean.FALSE;
}
- return Boolean.valueOf(((DatabaseLogin)getSession().getDatasourceLogin()).shouldBindAllParameters());
+ return ((DatabaseLogin) getSession().getDatasourceLogin()).shouldBindAllParameters();
}
/**
@@ -898,19 +898,19 @@
*/
public Integer getStringBindingSize() {
if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) {
- return Integer.valueOf(0);
+ return 0;
}
if (!getSession().getDatasourceLogin().getPlatform().usesStringBinding()) {
- return Integer.valueOf(0);
+ return 0;
}
- return Integer.valueOf(((DatabaseLogin)getSession().getDatasourceLogin()).getStringBindingSize());
+ return ((DatabaseLogin) getSession().getDatasourceLogin()).getStringBindingSize();
}
/**
* This method will return if batchWriting is in use or not.
*/
public Boolean getUsesBatchWriting() {
- return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesBatchWriting());
+ return getSession().getDatasourceLogin().getPlatform().usesBatchWriting();
}
/**
@@ -918,7 +918,7 @@
* session connected to the database.
*/
public Long getTimeConnectionEstablished() {
- return Long.valueOf(((DatabaseSessionImpl)getSession()).getConnectedTime());
+ return ((DatabaseSessionImpl) getSession()).getConnectedTime();
}
/**
@@ -928,7 +928,7 @@
if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) {
return Boolean.FALSE;
}
- return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesJDBCBatchWriting());
+ return getSession().getDatasourceLogin().getPlatform().usesJDBCBatchWriting();
}
/**
@@ -938,7 +938,7 @@
if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) {
return Boolean.FALSE;
}
- return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesByteArrayBinding());
+ return getSession().getDatasourceLogin().getPlatform().usesByteArrayBinding();
}
/**
@@ -948,7 +948,7 @@
if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) {
return Boolean.FALSE;
}
- return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesNativeSQL());
+ return getSession().getDatasourceLogin().getPlatform().usesNativeSQL();
}
/**
@@ -958,7 +958,7 @@
if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) {
return Boolean.FALSE;
}
- return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesStreamsForBinding());
+ return getSession().getDatasourceLogin().getPlatform().usesStreamsForBinding();
}
/**
@@ -968,7 +968,7 @@
if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) {
return Boolean.FALSE;
}
- return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesStringBinding());
+ return getSession().getDatasourceLogin().getPlatform().usesStringBinding();
}
/**
@@ -978,7 +978,7 @@
if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) {
return Boolean.FALSE;
}
- return Boolean.valueOf(((DatabaseLogin)getSession().getDatasourceLogin()).shouldCacheAllStatements());
+ return ((DatabaseLogin) getSession().getDatasourceLogin()).shouldCacheAllStatements();
}
/**
@@ -1019,10 +1019,10 @@
if (ClassConstants.ServerSession_Class.isAssignableFrom(getSession().getClass())) {
ConnectionPool connectionPool = ((ServerSession)getSession()).getConnectionPool(poolName);
if (connectionPool != null) {
- return Integer.valueOf(connectionPool.getMaxNumberOfConnections());
+ return connectionPool.getMaxNumberOfConnections();
}
}
- return Integer.valueOf(-1);
+ return -1;
}
/**
@@ -1034,10 +1034,10 @@
if (ClassConstants.ServerSession_Class.isAssignableFrom(getSession().getClass())) {
ConnectionPool connectionPool = ((ServerSession)getSession()).getConnectionPool(poolName);
if (connectionPool != null) {
- return Integer.valueOf(connectionPool.getMinNumberOfConnections());
+ return connectionPool.getMinNumberOfConnections();
}
}
- return Integer.valueOf(-1);
+ return -1;
}
/**
@@ -1151,14 +1151,14 @@
//Check if there aren't any classes registered
if (classesRegistered.size() == 0) {
((AbstractSession)session).log(SessionLog.INFO, SessionLog.SERVER, "jmx_mbean_runtime_services_no_identity_maps_in_session");
- return Integer.valueOf(0);
+ return 0;
}
//get each identity map, and log the size
for (int index = 0; index < classesRegistered.size(); index++) {
registeredClassName = (String)classesRegistered.elementAt(index);
try {
- sum += this.getNumberOfObjectsInIdentityMap(registeredClassName).intValue();
+ sum += this.getNumberOfObjectsInIdentityMap(registeredClassName);
} catch (ClassNotFoundException classNotFound) {
//we are enumerating registered classes, so this shouldn't happen. Print anyway
classNotFound.printStackTrace();
@@ -1166,7 +1166,7 @@
}
}
- return Integer.valueOf(sum);
+ return sum;
}
/**
@@ -1186,7 +1186,7 @@
}
}
- return Integer.valueOf(classesTable.size());
+ return classesTable.size();
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/CopyGroup.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/CopyGroup.java
index a33e269..0a6aa2d 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/CopyGroup.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/CopyGroup.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -237,7 +237,7 @@
} else {
depthString = "NO_CASCADE";
}
- Object[] args = { depthString, Boolean.valueOf(shouldResetPrimaryKey()), Boolean.valueOf(shouldResetVersion())};
+ Object[] args = { depthString, shouldResetPrimaryKey(), shouldResetVersion()};
return ToStringLocalization.buildMessage("depth_reset_key", args);
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/Project.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/Project.java
index f3277cb..cf59736 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/Project.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/Project.java
@@ -189,7 +189,7 @@
protected Map<String, PartitioningPolicy> partitioningPolicies;
/** Ensures that only one thread at a time can add/remove descriptors */
- protected Object descriptorsLock = Boolean.valueOf(true);
+ protected Object descriptorsLock = Boolean.TRUE;
/** VPD connection settings */
protected String vpdIdentifier;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/remote/rmi/RMIConnection.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/remote/rmi/RMIConnection.java
index f0eb8e8..103d1c7 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/remote/rmi/RMIConnection.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/remote/rmi/RMIConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -223,7 +223,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
@@ -484,7 +484,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -553,7 +553,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
/**
@@ -575,7 +575,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -596,7 +596,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -619,7 +619,7 @@
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -641,7 +641,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -663,7 +663,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -685,7 +685,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -772,7 +772,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Boolean)transporter.getObject()).booleanValue();
+ return (Boolean) transporter.getObject();
}
/**
@@ -789,7 +789,7 @@
if (!transporter.wasOperationSuccessful()) {
throw transporter.getException();
}
- return ((Integer)transporter.getObject()).intValue();
+ return (Integer) transporter.getObject();
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/server/ConnectionPool.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/server/ConnectionPool.java
index 6ed4545..670b48b 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/server/ConnectionPool.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/sessions/server/ConnectionPool.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -148,7 +148,7 @@
}
this.connectionsUsed.add(connection);
if (this.owner.isInProfile()) {
- this.owner.updateProfile(MONITOR_HEADER + this.name, Integer.valueOf(this.connectionsUsed.size()));
+ this.owner.updateProfile(MONITOR_HEADER + this.name, this.connectionsUsed.size());
}
if (this.owner.shouldLog(SessionLog.FINEST, SessionLog.CONNECTION)) {
Object[] args = new Object[1];
@@ -199,7 +199,7 @@
}
this.connectionsUsed.add(connection);
if (this.owner.isInProfile()) {
- this.owner.updateProfile(MONITOR_HEADER + this.name, Integer.valueOf(this.connectionsUsed.size()));
+ this.owner.updateProfile(MONITOR_HEADER + this.name, this.connectionsUsed.size());
}
if (this.owner.shouldLog(SessionLog.FINEST, SessionLog.CONNECTION)) {
Object[] args = new Object[1];
@@ -348,7 +348,7 @@
}
}
if (this.owner.isInProfile()) {
- this.owner.updateProfile(MONITOR_HEADER + this.name, Integer.valueOf(this.connectionsUsed.size()));
+ this.owner.updateProfile(MONITOR_HEADER + this.name, this.connectionsUsed.size());
}
notify();
}
@@ -516,7 +516,7 @@
*/
@Override
public String toString() {
- Object[] args = { Integer.valueOf(getMinNumberOfConnections()), Integer.valueOf(getMaxNumberOfConnections()) };
+ Object[] args = {getMinNumberOfConnections(), getMaxNumberOfConnections()};
return Helper.getShortClassName(getClass()) + ToStringLocalization.buildMessage("min_max", args);
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/FetchGroupMonitor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/FetchGroupMonitor.java
index a58a875..ca1830e 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/FetchGroupMonitor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/FetchGroupMonitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -44,7 +44,7 @@
shouldMonitor = Boolean.TRUE;
}
}
- return shouldMonitor.booleanValue();
+ return shouldMonitor;
}
public static void recordFetchedAttribute(Class<?> domainClass, String attributeName) {
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceMonitor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceMonitor.java
index 24d6dc7..d5aaa38 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceMonitor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceMonitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -101,7 +101,7 @@
for (String operation : operations) {
Object value = this.operationTimings.get(operation);
if (value == null) {
- value = Long.valueOf(0);
+ value = 0L;
}
writer.write(operation);
writer.write("\t");
@@ -134,14 +134,14 @@
if (startTime == null) {
return;
}
- long time = endTime - startTime.longValue();
+ long time = endTime - startTime;
synchronized (this.operationTimings) {
Long totalTime = (Long)this.operationTimings.get(operationName);
if (totalTime == null) {
- this.operationTimings.put(operationName, Long.valueOf(time));
+ this.operationTimings.put(operationName, time);
} else {
- this.operationTimings.put(operationName, Long.valueOf(totalTime.longValue() + time));
+ this.operationTimings.put(operationName, totalTime + time);
}
}
}
@@ -162,7 +162,7 @@
}
protected Map<String, Long> getOperationStartTimes() {
- Integer threadId = Integer.valueOf(Thread.currentThread().hashCode());
+ Integer threadId = Thread.currentThread().hashCode();
Map<String, Long> times = this.operationStartTimesByThread.get(threadId);
if (times == null) {
times = new Hashtable<>();
@@ -220,7 +220,7 @@
*/
@Override
public void startOperationProfile(String operationName) {
- getOperationStartTimes().put(operationName, Long.valueOf(System.nanoTime()));
+ getOperationStartTimes().put(operationName, System.nanoTime());
}
/**
@@ -251,9 +251,9 @@
synchronized (this.operationTimings) {
Long occurred = (Long)this.operationTimings.get(operationName);
if (occurred == null) {
- this.operationTimings.put(operationName, Long.valueOf(1));
+ this.operationTimings.put(operationName, 1L);
} else {
- this.operationTimings.put(operationName, Long.valueOf(occurred.longValue() + 1));
+ this.operationTimings.put(operationName, occurred + 1);
}
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceProfiler.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceProfiler.java
index 27727e3..1dc3bc3 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceProfiler.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/PerformanceProfiler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -100,14 +100,14 @@
operationNames.hasMoreElements();) {
String name = (String)operationNames.nextElement();
Long oldTime = (Long)summary.getOperationTimings().get(name);
- long profileTime = ((Long)profile.getOperationTimings().get(name)).longValue();
+ long profileTime = (Long) profile.getOperationTimings().get(name);
long newTime;
if (oldTime == null) {
newTime = profileTime;
} else {
- newTime = oldTime.longValue() + profileTime;
+ newTime = oldTime + profileTime;
}
- summary.getOperationTimings().put(name, Long.valueOf(newTime));
+ summary.getOperationTimings().put(name, newTime);
}
}
@@ -147,14 +147,14 @@
operationNames.hasMoreElements();) {
String name = (String)operationNames.nextElement();
Long oldTime = (Long)summary.getOperationTimings().get(name);
- long profileTime = ((Long)profile.getOperationTimings().get(name)).longValue();
+ long profileTime = (Long) profile.getOperationTimings().get(name);
long newTime;
if (oldTime == null) {
newTime = profileTime;
} else {
- newTime = oldTime.longValue() + profileTime;
+ newTime = oldTime + profileTime;
}
- summary.getOperationTimings().put(name, Long.valueOf(newTime));
+ summary.getOperationTimings().put(name, newTime);
}
}
@@ -188,14 +188,14 @@
operationNames.hasMoreElements();) {
String name = (String)operationNames.nextElement();
Long oldTime = (Long)summary.getOperationTimings().get(name);
- long profileTime = ((Long)profile.getOperationTimings().get(name)).longValue();
+ long profileTime = (Long) profile.getOperationTimings().get(name);
long newTime;
if (oldTime == null) {
newTime = profileTime;
} else {
- newTime = oldTime.longValue() + profileTime;
+ newTime = oldTime + profileTime;
}
- summary.getOperationTimings().put(name, Long.valueOf(newTime));
+ summary.getOperationTimings().put(name, newTime);
}
}
@@ -231,7 +231,7 @@
if (startTime == null) {
return;
}
- long time = endTime - startTime.longValue();
+ long time = endTime - startTime;
if (getNestLevel() == 0) {
// Log as a profile if not within query execution,
@@ -257,9 +257,9 @@
Long totalTime = getOperationTimings().get(operationName);
if (totalTime == null) {
- getOperationTimings().put(operationName, Long.valueOf(time));
+ getOperationTimings().put(operationName, time);
} else {
- getOperationTimings().put(operationName, Long.valueOf(totalTime.longValue() + time));
+ getOperationTimings().put(operationName, totalTime + time);
}
}
@@ -281,7 +281,7 @@
}
protected Map<String, Long> getOperationStartTimes() {
- Integer threadId = Integer.valueOf(Thread.currentThread().hashCode());
+ Integer threadId = Thread.currentThread().hashCode();
if (getOperationStartTimesByThread().get(threadId) == null) {
getOperationStartTimesByThread().put(threadId, new Hashtable(10));
}
@@ -293,7 +293,7 @@
}
protected Map<String, Long> getOperationTimings() {
- Integer threadId = Integer.valueOf(Thread.currentThread().hashCode());
+ Integer threadId = Thread.currentThread().hashCode();
if (getOperationTimingsByThread().get(threadId) == null) {
getOperationTimingsByThread().put(threadId, new Hashtable(10));
}
@@ -416,10 +416,10 @@
for (String name : getOperationTimings().keySet()) {
Long operationStartTime = timingsBeforeExecution.get(name);
- long operationEndTime = getOperationTimings().get(name).longValue();
+ long operationEndTime = getOperationTimings().get(name);
long operationTime;
if (operationStartTime != null) {
- operationTime = operationEndTime - operationStartTime.longValue();
+ operationTime = operationEndTime - operationStartTime;
} else {
operationTime = operationEndTime;
}
@@ -465,7 +465,7 @@
setProfileTime(getProfileTime() + (totalTimeIncludingProfiling - (endTime - startTime)));
profile.setProfileTime(totalTimeIncludingProfiling - profile.getTotalTime());
for (String timingName : ((Map<String, Long>)(((Hashtable)startTimingsBeforeExecution).clone())).keySet()) {
- startTimingsBeforeExecution.put(timingName, Long.valueOf(((Number)startTimingsBeforeExecution.get(timingName)).longValue() + totalTimeIncludingProfiling));
+ startTimingsBeforeExecution.put(timingName, ((Number) startTimingsBeforeExecution.get(timingName)).longValue() + totalTimeIncludingProfiling);
}
}
}
@@ -483,7 +483,7 @@
}
protected void setOperationStartTimes(Map<String, Long> operationStartTimes) {
- Integer threadId = Integer.valueOf(Thread.currentThread().hashCode());
+ Integer threadId = Thread.currentThread().hashCode();
getOperationStartTimesByThread().put(threadId, operationStartTimes);
}
@@ -492,7 +492,7 @@
}
protected void setOperationTimings(Map<String, Long> operationTimings) {
- Integer threadId = Integer.valueOf(Thread.currentThread().hashCode());
+ Integer threadId = Thread.currentThread().hashCode();
getOperationTimingsByThread().put(threadId, operationTimings);
}
@@ -532,7 +532,7 @@
*/
@Override
public void startOperationProfile(String operationName) {
- getOperationStartTimes().put(operationName, Long.valueOf(System.nanoTime()));
+ getOperationStartTimes().put(operationName, System.nanoTime());
}
/**
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/Profile.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/Profile.java
index 803bc20..77ec18a 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/Profile.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/Profile.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -47,7 +47,7 @@
}
public void addTiming(String name, long time) {
- getOperationTimings().put(name, Long.valueOf(time));
+ getOperationTimings().put(name, time);
}
@Override
@@ -185,7 +185,7 @@
for (Enumeration operationNames = getOperationTimings().keys();
operationNames.hasMoreElements();) {
String operationName = (String)operationNames.nextElement();
- long operationTime = ((Long)getOperationTimings().get(operationName)).longValue();
+ long operationTime = (Long) getOperationTimings().get(operationName);
if (operationTime != 0) {
profiler.writeNestingTabs(writer);
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/QueryMonitor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/QueryMonitor.java
index ed3857d..f0736c5 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/QueryMonitor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/profiler/QueryMonitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -50,7 +50,7 @@
shouldMonitor = Boolean.TRUE;
}
}
- return shouldMonitor.booleanValue();
+ return shouldMonitor;
}
public static void checkDumpTime() {
@@ -71,11 +71,11 @@
for (String query : queries) {
Number hits = cacheHits.get(query);
if (hits == null) {
- hits = Integer.valueOf(0);
+ hits = 0;
}
Number misses = cacheMisses.get(query);
if (misses == null) {
- misses = Integer.valueOf(0);
+ misses = 0;
}
writer.write(query);
writer.write("\t");
@@ -93,9 +93,9 @@
String name = query.getReferenceClass().getName() + "-findByPrimaryKey";
Number hits = cacheHits.get(name);
if (hits == null) {
- hits = Integer.valueOf(0);
+ hits = 0;
}
- hits = Integer.valueOf(hits.intValue() + 1);
+ hits = hits.intValue() + 1;
cacheHits.put(name, hits);
}
@@ -104,9 +104,9 @@
String name = query.getReferenceClass().getName() + "-findByPrimaryKey";
Number misses = cacheMisses.get(name);
if (misses == null) {
- misses = Integer.valueOf(0);
+ misses = 0;
}
- misses = Integer.valueOf(misses.intValue() + 1);
+ misses = misses.intValue() + 1;
cacheMisses.put(name, misses);
}
@@ -120,9 +120,9 @@
}
Number hits = cacheHits.get(name);
if (hits == null) {
- hits = Integer.valueOf(0);
+ hits = 0;
}
- hits = Integer.valueOf(hits.intValue() + 1);
+ hits = hits.intValue() + 1;
cacheHits.put(name, hits);
}
@@ -136,9 +136,9 @@
}
Number misses = cacheMisses.get(name);
if (misses == null) {
- misses = Integer.valueOf(0);
+ misses = 0;
}
- misses = Integer.valueOf(misses.intValue() + 1);
+ misses = misses.intValue() + 1;
cacheMisses.put(name, misses);
}
@@ -147,9 +147,9 @@
String name = query.getReferenceClass().getName() + "-insert";
Number misses = cacheMisses.get(name);
if (misses == null) {
- misses = Integer.valueOf(0);
+ misses = 0;
}
- misses = Integer.valueOf(misses.intValue() + 1);
+ misses = misses.intValue() + 1;
cacheMisses.put(name, misses);
}
@@ -158,9 +158,9 @@
String name = query.getReferenceClass().getName() + "-update";
Number misses = cacheMisses.get(name);
if (misses == null) {
- misses = Integer.valueOf(0);
+ misses = 0;
}
- misses = Integer.valueOf(misses.intValue() + 1);
+ misses = misses.intValue() + 1;
cacheMisses.put(name, misses);
}
@@ -169,9 +169,9 @@
String name = query.getReferenceClass().getName() + "-delete";
Number misses = cacheMisses.get(name);
if (misses == null) {
- misses = Integer.valueOf(0);
+ misses = 0;
}
- misses = Integer.valueOf(misses.intValue() + 1);
+ misses = misses.intValue() + 1;
cacheMisses.put(name, misses);
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureDefinition.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureDefinition.java
index 47e20e4..a81b4b4 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureDefinition.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureDefinition.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -34,9 +34,9 @@
protected Vector statements;
protected Vector arguments;
protected Vector argumentTypes;
- protected static final Integer IN = Integer.valueOf(1);
- protected static final Integer OUT = Integer.valueOf(2);
- protected static final Integer INOUT = Integer.valueOf(3);
+ protected static final Integer IN = 1;
+ protected static final Integer OUT = 2;
+ protected static final Integer INOUT = 3;
public StoredProcedureDefinition() {
this.statements = new Vector();
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureGenerator.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureGenerator.java
index b234673..fdb785c 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureGenerator.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/tools/schemaframework/StoredProcedureGenerator.java
@@ -89,26 +89,26 @@
*/
protected void buildIntToTypeConverterHash() {
this.intToTypeConverterHash = new Hashtable();
- this.intToTypeConverterHash.put(Integer.valueOf(8), Double.class);
- this.intToTypeConverterHash.put(Integer.valueOf(-7), Boolean.class);
- this.intToTypeConverterHash.put(Integer.valueOf(-3), Byte[].class);
- this.intToTypeConverterHash.put(Integer.valueOf(-6), Short.class);
- this.intToTypeConverterHash.put(Integer.valueOf(5), Short.class);
- this.intToTypeConverterHash.put(Integer.valueOf(4), Integer.class);
- this.intToTypeConverterHash.put(Integer.valueOf(2), java.math.BigDecimal.class);
- this.intToTypeConverterHash.put(Integer.valueOf(6), Float.class);
- this.intToTypeConverterHash.put(Integer.valueOf(1), Character.class);
- this.intToTypeConverterHash.put(Integer.valueOf(12), String.class);
- this.intToTypeConverterHash.put(Integer.valueOf(91), java.sql.Date.class);
- this.intToTypeConverterHash.put(Integer.valueOf(93), java.sql.Timestamp.class);
- this.intToTypeConverterHash.put(Integer.valueOf(3), java.math.BigDecimal.class);
+ this.intToTypeConverterHash.put(8, Double.class);
+ this.intToTypeConverterHash.put(-7, Boolean.class);
+ this.intToTypeConverterHash.put(-3, Byte[].class);
+ this.intToTypeConverterHash.put(-6, Short.class);
+ this.intToTypeConverterHash.put(5, Short.class);
+ this.intToTypeConverterHash.put(4, Integer.class);
+ this.intToTypeConverterHash.put(2, java.math.BigDecimal.class);
+ this.intToTypeConverterHash.put(6, Float.class);
+ this.intToTypeConverterHash.put(1, Character.class);
+ this.intToTypeConverterHash.put(12, String.class);
+ this.intToTypeConverterHash.put(91, java.sql.Date.class);
+ this.intToTypeConverterHash.put(93, java.sql.Timestamp.class);
+ this.intToTypeConverterHash.put(3, java.math.BigDecimal.class);
- this.intToTypeConverterHash.put(Integer.valueOf(-5), java.math.BigDecimal.class);
- this.intToTypeConverterHash.put(Integer.valueOf(7), Float.class);
- this.intToTypeConverterHash.put(Integer.valueOf(-1), String.class);
- this.intToTypeConverterHash.put(Integer.valueOf(92), Time.class);
- this.intToTypeConverterHash.put(Integer.valueOf(-2), Byte[].class);
- this.intToTypeConverterHash.put(Integer.valueOf(-4), Byte[].class);
+ this.intToTypeConverterHash.put(-5, java.math.BigDecimal.class);
+ this.intToTypeConverterHash.put(7, Float.class);
+ this.intToTypeConverterHash.put(-1, String.class);
+ this.intToTypeConverterHash.put(92, Time.class);
+ this.intToTypeConverterHash.put(-2, Byte[].class);
+ this.intToTypeConverterHash.put(-4, Byte[].class);
//this.intToTypeConverterHash.put(Integer.valueOf(0),null.class);
}
@@ -684,7 +684,7 @@
* return the class corresponding to the passed in JDBC type.
*/
protected Class getFieldType(Object jdbcDataType) {
- Integer key = Integer.valueOf(((Number)jdbcDataType).intValue());
+ Integer key = ((Number) jdbcDataType).intValue();
return (Class)intToTypeConverterHash.get(key);
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/transaction/JTATransactionController.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/transaction/JTATransactionController.java
index 5893eb6..46b2ef1 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/transaction/JTATransactionController.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/transaction/JTATransactionController.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -133,7 +133,7 @@
*/
@Override
protected Object getTransactionStatus_impl() throws Exception {
- return Integer.valueOf(getTransactionManager().getStatus());
+ return getTransactionManager().getStatus();
}
/**
@@ -275,7 +275,7 @@
* Assumes that the status object is an Integer.
*/
protected int getIntStatus(Object status) {
- return ((Integer)status).intValue();
+ return (Integer) status;
}
/**
diff --git a/foundation/org.eclipse.persistence.nosql/src/it/java/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java b/foundation/org.eclipse.persistence.nosql/src/it/java/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java
index b9be897..2d36e23 100644
--- a/foundation/org.eclipse.persistence.nosql/src/it/java/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java
+++ b/foundation/org.eclipse.persistence.nosql/src/it/java/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java
@@ -102,12 +102,12 @@
Vector arguments = new Vector(2);
arguments.add("EMP_SEQ");
- arguments.add(Integer.valueOf(0));
+ arguments.add(0);
session.executeQuery(query, arguments);
arguments = new Vector(2);
arguments.add("PROJ_SEQ");
- arguments.add(Integer.valueOf(0));
+ arguments.add(0);
session.executeQuery(query, arguments);
}
diff --git a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/CopyBookParser.java b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/CopyBookParser.java
index c9beda0..bf304c5 100644
--- a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/CopyBookParser.java
+++ b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/CopyBookParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -102,7 +102,7 @@
firstToken = firstToken.substring(0, currentLine.lastIndexOf('.'));
}
Integer levelNumber = Helper.integerFromString(firstToken);
- if ((levelNumber != null) && (levelNumber.intValue() < 50)) {
+ if ((levelNumber != null) && (levelNumber < 50)) {
//assure we've gotten entire line
while (!currentLine.trim().endsWith(".")) {
currentLine += lineTokenizer.nextToken();
@@ -110,7 +110,7 @@
}
currentLine = currentLine.substring(0, currentLine.lastIndexOf('.'));
recordLines.addElement(currentLine);
- lineNums.addElement(Integer.valueOf(currentLineNumber));
+ lineNums.addElement(currentLineNumber);
}
}
}
@@ -123,7 +123,7 @@
Enumeration recordLineNums = lineNums.elements();
while (recordsEnum.hasMoreElements()) {
currentLine = (String)recordsEnum.nextElement();
- currentLineNumber = ((Integer)recordLineNums.nextElement()).intValue();
+ currentLineNumber = (Integer) recordLineNums.nextElement();
StringTokenizer lineTokens = new StringTokenizer(currentLine);
if (lineTokens.hasMoreTokens()) {
String firstToken = lineTokens.nextToken();
@@ -131,7 +131,7 @@
Object component;
//process record
- if (levelNumber.intValue() == 1) {
+ if (levelNumber == 1) {
nestingLevel = maximumNestingLevels;
parents = new Stack();
parentsToLevels = new Hashtable();
@@ -140,19 +140,19 @@
records.addElement(component);
}
//process subordinate field
- else if (levelNumber.intValue() >= nestingLevel) {
+ else if (levelNumber >= nestingLevel) {
component = buildField(lineTokens);
((CompositeObject)parents.peek()).addField((FieldMetaData)component);
}
//field is no longer subordinate skip back to original level
else {
- while (((Integer)parentsToLevels.get(parents.peek())).intValue() >= levelNumber.intValue()) {
+ while ((Integer) parentsToLevels.get(parents.peek()) >= levelNumber) {
parents.pop();
}
component = buildField(lineTokens);
((CompositeObject)parents.peek()).addField((FieldMetaData)component);
}
- nestingLevel = levelNumber.intValue();
+ nestingLevel = levelNumber;
if (component instanceof FieldMetaData) {
((FieldMetaData)component).setRecord(record);
}
@@ -317,16 +317,16 @@
if (index < tokens.length) {
if (tokens[++index].equalsIgnoreCase("to")) {
Integer newSize = Helper.integerFromString(tokens[++index]);
- if (size.intValue() > 0) {
- newSize = Integer.valueOf(newSize.intValue() - size.intValue());
+ if (size > 0) {
+ newSize = newSize - size;
}
size = newSize;
}
}
- if (size.intValue() < 1) {
+ if (size < 1) {
throw invalidCopyBookException("Must occur at least once.");
}
- return size.intValue();
+ return size;
//there was no integer following the occurs statment or one after the to statement
} catch (ArrayIndexOutOfBoundsException exception) {
throw invalidCopyBookException("Occurs clause must be folowed by and integer.", exception);
@@ -396,7 +396,7 @@
}
try {
Integer value = Integer.valueOf(number.toString());
- size += value.intValue();
+ size += value;
} catch (NumberFormatException exception) {
throw invalidCopyBookException("In pic statement a valid integer must be enclosed by the parenthesis.", exception);
}
diff --git a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/ElementaryFieldMetaData.java b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/ElementaryFieldMetaData.java
index 1266acf..2626b83 100644
--- a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/ElementaryFieldMetaData.java
+++ b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/ElementaryFieldMetaData.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -385,7 +385,7 @@
protected void adjustArraySize(CobolRow row) {
Integer intValue = Helper.integerFromString(row.get(this.getDependentFieldName()).toString());
if (intValue != null) {
- this.setArraySize(intValue.intValue());
+ this.setArraySize(intValue);
}
}
diff --git a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/ByteConverter.java b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/ByteConverter.java
index 9e8e192..7598b1d 100644
--- a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/ByteConverter.java
+++ b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/ByteConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -403,7 +403,7 @@
} else if (value.startsWith("+")) {
value = value.substring(1);
}
- int total = Helper.integerFromString(value).intValue();
+ int total = Helper.integerFromString(value);
//loop through total dividing down
for (int i = offset, j = size - 1; i < (size + offset); i++, j--) {
diff --git a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/Helper.java b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/Helper.java
index a4611f3..d231d64 100644
--- a/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/Helper.java
+++ b/foundation/org.eclipse.persistence.nosql/src/main/java/org/eclipse/persistence/internal/eis/cobol/helper/Helper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -44,22 +44,22 @@
}
public static byte byteFromString(String string) {
- return Byte.valueOf(string).byteValue();
+ return Byte.parseByte(string);
}
/** takes a hex string and returns an int value */
public static int intFromHexString(String string) {
- return integerFromHexString(string).intValue();
+ return integerFromHexString(string);
}
/** takes a byte and returns the Integer value */
public static Integer integerFromByte(byte byteValue) {
- return Integer.valueOf(intFromByte(byteValue));
+ return intFromByte(byteValue);
}
/** takes a byte value and returns int value */
public static int intFromByte(byte byteValue) {
- Byte bigByte = Byte.valueOf(byteValue);
+ Byte bigByte = byteValue;
return bigByte.intValue();
}
diff --git a/foundation/org.eclipse.persistence.oracle.nosql/src/main/java/org/eclipse/persistence/nosql/adapters/nosql/OracleNoSQLPlatform.java b/foundation/org.eclipse.persistence.oracle.nosql/src/main/java/org/eclipse/persistence/nosql/adapters/nosql/OracleNoSQLPlatform.java
index 10970d7..49c24dc 100644
--- a/foundation/org.eclipse.persistence.oracle.nosql/src/main/java/org/eclipse/persistence/nosql/adapters/nosql/OracleNoSQLPlatform.java
+++ b/foundation/org.eclipse.persistence.oracle.nosql/src/main/java/org/eclipse/persistence/nosql/adapters/nosql/OracleNoSQLPlatform.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -146,7 +146,7 @@
if (timeout instanceof Number) {
noSqlSpec.setTimeout(((Number)timeout).longValue());
} else if (timeout instanceof String) {
- noSqlSpec.setTimeout(Long.valueOf(((String)timeout)));
+ noSqlSpec.setTimeout(Long.parseLong(((String)timeout)));
} else if (interaction.getQuery().getQueryTimeout() > 0) {
noSqlSpec.setTimeout(interaction.getQuery().getQueryTimeout());
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java
index 46987e6..adff6f5 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java
@@ -73,7 +73,7 @@
new Random().nextBytes(pictures);
Byte[] pics = new Byte[cycle];
for (int x = 0; x < cycle; x++) {
- pics[x] = Byte.valueOf(pictures[x]);
+ pics[x] = pictures[x];
}
return pics;
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/BaseNcharTest.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/BaseNcharTest.java
index ddc2523..103bc76 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/BaseNcharTest.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/BaseNcharTest.java
@@ -75,11 +75,11 @@
}
if (object.getNchar() != null) {
if (!object.getNchar().equals(controlObject.getNchar())) {
- throw new TestException("wrong NCHAR: " + charCode(object.getNchar().charValue()) + "; should be: " + charCode(controlObject.getNchar().charValue()));
+ throw new TestException("wrong NCHAR: " + charCode(object.getNchar()) + "; should be: " + charCode(controlObject.getNchar()));
}
} else {
if (controlObject.getNchar() != null) {
- throw new TestException("wrong NCHAR: NULL should be: " + charCode(controlObject.getNchar().charValue()));
+ throw new TestException("wrong NCHAR: NULL should be: " + charCode(controlObject.getNchar()));
}
}
if (object.getStr() != null) {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/CharNchar.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/CharNchar.java
index 0a31a58..544abd2 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/CharNchar.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nchar/CharNchar.java
@@ -44,12 +44,12 @@
public void copyAllButId(CharNchar obj) {
setChar(null);
if (obj.getChar() != null) {
- setChar(Character.valueOf(obj.getChar().charValue()));
+ setChar(obj.getChar());
}
setNchar(null);
if (obj.getNchar() != null) {
- setNchar(Character.valueOf(obj.getNchar().charValue()));
+ setNchar(obj.getNchar());
}
setStr(null);
@@ -89,8 +89,8 @@
}
public void setAll(char ch, char nCh, int sizeStr, int sizeClob, int sizeClob2) {
- this.ch = Character.valueOf(ch);
- this.nCh = Character.valueOf(nCh);
+ this.ch = ch;
+ this.nCh = nCh;
char[] chArray = new char[sizeStr];
char[] nchArray = new char[sizeStr];
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni10TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni10TestSet.java
index 29ed809..b7ea302 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni10TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni10TestSet.java
@@ -158,7 +158,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(-1));
+ queryArgs.add(-1);
boolean worked = false;
String msg = null;
try {
@@ -171,7 +171,7 @@
assertTrue("invocation signtype_in_test failed: " + msg, worked);
// test data range: 2 should NOT work
queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(2));
+ queryArgs.add(2);
worked = false;
msg = null;
try {
@@ -184,7 +184,7 @@
assertFalse("invocation signtype_in_test with 2 worked: " + msg, worked);
// test data range: -2 should NOT work
queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(-2));
+ queryArgs.add(-2);
worked = false;
msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni1TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni1TestSet.java
index f08d257..b060586 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni1TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni1TestSet.java
@@ -160,7 +160,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(1));
+ queryArgs.add(1);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni2TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni2TestSet.java
index 9c29c06..85f1e39 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni2TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni2TestSet.java
@@ -157,7 +157,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(2));
+ queryArgs.add(2);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni3TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni3TestSet.java
index 24ff4e4..22e112b 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni3TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni3TestSet.java
@@ -157,7 +157,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(3));
+ queryArgs.add(3);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni4TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni4TestSet.java
index 2577acf..e200a0b 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni4TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni4TestSet.java
@@ -157,7 +157,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(4));
+ queryArgs.add(4);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni5TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni5TestSet.java
index 247374c..e49447d 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni5TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni5TestSet.java
@@ -157,7 +157,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(5));
+ queryArgs.add(5);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni6TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni6TestSet.java
index 4d0ccf7..5569828 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni6TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni6TestSet.java
@@ -157,7 +157,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(6));
+ queryArgs.add(6);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni7TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni7TestSet.java
index 1c3fce9..90722b1 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni7TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni7TestSet.java
@@ -157,7 +157,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(7));
+ queryArgs.add(7);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni8TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni8TestSet.java
index 801fb32..570c60d 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni8TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni8TestSet.java
@@ -158,7 +158,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(8));
+ queryArgs.add(8);
boolean worked = false;
String msg = null;
try {
@@ -171,7 +171,7 @@
assertTrue("invocation positive_in_test failed: " + msg, worked);
// test data range: negative number should NOT work
queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(-1));
+ queryArgs.add(-1);
worked = false;
msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni9TestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni9TestSet.java
index b6bede5..0a98cd7 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni9TestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/Ni9TestSet.java
@@ -158,7 +158,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(9));
+ queryArgs.add(9);
boolean worked = false;
String msg = null;
try {
@@ -171,7 +171,7 @@
assertTrue("invocation positiven_in_test failed: " + msg, worked);
// test data range: negative number should NOT work
queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(-1));
+ queryArgs.add(-1);
worked = false;
msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiNiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiNiTestSet.java
index 03f4196..226eb5f 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiNiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiNiTestSet.java
@@ -177,9 +177,9 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(1));
+ queryArgs.add(1);
queryArgs.add("test");
- queryArgs.add(Integer.valueOf(10));
+ queryArgs.add(10);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiTestSet.java
index 90d1157..6975d14 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiTestSet.java
@@ -168,7 +168,7 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(0));
+ queryArgs.add(0);
queryArgs.add("test");
boolean worked = false;
String msg = null;
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijijiNiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijijiNiTestSet.java
index c01be4e..7ce5645 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijijiNiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijijiNiTestSet.java
@@ -189,10 +189,10 @@
s.dontLogMessages();
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(0));
+ queryArgs.add(0);
queryArgs.add("test");
queryArgs.add(Float.parseFloat("12.75"));
- queryArgs.add(Integer.valueOf(13));
+ queryArgs.add(13);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijioNijioTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijioNijioTestSet.java
index 1b09a5e..3d93825 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijioNijioTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijioNijioTestSet.java
@@ -198,9 +198,9 @@
((DatabaseSession)s).login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(107));
- queryArgs.add(Integer.valueOf(108));
- queryArgs.add(Integer.valueOf(1));
+ queryArgs.add(107);
+ queryArgs.add(108);
+ queryArgs.add(1);
queryArgs.add("MERV");
boolean worked = false;
String msg = null;
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiojiNiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiojiNiTestSet.java
index 35aab06..5f05ea4 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiojiNiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NijiojiNiTestSet.java
@@ -197,10 +197,10 @@
((DatabaseSession)s).login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(105));
- queryArgs.add(Integer.valueOf(106));
+ queryArgs.add(105);
+ queryArgs.add(106);
queryArgs.add("BLAHZOO");
- queryArgs.add(Integer.valueOf(0));
+ queryArgs.add(0);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NoTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NoTestSet.java
index 05e573f..c76c438 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NoTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NoTestSet.java
@@ -161,7 +161,7 @@
}
assertTrue("invocation no failed: " + msg, worked);
Integer bool2int = (Integer)o;
- assertTrue("wrong bool2int value", bool2int.intValue() == 1);
+ assertTrue("wrong bool2int value", bool2int == 1);
((DatabaseSession)s).logout();
}
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojiNoTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojiNoTestSet.java
index 16cf942..5933aa7 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojiNoTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojiNoTestSet.java
@@ -193,7 +193,7 @@
BigDecimal bint2bigdec = (BigDecimal)record.get("X");
assertTrue("wrong bint2bigdec value", bint2bigdec.intValue() == 42);
Integer bool2int = (Integer)record.get("Z");
- assertTrue("wrong bool2int value", bool2int.intValue() == 1);
+ assertTrue("wrong bool2int value", bool2int == 1);
((DatabaseSession)s).logout();
}
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojijioNoTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojijioNoTestSet.java
index 1efedbc..bb1f479 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojijioNoTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/NojijioNoTestSet.java
@@ -191,7 +191,7 @@
((DatabaseSession)s).login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(104));
+ queryArgs.add(104);
queryArgs.add("FOO");
boolean worked = false;
String msg = null;
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiNijiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiNijiTestSet.java
index 8b81e8a..64e1326 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiNijiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiNijiTestSet.java
@@ -195,8 +195,8 @@
getQueryManager().getQuery("jiNiNiji");
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("test");
- queryArgs.add(Integer.valueOf(14));
- queryArgs.add(Integer.valueOf(1));
+ queryArgs.add(14);
+ queryArgs.add(1);
queryArgs.add(Float.parseFloat("123.1"));
boolean worked = false;
String msg = null;
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiTestSet.java
index 4cd7d75..0e9b5aa 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiTestSet.java
@@ -169,7 +169,7 @@
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("test");
- queryArgs.add(Integer.valueOf(0));
+ queryArgs.add(0);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNijiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNijiTestSet.java
index cc7fec0..3a4ed3e 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNijiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNijiTestSet.java
@@ -184,7 +184,7 @@
((DatabaseSession)s).login();
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("test");
- queryArgs.add(Integer.valueOf(0));
+ queryArgs.add(0);
queryArgs.add(Float.parseFloat("11.25"));
boolean worked = false;
String msg = null;
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNioTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNioTestSet.java
index e417dfd..64fb51fb 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNioTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNioTestSet.java
@@ -177,7 +177,7 @@
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("test");
- queryArgs.add(Integer.valueOf(1));
+ queryArgs.add(1);
boolean worked = false;
String msg = null;
try {
@@ -191,7 +191,7 @@
Vector results = (Vector)o;
DatabaseRecord record = (DatabaseRecord)results.get(0);
Integer bool2int = (Integer)record.get("Y");
- assertTrue("wrong bool2int value", bool2int.intValue() == 0);
+ assertTrue("wrong bool2int value", bool2int == 0);
((DatabaseSession)s).logout();
}
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiojiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiojiTestSet.java
index 85aa465..2a54da5 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiojiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNiojiTestSet.java
@@ -190,8 +190,8 @@
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("snicker-doodle");
- queryArgs.add(Integer.valueOf(102));
- queryArgs.add(Integer.valueOf(103));
+ queryArgs.add(102);
+ queryArgs.add(103);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNoTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNoTestSet.java
index 6743141..17f2c77 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNoTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNoTestSet.java
@@ -186,7 +186,7 @@
Vector results = (Vector)o;
DatabaseRecord record = (DatabaseRecord)results.get(0);
Integer bool2int = (Integer)record.get("Y");
- assertTrue("wrong bool2int value", bool2int.intValue() == 0);
+ assertTrue("wrong bool2int value", bool2int == 0);
((DatabaseSession)s).logout();
}
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNojiTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNojiTestSet.java
index 9f9d4ff..ff4d48b 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNojiTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/jiNojiTestSet.java
@@ -185,7 +185,7 @@
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("test");
- queryArgs.add(Integer.valueOf(15));
+ queryArgs.add(15);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijiNoTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijiNoTestSet.java
index 7cb497d..e4bfd09 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijiNoTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijiNoTestSet.java
@@ -190,8 +190,8 @@
((DatabaseSession)s).login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(100));
- queryArgs.add(Integer.valueOf(101));
+ queryArgs.add(100);
+ queryArgs.add(101);
boolean worked = false;
String msg = null;
try {
@@ -207,7 +207,7 @@
String y = (String)record.get("X");
assertTrue("wrong y value", y.equals("test"));
Integer aa = (Integer)record.get("AA");
- assertTrue("wrong aa value", aa.intValue() == 1);
+ assertTrue("wrong aa value", aa == 1);
((DatabaseSession)s).logout();
}
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijijoTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijijoTestSet.java
index d562bcc..d9db188 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijijoTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijijoTestSet.java
@@ -190,8 +190,8 @@
((DatabaseSession)s).login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(100));
- queryArgs.add(Integer.valueOf(101));
+ queryArgs.add(100);
+ queryArgs.add(101);
boolean worked = false;
String msg = null;
try {
@@ -207,7 +207,7 @@
String y = (String)record.get("X");
assertTrue("wrong y value", y.equals("test"));
Integer aa = (Integer)record.get("AA");
- assertTrue("wrong aa value", aa.intValue() == 1);
+ assertTrue("wrong aa value", aa == 1);
((DatabaseSession)s).logout();
}
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijioTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijioTestSet.java
index 937a763..20a4021 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijioTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijioTestSet.java
@@ -185,7 +185,7 @@
((DatabaseSession)s).login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(1));
+ queryArgs.add(1);
queryArgs.add("test");
boolean worked = false;
String msg = null;
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijoTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijoTestSet.java
index b4f74e9..a8fbd32 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijoTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/nonJDBC/joNijoTestSet.java
@@ -181,7 +181,7 @@
((DatabaseSession)s).login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
- queryArgs.add(Integer.valueOf(1));
+ queryArgs.add(1);
boolean worked = false;
String msg = null;
try {
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java
index 8905e6f..ba5d50b 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java
@@ -309,7 +309,7 @@
assertTrue("incorrect ENAME" , result.name.equals("GOOFY"));
assertTrue("incorrect JOB" , result.job.equals("ACTOR"));
assertNull("MGR is supposed to be null", result.manager);
- assertTrue("incorrect SAL" , result.salary.equals(Float.valueOf(3500)));
+ assertTrue("incorrect SAL" , result.salary.equals(3500F));
assertNull("COMM is supposed to be null", result.commission);
assertTrue("incorrect DEPTNO" , result.department.equals(new BigDecimal(20)));
((DatabaseSession)s).logout();
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java
index a643753..44f1519 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java
@@ -272,7 +272,7 @@
assertNull("MGR is supposed to be null", record.get("MGR"));
assertNull("HIREDATE is supposed to be null", record.get("HIREDATE"));
assertTrue("incorrect SAL" ,
- record.get("SAL").equals(Double.valueOf(6000.0)));
+ record.get("SAL").equals(6000.0));
assertNull("COMM is supposed to be null", record.get("COMM"));
assertTrue("incorrect DEPTNO" ,
record.get("DEPTNO").equals(new BigDecimal(20)));
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java
index aabe12d..fad6747 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java
@@ -302,7 +302,7 @@
assertTrue("incorrect ENAME" , result.name.equals("GOOFY"));
assertTrue("incorrect JOB" , result.job.equals("ACTOR"));
assertNull("MGR is supposed to be null", result.manager);
- assertTrue("incorrect SAL" , result.salary.equals(Float.valueOf(3500)));
+ assertTrue("incorrect SAL" , result.salary.equals(3500F));
assertTrue("incorrect DEPTNO" , result.department.equals(new BigDecimal(20)));
((DatabaseSession)s).logout();
}
diff --git a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java
index 41d1148..dc81502 100644
--- a/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java
+++ b/foundation/org.eclipse.persistence.oracle.test/src/it/java/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java
@@ -269,7 +269,7 @@
assertTrue("incorrect ENAME" , result.name.equals("GOOFY"));
assertTrue("incorrect JOB" , result.job.equals("ACTOR"));
assertNull("MGR is supposed to be null", result.manager);
- assertTrue("incorrect SAL" , result.salary.equals(Float.valueOf(6000)));
+ assertTrue("incorrect SAL" , result.salary.equals(6000F));
assertNull("COMM is supposed to be null", result.commission);
assertTrue("incorrect DEPTNO" , result.department.equals(new BigDecimal(20)));
((DatabaseSession)s).logout();
diff --git a/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/Oracle8Platform.java b/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/Oracle8Platform.java
index 2f23b88..1396bb0 100644
--- a/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/Oracle8Platform.java
+++ b/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/Oracle8Platform.java
@@ -195,13 +195,13 @@
Blob blob = (Blob) resultSet.getObject(field.getName());
blob.setBytes(1, (byte[]) value);
//impose the localization
- session.log(SessionLog.FINEST, SessionLog.SQL, "write_BLOB", Long.valueOf(blob.length()), field.getName());
+ session.log(SessionLog.FINEST, SessionLog.SQL, "write_BLOB", blob.length(), field.getName());
} else if (isClob(field.getType())) {
//change for 338585 to use getName instead of getNameDelimited
Clob clob = (Clob) resultSet.getObject(field.getName());
clob.setString(1, (String) value);
//impose the localization
- session.log(SessionLog.FINEST, SessionLog.SQL, "write_CLOB", Long.valueOf(clob.length()), field.getName());
+ session.log(SessionLog.FINEST, SessionLog.SQL, "write_CLOB", clob.length(), field.getName());
} else {
//do nothing for now, open to BFILE or NCLOB types
}
diff --git a/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/OracleJDBC_10_1_0_2ProxyConnectionCustomizer.java b/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/OracleJDBC_10_1_0_2ProxyConnectionCustomizer.java
index ef2f62e..bd217f5 100644
--- a/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/OracleJDBC_10_1_0_2ProxyConnectionCustomizer.java
+++ b/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/platform/database/oracle/OracleJDBC_10_1_0_2ProxyConnectionCustomizer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -207,7 +207,7 @@
protected void buildProxyProperties() {
Object proxyTypeValue = session.getProperty(PersistenceUnitProperties.ORACLE_PROXY_TYPE);
try {
- proxyType = ((Integer)session.getPlatform().getConversionManager().convertObject(proxyTypeValue, Integer.class)).intValue();
+ proxyType = (Integer) session.getPlatform().getConversionManager().convertObject(proxyTypeValue, Integer.class);
} catch (ConversionException conversionException) {
throw ValidationException.oracleJDBC10_1_0_2ProxyConnectorRequiresIntProxytype();
}
diff --git a/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java b/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java
index e970f06..a47c467 100644
--- a/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java
+++ b/foundation/org.eclipse.persistence.oracle/src/main/java/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java
@@ -225,7 +225,7 @@
}
Sensor phaseEvent = getSensorByName(operationName);
if (phaseEvent != null) {
- Long startToken = Long.valueOf(((PhaseEvent)phaseEvent).start());
+ Long startToken = ((PhaseEvent) phaseEvent).start();
getPhaseEventStartToken().put(operationName, startToken);
}
}
@@ -247,7 +247,7 @@
Sensor phaseEvent = getPhaseEventForQuery(operationName, query, weight);
if (phaseEvent != null) {
- Long startToken = Long.valueOf(((PhaseEvent)phaseEvent).start());
+ Long startToken = ((PhaseEvent) phaseEvent).start();
if (query != null) {
getPhaseEventStartToken().put(query.getSensorName(operationName, getSessionName()), startToken);
} else {
@@ -270,7 +270,7 @@
Sensor phaseEvent = getSensorByName(operationName);
if (phaseEvent != null) {
Long startTime = (Long)getPhaseEventStartToken().get(operationName);
- ((PhaseEvent)phaseEvent).stop(startTime.longValue());
+ ((PhaseEvent)phaseEvent).stop(startTime);
}
}
@@ -297,7 +297,7 @@
} else {
startTime = (Long)getPhaseEventStartToken().get(operationName);
}
- ((PhaseEvent)phaseEvent).stop(startTime.longValue());
+ ((PhaseEvent)phaseEvent).stop(startTime);
}
}
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/collection/model/NodeHolder.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/collection/model/NodeHolder.java
index 60520cc..bf54e31 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/collection/model/NodeHolder.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/collection/model/NodeHolder.java
@@ -53,7 +53,7 @@
}
public void removeNodes(int id) {
- nodes.remove(Integer.valueOf(id));
+ nodes.remove(id);
}
public int getId() {
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java
index e690b7c..ab5614c 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java
@@ -82,7 +82,7 @@
em.getTransaction().commit();
Assert.assertTrue(BooleanToStringAutoApplyConverter.convertToDatabaseTriggered);
- Assert.assertEquals(Boolean.valueOf(valueConvert), BooleanToStringAutoApplyConverter.ctdcVal);
+ Assert.assertEquals(valueConvert, BooleanToStringAutoApplyConverter.ctdcVal);
BooleanToStringAutoApplyConverter.reset();
em.clear();
@@ -185,8 +185,8 @@
EntityManager em = emfAutoApplyConverters.createEntityManager();
long id = System.currentTimeMillis();
- Byte valueConvert = Byte.valueOf((byte) 10);
- Byte valueNoConvert = Byte.valueOf((byte) 14);
+ Byte valueConvert = (byte) 10;
+ Byte valueNoConvert = (byte) 14;
try {
ByteToStringAutoApplyConverter.reset();
ConvertEntityByW2S entity = new ConvertEntityByW2S(id, valueConvert, valueNoConvert);
@@ -261,8 +261,8 @@
EntityManager em = emfAutoApplyConverters.createEntityManager();
long id = System.currentTimeMillis();
- Character valueConvert = Character.valueOf('A');
- Character valueNoConvert = Character.valueOf('z');
+ Character valueConvert = 'A';
+ Character valueNoConvert = 'z';
try {
CharToStringAutoApplyConverter.reset();
ConvertEntityCW2S entity = new ConvertEntityCW2S(id, valueConvert, valueNoConvert);
@@ -337,8 +337,8 @@
EntityManager em = emfAutoApplyConverters.createEntityManager();
long id = System.currentTimeMillis();
- Double valueConvert = Double.valueOf(42.0);
- Double valueNoConvert = Double.valueOf(100.0);
+ Double valueConvert = 42.0;
+ Double valueNoConvert = 100.0;
try {
DoubleToStringAutoApplyConverter.reset();
ConvertEntityDW2S entity = new ConvertEntityDW2S(id, valueConvert, valueNoConvert);
@@ -413,8 +413,8 @@
EntityManager em = emfAutoApplyConverters.createEntityManager();
long id = System.currentTimeMillis();
- Float valueConvert = Float.valueOf(42.0f);
- Float valueNoConvert = Float.valueOf(100.0f);
+ Float valueConvert = 42.0f;
+ Float valueNoConvert = 100.0f;
try {
FloatToStringAutoApplyConverter.reset();
ConvertEntityFW2S entity = new ConvertEntityFW2S(id, valueConvert, valueNoConvert);
@@ -489,8 +489,8 @@
EntityManager em = emfAutoApplyConverters.createEntityManager();
long id = System.currentTimeMillis();
- Integer valueConvert = Integer.valueOf(42);
- Integer valueNoConvert = Integer.valueOf(100);
+ Integer valueConvert = 42;
+ Integer valueNoConvert = 100;
try {
IntToStringAutoApplyConverter.reset();
ConvertEntityIW2S entity = new ConvertEntityIW2S(id, valueConvert, valueNoConvert);
@@ -565,8 +565,8 @@
EntityManager em = emfAutoApplyConverters.createEntityManager();
long id = System.currentTimeMillis();
- Long valueConvert = Long.valueOf(42);
- Long valueNoConvert = Long.valueOf(100);
+ Long valueConvert = 42L;
+ Long valueNoConvert = 100L;
try {
LongToStringAutoApplyConverter.reset();
ConvertEntityLW2S entity = new ConvertEntityLW2S(id, valueConvert, valueNoConvert);
@@ -641,8 +641,8 @@
EntityManager em = emfAutoApplyConverters.createEntityManager();
long id = System.currentTimeMillis();
- Short valueConvert = Short.valueOf((short) 42);
- Short valueNoConvert = Short.valueOf((short) 100);
+ Short valueConvert = (short) 42;
+ Short valueNoConvert = (short) 100;
try {
ShortToStringAutoApplyConverter.reset();
ConvertEntityShW2S entity = new ConvertEntityShW2S(id, valueConvert, valueNoConvert);
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/converters/CharToStringAutoApplyConverter.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/converters/CharToStringAutoApplyConverter.java
index 498b95d..bb9bf91 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/converters/CharToStringAutoApplyConverter.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/converter/converters/CharToStringAutoApplyConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -46,7 +46,7 @@
public Character convertToEntityAttribute(String dbData) {
convertToEntityTriggered = true;
cteaVal = dbData;
- return Character.valueOf(dbData.charAt(0));
+ return dbData.charAt(0);
}
}
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java
index 9f9242d..854596e 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java
@@ -89,7 +89,7 @@
String rmiPortProp = System.getProperty("rmi.port");
if (!(rmiPortProp == null || rmiPortProp.isEmpty())) {
try {
- rmiPortVal = Integer.valueOf(rmiPortProp);
+ rmiPortVal = Integer.parseInt(rmiPortProp);
} catch (NumberFormatException nfe) {
// Use default value.
}
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestNVarChar.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestNVarChar.java
index 4f276fa..774ff75 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestNVarChar.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/basic/TestNVarChar.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -98,7 +98,7 @@
Long count = em.createQuery("SELECT COUNT(n) FROM NvarcharEntity n WHERE n.dataField=:data", Long.class)
.setParameter("data", latinChars).getSingleResult();
- Assert.assertTrue(count.longValue() > 0);
+ Assert.assertTrue(count > 0);
} finally {
if (em.getTransaction().isActive()) {
@@ -124,7 +124,7 @@
em.getTransaction().commit();
Long count = em.createQuery("SELECT count(n) FROM NvarcharEntity n WHERE n.dataField=\"" + str + "\"", Long.class).getSingleResult();
- Assert.assertTrue(count.longValue() >= 1);
+ Assert.assertTrue(count >= 1);
} finally {
if (em.getTransaction().isActive()) {
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java
index 7939472..9a20fe0 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java
@@ -72,7 +72,7 @@
q = em.createQuery("SELECT COUNT(n.primitive) FROM NoResultEntity n");
res = q.getSingleResult();
- Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(0), res);
+ Assert.assertEquals("Result of COUNT aggregate should have been a Long", 0L, res);
} finally {
if (em.getTransaction().isActive()) {
em.getTransaction().rollback();
@@ -117,7 +117,7 @@
q = em.createQuery("SELECT COUNT(n.wrapper) FROM NoResultEntity n");
res = q.getSingleResult();
- Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(0), res);
+ Assert.assertEquals("Result of COUNT aggregate should have been a Long", 0L, res);
} finally {
if (em.getTransaction().isActive()) {
em.getTransaction().rollback();
@@ -159,23 +159,23 @@
Query q = em.createQuery("SELECT MIN(se.itemInteger2) FROM SimpleEntity se");
Object res = q.getSingleResult();
- Assert.assertEquals("Result of MIN aggregate should have been NULL", Integer.valueOf(0), res);
+ Assert.assertEquals("Result of MIN aggregate should have been NULL", 0, res);
Query q2 = em.createQuery("SELECT MAX(se.itemInteger2) FROM SimpleEntity se");
Object res2 = q2.getSingleResult();
- Assert.assertEquals("Result of MAX aggregate should have been NULL", Integer.valueOf(0), res2);
+ Assert.assertEquals("Result of MAX aggregate should have been NULL", 0, res2);
Query q3 = em.createQuery("SELECT AVG(se.itemInteger2) FROM SimpleEntity se");
Object res3 = q3.getSingleResult();
- Assert.assertEquals("Result of AVG aggregate should have been NULL", Double.valueOf(0), res3);
+ Assert.assertEquals("Result of AVG aggregate should have been NULL", (double) 0, res3);
Query q4 = em.createQuery("SELECT SUM(se.itemInteger2) FROM SimpleEntity se");
Object res4 = q4.getSingleResult();
- Assert.assertEquals("Result of SUM aggregate should have been NULL", Long.valueOf(0), res4);
+ Assert.assertEquals("Result of SUM aggregate should have been NULL", 0L, res4);
Query q5 = em.createQuery("SELECT COUNT(se.itemInteger2) FROM SimpleEntity se");
Object res5 = q5.getSingleResult();
- Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(2), res5);
+ Assert.assertEquals("Result of COUNT aggregate should have been a Long", 2L, res5);
} finally {
if (em.getTransaction().isActive()) {
em.getTransaction().rollback();
@@ -204,12 +204,12 @@
SimpleEntity se = new SimpleEntity();
se.setKeyString("SimpleEntity1");
- se.setItemInteger1(Integer.valueOf(0));
+ se.setItemInteger1(0);
entities.add(se);
SimpleEntity se2 = new SimpleEntity();
se2.setKeyString("SimpleEntity2");
- se2.setItemInteger1(Integer.valueOf(0));
+ se2.setItemInteger1(0);
entities.add(se2);
EntityManager em = resultEmf.createEntityManager();
@@ -223,23 +223,23 @@
Query q = em.createQuery("SELECT MIN(se.itemInteger1) FROM SimpleEntity se");
Object res = q.getSingleResult();
- Assert.assertEquals("Result of MIN aggregate should have been NULL", Integer.valueOf(0), res);
+ Assert.assertEquals("Result of MIN aggregate should have been NULL", 0, res);
Query q2 = em.createQuery("SELECT MAX(se.itemInteger1) FROM SimpleEntity se");
Object res2 = q2.getSingleResult();
- Assert.assertEquals("Result of MAX aggregate should have been NULL", Integer.valueOf(0), res2);
+ Assert.assertEquals("Result of MAX aggregate should have been NULL", 0, res2);
Query q3 = em.createQuery("SELECT AVG(se.itemInteger1) FROM SimpleEntity se");
Object res3 = q3.getSingleResult();
- Assert.assertEquals("Result of AVG aggregate should have been NULL", Double.valueOf(0), res3);
+ Assert.assertEquals("Result of AVG aggregate should have been NULL", (double) 0, res3);
Query q4 = em.createQuery("SELECT SUM(se.itemInteger1) FROM SimpleEntity se");
Object res4 = q4.getSingleResult();
- Assert.assertEquals("Result of SUM aggregate should have been NULL", Long.valueOf(0), res4);
+ Assert.assertEquals("Result of SUM aggregate should have been NULL", 0L, res4);
Query q5 = em.createQuery("SELECT COUNT(se.itemInteger1) FROM SimpleEntity se");
Object res5 = q5.getSingleResult();
- Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(2), res5);
+ Assert.assertEquals("Result of COUNT aggregate should have been a Long", 2L, res5);
} finally {
if (em.getTransaction().isActive()) {
em.getTransaction().rollback();
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java
index 28cbafa..8f99a93 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java
@@ -135,7 +135,7 @@
em = emf.createEntityManager();
try {
- Integer id = Integer.valueOf(41);
+ Integer id = 41;
OverrideEmbeddableB emb1 = new OverrideEmbeddableB(43, 44, new OverrideNestedEmbeddableB(45, 46));
OverrideEmbeddableB emb2 = new OverrideEmbeddableB(47, 48, new OverrideNestedEmbeddableB(49, 50));
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java
index df99272..b16e536 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java
@@ -114,9 +114,9 @@
//3: Test COALESCE function with all arguments as parameters
TypedQuery<GenericEntity> query = em.createQuery("SELECT 1 FROM GenericEntity s "
+ "WHERE ABS(COALESCE(?1, ?2)) >= ?3", GenericEntity.class);
- query.setParameter(1, Integer.valueOf(1));
- query.setParameter(2, Integer.valueOf(20));
- query.setParameter(3, Integer.valueOf(300));
+ query.setParameter(1, 1);
+ query.setParameter(2, 20);
+ query.setParameter(3, 300);
query.getResultList();
DatabaseCall call = ((JpaQuery<GenericEntity>)query).getDatabaseQuery().getCall();
diff --git a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/query/model/Dto01.java b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/query/model/Dto01.java
index b58d83f..5e036be 100644
--- a/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/query/model/Dto01.java
+++ b/jpa/eclipselink.jpa.test.jse/src/it/java/org/eclipse/persistence/jpa/test/query/model/Dto01.java
@@ -40,8 +40,8 @@
public Dto01(String str1, String str2, Long integer1, Long integer2) {
this.str1 = str1;
this.str2 = str2;
- this.integer1 = Integer.valueOf(integer1.intValue());
- this.integer2 = Integer.valueOf(integer2.intValue());
+ this.integer1 = integer1.intValue();
+ this.integer2 = integer2.intValue();
}
public String getStr1() {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/AdvancedTableCreator.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/AdvancedTableCreator.java
index 7e71a08..03524f8 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/AdvancedTableCreator.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/AdvancedTableCreator.java
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 1998, 2019 IBM Corporation. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -224,7 +224,7 @@
fieldVERSION.setIsIdentity(false);
table.addField(fieldVERSION);
- if (Boolean.valueOf(System.getProperty("sop"))) {
+ if (Boolean.parseBoolean(System.getProperty("sop"))) {
FieldDefinition fieldSop = new FieldDefinition();
fieldSop.setName("SOP");
fieldSop.setTypeName("BLOB");
@@ -960,7 +960,7 @@
fieldHugeProj.setForeignKeyFieldName("CMP3_PROJECT.PROJ_ID");
table.addField(fieldHugeProj);
- if (Boolean.valueOf(System.getProperty("sop"))) {
+ if (Boolean.parseBoolean(System.getProperty("sop"))) {
FieldDefinition fieldSop = new FieldDefinition();
fieldSop.setName("SOP");
fieldSop.setTypeName("BLOB");
@@ -1536,7 +1536,7 @@
field5.setIsIdentity(false );
table.addField(field5);
- if (Boolean.valueOf(System.getProperty("sop"))) {
+ if (Boolean.parseBoolean(System.getProperty("sop"))) {
FieldDefinition fieldSop = new FieldDefinition();
fieldSop.setName("SOP");
fieldSop.setTypeName("BLOB");
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java
index 67b3adf..c75648b 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java
@@ -108,35 +108,35 @@
}
public void addAmex(long number) {
- getCreditCards().put(AMEX, Long.valueOf(number));
+ getCreditCards().put(AMEX, number);
}
public void addCanadianImperialCreditLine(long number) {
- getCreditLines().put(CANADIAN_IMPERIAL, Long.valueOf(number));
+ getCreditLines().put(CANADIAN_IMPERIAL, number);
}
public void addDinersClub(long number) {
- getCreditCards().put(DINERS, Long.valueOf(number));
+ getCreditCards().put(DINERS, number);
}
public void addMastercard(long number) {
- getCreditCards().put(MASTERCARD, Long.valueOf(number));
+ getCreditCards().put(MASTERCARD, number);
}
public void addRoyalBankCreditLine(long number) {
- getCreditLines().put(ROYAL_BANK, Long.valueOf(number));
+ getCreditLines().put(ROYAL_BANK, number);
}
public void addScotiabankCreditLine(long number) {
- getCreditLines().put(SCOTIABANK, Long.valueOf(number));
+ getCreditLines().put(SCOTIABANK, number);
}
public void addTorontoDominionCreditLine(long number) {
- getCreditLines().put(TORONTO_DOMINION, Long.valueOf(number));
+ getCreditLines().put(TORONTO_DOMINION, number);
}
public void addVisa(long number) {
- getCreditCards().put(VISA, Long.valueOf(number));
+ getCreditCards().put(VISA, number);
}
public boolean buysSaturdayToSunday() {
@@ -251,7 +251,7 @@
if (cardNumber == null) {
return false;
} else {
- return cardNumber.longValue() == number;
+ return cardNumber == number;
}
}
@@ -259,7 +259,7 @@
if (creditLineNumber == null) {
return false;
} else {
- return creditLineNumber.longValue() == number;
+ return creditLineNumber == number;
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java
index c8240d4..97ddd0d 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java
@@ -47,9 +47,9 @@
Integer numberOfCalls = (Integer)sessionCalls.get(sessionName);
int num = 0;
if(numberOfCalls != null) {
- num = numberOfCalls.intValue();
+ num = numberOfCalls;
}
- sessionCalls.put(sessionName, Integer.valueOf(num + 1));
+ sessionCalls.put(sessionName, num + 1);
//**temp
session.getEventManager().addListener(new AcquireReleaseListener());
@@ -63,8 +63,8 @@
}
});
- if (Boolean.valueOf(System.getProperty("sop"))) {
- boolean isRecoverable = Boolean.valueOf(System.getProperty("sop.recoverable"));
+ if (Boolean.parseBoolean(System.getProperty("sop"))) {
+ boolean isRecoverable = Boolean.parseBoolean(System.getProperty("sop.recoverable"));
Class sopClass = Class.forName("oracle.toplink.exalogic.sop.SerializedObjectPolicy");
Method setIsRecoverableMethod = null;
if (isRecoverable) {
@@ -93,9 +93,9 @@
Integer numberOfCalls = (Integer)descriptorCalls.get(javaClassName);
int num = 0;
if(numberOfCalls != null) {
- num = numberOfCalls.intValue();
+ num = numberOfCalls;
}
- descriptorCalls.put(javaClassName, Integer.valueOf(num + 1));
+ descriptorCalls.put(javaClassName, num + 1);
addCustomQueryKeys(descriptor);
}
@@ -113,7 +113,7 @@
if(numberOfCalls == null) {
return 0;
} else {
- return numberOfCalls.intValue();
+ return numberOfCalls;
}
}
@@ -122,7 +122,7 @@
if(numberOfCalls == null) {
return 0;
} else {
- return numberOfCalls.intValue();
+ return numberOfCalls;
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/NumberId.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/NumberId.java
index 6bc3a38..65454c6 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/NumberId.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/advanced/compositepk/NumberId.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -31,7 +31,7 @@
private Long value;
public NumberId() {
- this(Long.valueOf(0L));
+ this(0L);
}
public NumberId(Long value) {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java
index 2c460a1..39c58e1 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java
@@ -50,9 +50,9 @@
Integer numberOfCalls = (Integer)sessionCalls.get(sessionName);
int num = 0;
if(numberOfCalls != null) {
- num = numberOfCalls.intValue();
+ num = numberOfCalls;
}
- sessionCalls.put(sessionName, Integer.valueOf(num + 1));
+ sessionCalls.put(sessionName, num + 1);
//**temp
session.getEventManager().addListener(new AcquireReleaseListener());
@@ -73,9 +73,9 @@
Integer numberOfCalls = (Integer)descriptorCalls.get(javaClassName);
int num = 0;
if(numberOfCalls != null) {
- num = numberOfCalls.intValue();
+ num = numberOfCalls;
}
- descriptorCalls.put(javaClassName, Integer.valueOf(num + 1));
+ descriptorCalls.put(javaClassName, num + 1);
addCustomQueryKeys(descriptor);
}
@@ -93,7 +93,7 @@
if(numberOfCalls == null) {
return 0;
} else {
- return numberOfCalls.intValue();
+ return numberOfCalls;
}
}
@@ -102,7 +102,7 @@
if(numberOfCalls == null) {
return 0;
} else {
- return numberOfCalls.intValue();
+ return numberOfCalls;
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java
index dbf8578..2d4d1b0 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java
@@ -131,19 +131,19 @@
}
public void addAmex(long number) {
- getCreditCards().put(AMEX, Long.valueOf(number));
+ getCreditCards().put(AMEX, number);
}
public void addDinersClub(long number) {
- getCreditCards().put(DINERS, Long.valueOf(number));
+ getCreditCards().put(DINERS, number);
}
public void addMastercard(long number) {
- getCreditCards().put(MASTERCARD, Long.valueOf(number));
+ getCreditCards().put(MASTERCARD, number);
}
public void addVisa(long number) {
- getCreditCards().put(VISA, Long.valueOf(number));
+ getCreditCards().put(VISA, number);
}
public boolean buysSaturdayToSunday() {
@@ -198,7 +198,7 @@
if (cardNumber == null) {
return false;
} else {
- return cardNumber.longValue() == number;
+ return cardNumber == number;
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java
index c5e180c..1046171 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java
@@ -37,9 +37,9 @@
Integer numberOfCalls = (Integer)sessionCalls.get(sessionName);
int num = 0;
if(numberOfCalls != null) {
- num = numberOfCalls.intValue();
+ num = numberOfCalls;
}
- sessionCalls.put(sessionName, Integer.valueOf(num + 1));
+ sessionCalls.put(sessionName, num + 1);
session.getEventManager().addListener(new SessionEventAdapter() {
@Override
@@ -57,9 +57,9 @@
Integer numberOfCalls = (Integer)descriptorCalls.get(javaClassName);
int num = 0;
if(numberOfCalls != null) {
- num = numberOfCalls.intValue();
+ num = numberOfCalls;
}
- descriptorCalls.put(javaClassName, Integer.valueOf(num + 1));
+ descriptorCalls.put(javaClassName, num + 1);
}
public static Map getSessionCalls() {
@@ -75,7 +75,7 @@
if(numberOfCalls == null) {
return 0;
} else {
- return numberOfCalls.intValue();
+ return numberOfCalls;
}
}
@@ -84,7 +84,7 @@
if(numberOfCalls == null) {
return 0;
} else {
- return numberOfCalls.intValue();
+ return numberOfCalls;
}
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java
index 484db61..98f45b6 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java
@@ -35,7 +35,7 @@
@Override
public void change() {
- this.setPassengerCapacity(Integer.valueOf(100));
+ this.setPassengerCapacity(100);
this.setDescription("This Bike is easy to handle");
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java
index ccf2e7b..761cbc9 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java
@@ -39,7 +39,7 @@
@Override
public void change() {
- this.setPassengerCapacity(Integer.valueOf(100));
+ this.setPassengerCapacity(100);
this.setFuelType("HOT AIR");
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java
index a268cd9..c3223c1 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java
@@ -22,7 +22,7 @@
public static Bicycle bikeExample1(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(1));
+ example.setPassengerCapacity(1);
example.setOwner(company);
example.setDescription("Hercules");
// example.addPartNumber("1288H8HH-f");
@@ -32,7 +32,7 @@
public static Bicycle bikeExample2(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(2));
+ example.setPassengerCapacity(2);
example.setOwner(company);
example.setDescription("Atlas");
// example.addPartNumber("176339GT-a");
@@ -43,7 +43,7 @@
public static Bicycle bikeExample3(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(3));
+ example.setPassengerCapacity(3);
example.setOwner(company);
example.setDescription("Aone");
// example.addPartNumber("188181TT-a");
@@ -53,21 +53,21 @@
public static Boat boatExample1(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(10));
+ example.setPassengerCapacity(10);
example.setOwner(company);
return example;
}
public static Boat boatExample2(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(20));
+ example.setPassengerCapacity(20);
example.setOwner(company);
return example;
}
public static Boat boatExample3(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(30);
example.setOwner(company);
return example;
}
@@ -75,8 +75,8 @@
public static Bus busExample1(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("SCHOOL BUS");
example.setFuelType("Petrol");
example.setOwner(company);
@@ -90,8 +90,8 @@
public static Bus busExample2(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("TOUR BUS");
example.setFuelType("Petrol");
example.setOwner(company);
@@ -105,8 +105,8 @@
public static Bus busExample3(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("TRANSIT BUS");
example.setFuelType("Gas");
example.setOwner(company);
@@ -120,8 +120,8 @@
public static Car carExample1() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(30);
example.setDescription("PONTIAC");
example.setFuelType("Petrol");
// example.addPartNumber("021776RM-b");
@@ -133,8 +133,8 @@
public static Car carExample2() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(4));
- example.setFuelCapacity(Integer.valueOf(50));
+ example.setPassengerCapacity(4);
+ example.setFuelCapacity(50);
example.setDescription("TOYOTA");
example.setFuelType("Petrol");
// example.addPartNumber("021776TT-a");
@@ -146,8 +146,8 @@
public static Car carExample3() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(5));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(5);
+ example.setFuelCapacity(60);
example.setDescription("BMW");
example.setFuelType("Disel");
// example.addPartNumber("021776KM-k");
@@ -159,8 +159,8 @@
public static Car carExample4() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(8));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(8);
+ example.setFuelCapacity(100);
example.setDescription("Mazda");
example.setFuelType("Coca-Cola");
// example.addPartNumber("021776KM-k");
@@ -210,8 +210,8 @@
public static FueledVehicle fueledVehicleExample1(Company company) {
FueledVehicle example = new FueledVehicle();
- example.setPassengerCapacity(Integer.valueOf(1));
- example.setFuelCapacity(Integer.valueOf(10));
+ example.setPassengerCapacity(1);
+ example.setFuelCapacity(10);
example.setDescription("Motercycle");
example.setOwner(company);
return example;
@@ -220,8 +220,8 @@
public static Car imaginaryCarExample1()
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(30);
example.setDescription("PONTIAC");
example.setFuelType("Petrol");
// example.addPartNumber("021776RM-b");
@@ -232,8 +232,8 @@
public static Car imaginaryCarExample2()
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(4));
- example.setFuelCapacity(Integer.valueOf(50));
+ example.setPassengerCapacity(4);
+ example.setFuelCapacity(50);
example.setDescription("TOYOTA");
example.setFuelType("Petrol");
// example.addPartNumber("021776TT-a");
@@ -244,8 +244,8 @@
public static Car imaginaryCarExample3()
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(5));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(5);
+ example.setFuelCapacity(60);
example.setDescription("BMW");
example.setFuelType("Disel");
// example.addPartNumber("021776KM-k");
@@ -256,8 +256,8 @@
public static Car imaginaryCarExample4()
{
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(8));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(8);
+ example.setFuelCapacity(100);
example.setDescription("Mazda");
example.setFuelType("Coca-Cola");
// example.addPartNumber("021776KM-k");
@@ -268,7 +268,7 @@
public static NonFueledVehicle nonFueledVehicleExample1(Company company) {
NonFueledVehicle example = new NonFueledVehicle();
- example.setPassengerCapacity(Integer.valueOf(1));
+ example.setPassengerCapacity(1);
example.setOwner(company);
return example;
}
@@ -320,8 +320,8 @@
public static Car sportsCarExample1() {
SportsCar example = new SportsCar();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(60);
example.setDescription("Corvet");
example.setFuelType("Disel");
return example;
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java
index e676756..4d31a54 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java
@@ -57,7 +57,7 @@
public int hashCode() {
String hc = year.toString() + month.toString() + day.toString();
- return Integer.valueOf(hc).intValue();
+ return Integer.parseInt(hc);
}
public void setDay(Integer day) {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java
index b426545..9910800 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java
@@ -40,12 +40,12 @@
generatedImage.setScript(initStringBase(clobSize / 100));
generatedImage.setAudio(initByteBase(blobSize));
generatedImage.setCommentary(initCharArrayBase(clobSize));
- generatedImage.setCustomAttribute1(new SerializableNonEntity(Long.valueOf(Long.MAX_VALUE)));
- generatedImage.setCustomAttribute2(new SerializableNonEntity(Long.valueOf(Long.MAX_VALUE)));
- generatedImage.setXml1(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE)));
- generatedImage.setXml2(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE)));
- generatedImage.setJson1(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE)));
- generatedImage.setJson2(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE)));
+ generatedImage.setCustomAttribute1(new SerializableNonEntity(Long.MAX_VALUE));
+ generatedImage.setCustomAttribute2(new SerializableNonEntity(Long.MAX_VALUE));
+ generatedImage.setXml1(new SerializableNonEntity(Long.MIN_VALUE));
+ generatedImage.setXml2(new SerializableNonEntity(Long.MIN_VALUE));
+ generatedImage.setJson1(new SerializableNonEntity(Long.MIN_VALUE));
+ generatedImage.setJson2(new SerializableNonEntity(Long.MIN_VALUE));
return generatedImage;
}
@@ -77,7 +77,7 @@
new Random().nextBytes(pictures);
Byte[] pics = new Byte[cycle];
for (int x = 0; x < cycle; x++) {
- pics[x] = Byte.valueOf(pictures[x]);
+ pics[x] = pictures[x];
}
return pics;
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java
index 9973718..565ac5d 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java
@@ -42,7 +42,7 @@
@Override
public Employee findById(int id) {
- Employee employee = entityManager.find(Employee.class, Integer.valueOf(id));
+ Employee employee = entityManager.find(Employee.class, id);
if (employee != null) {
employee.getAddress();
}
@@ -58,7 +58,7 @@
}
@Override
public Employee fetchById(int id) {
- Employee employee = entityManager.find(Employee.class, Integer.valueOf(id));
+ Employee employee = entityManager.find(Employee.class, id);
employee.getAddress();
employee.getManager();
return employee;
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java
index ec99c48..64a858a 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java
@@ -125,11 +125,11 @@
}
public void addAmex(long number) {
- getCreditCards().put(AMEX, Long.valueOf(number));
+ getCreditCards().put(AMEX, number);
}
public void addCanadianImperialCreditLine(long number) {
- getCreditLines().put(CANADIAN_IMPERIAL, Long.valueOf(number));
+ getCreditLines().put(CANADIAN_IMPERIAL, number);
}
public void addDealer(Dealer dealer) {
@@ -137,7 +137,7 @@
}
public void addDinersClub(long number) {
- getCreditCards().put(DINERS, Long.valueOf(number));
+ getCreditCards().put(DINERS, number);
}
public void addManagedEmployee(Employee emp) {
@@ -146,7 +146,7 @@
}
public void addMastercard(long number) {
- getCreditCards().put(MASTERCARD, Long.valueOf(number));
+ getCreditCards().put(MASTERCARD, number);
}
public void addPhoneNumber(PhoneNumber phone) {
@@ -163,19 +163,19 @@
}
public void addRoyalBankCreditLine(long number) {
- getCreditLines().put(ROYAL_BANK, Long.valueOf(number));
+ getCreditLines().put(ROYAL_BANK, number);
}
public void addScotiabankCreditLine(long number) {
- getCreditLines().put(SCOTIABANK, Long.valueOf(number));
+ getCreditLines().put(SCOTIABANK, number);
}
public void addTorontoDominionCreditLine(long number) {
- getCreditLines().put(TORONTO_DOMINION, Long.valueOf(number));
+ getCreditLines().put(TORONTO_DOMINION, number);
}
public void addVisa(long number) {
- getCreditCards().put(VISA, Long.valueOf(number));
+ getCreditCards().put(VISA, number);
}
/**
@@ -351,7 +351,7 @@
if (cardNumber == null) {
return false;
} else {
- return cardNumber.longValue() == number;
+ return cardNumber == number;
}
}
@@ -359,7 +359,7 @@
if (creditLineNumber == null) {
return false;
} else {
- return creditLineNumber.longValue() == number;
+ return creditLineNumber == number;
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java
index e6702af..6f4842b 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java
@@ -127,11 +127,11 @@
}
public void addAmex(long number) {
- getCreditCards().put(AMEX, Long.valueOf(number));
+ getCreditCards().put(AMEX, number);
}
public void addCanadianImperialCreditLine(long number) {
- getCreditLines().put(CANADIAN_IMPERIAL, Long.valueOf(number));
+ getCreditLines().put(CANADIAN_IMPERIAL, number);
}
public void addDealer(Dealer dealer) {
@@ -139,7 +139,7 @@
}
public void addDinersClub(long number) {
- getCreditCards().put(DINERS, Long.valueOf(number));
+ getCreditCards().put(DINERS, number);
}
public void addManagedEmployee(Employee emp) {
@@ -148,7 +148,7 @@
}
public void addMastercard(long number) {
- getCreditCards().put(MASTERCARD, Long.valueOf(number));
+ getCreditCards().put(MASTERCARD, number);
}
public void addPhoneNumber(PhoneNumber phone) {
@@ -165,19 +165,19 @@
}
public void addRoyalBankCreditLine(long number) {
- getCreditLines().put(ROYAL_BANK, Long.valueOf(number));
+ getCreditLines().put(ROYAL_BANK, number);
}
public void addScotiabankCreditLine(long number) {
- getCreditLines().put(SCOTIABANK, Long.valueOf(number));
+ getCreditLines().put(SCOTIABANK, number);
}
public void addTorontoDominionCreditLine(long number) {
- getCreditLines().put(TORONTO_DOMINION, Long.valueOf(number));
+ getCreditLines().put(TORONTO_DOMINION, number);
}
public void addVisa(long number) {
- getCreditCards().put(VISA, Long.valueOf(number));
+ getCreditCards().put(VISA, number);
}
/**
@@ -348,7 +348,7 @@
if (cardNumber == null) {
return false;
} else {
- return cardNumber.longValue() == number;
+ return cardNumber == number;
}
}
@@ -356,7 +356,7 @@
if (creditLineNumber == null) {
return false;
} else {
- return creditLineNumber.longValue() == number;
+ return creditLineNumber == number;
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java
index 69207aa..2a153a0 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java
@@ -29,7 +29,7 @@
@Override
public void change() {
- this.setPassengerCapacity(Integer.valueOf(100));
+ this.setPassengerCapacity(100);
this.setDescription("This Bike is easy to handle");
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java
index 7ed3449..b20b68f 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java
@@ -55,7 +55,7 @@
@Override
public void change() {
- this.setPassengerCapacity(Integer.valueOf(100));
+ this.setPassengerCapacity(100);
this.setFuelType("HOT AIR");
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java
index 73dbfe9..3876556 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java
@@ -22,7 +22,7 @@
public static Bicycle bikeExample1(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(1));
+ example.setPassengerCapacity(1);
example.setOwner(company);
example.setDescription("Hercules");
// example.addPartNumber("1288H8HH-f");
@@ -32,7 +32,7 @@
public static Bicycle bikeExample2(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(2));
+ example.setPassengerCapacity(2);
example.setOwner(company);
example.setDescription("Atlas");
// example.addPartNumber("176339GT-a");
@@ -43,7 +43,7 @@
public static Bicycle bikeExample3(Company company) {
Bicycle example = new Bicycle();
- example.setPassengerCapacity(Integer.valueOf(3));
+ example.setPassengerCapacity(3);
example.setOwner(company);
example.setDescription("Aone");
// example.addPartNumber("188181TT-a");
@@ -53,21 +53,21 @@
public static Boat boatExample1(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(10));
+ example.setPassengerCapacity(10);
example.setOwner(company);
return example;
}
public static Boat boatExample2(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(20));
+ example.setPassengerCapacity(20);
example.setOwner(company);
return example;
}
public static Boat boatExample3(Company company) {
Boat example = new Boat();
- example.setPassengerCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(30);
example.setOwner(company);
return example;
}
@@ -75,8 +75,8 @@
public static Bus busExample1(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("SCHOOL BUS");
example.setFuelType("Petrol");
example.setOwner(company);
@@ -90,8 +90,8 @@
public static Bus busExample2(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("TOUR BUS");
example.setFuelType("Petrol");
example.setOwner(company);
@@ -105,8 +105,8 @@
public static Bus busExample3(Company company) {
Bus example = new Bus();
- example.setPassengerCapacity(Integer.valueOf(30));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(30);
+ example.setFuelCapacity(100);
example.setDescription("TRANSIT BUS");
example.setFuelType("Gas");
example.setOwner(company);
@@ -120,8 +120,8 @@
public static Car carExample1() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(30);
example.setDescription("PONTIAC");
example.setFuelType("Petrol");
// example.addPartNumber("021776RM-b");
@@ -133,8 +133,8 @@
public static Car carExample2() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(4));
- example.setFuelCapacity(Integer.valueOf(50));
+ example.setPassengerCapacity(4);
+ example.setFuelCapacity(50);
example.setDescription("TOYOTA");
example.setFuelType("Petrol");
// example.addPartNumber("021776TT-a");
@@ -146,8 +146,8 @@
public static Car carExample3() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(5));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(5);
+ example.setFuelCapacity(60);
example.setDescription("BMW");
example.setFuelType("Disel");
// example.addPartNumber("021776KM-k");
@@ -159,8 +159,8 @@
public static Car carExample4() {
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(8));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(8);
+ example.setFuelCapacity(100);
example.setDescription("Mazda");
example.setFuelType("Coca-Cola");
// example.addPartNumber("021776KM-k");
@@ -210,8 +210,8 @@
public static FueledVehicle fueledVehicleExample1(Company company) {
FueledVehicle example = new FueledVehicle();
- example.setPassengerCapacity(Integer.valueOf(1));
- example.setFuelCapacity(Integer.valueOf(10));
+ example.setPassengerCapacity(1);
+ example.setFuelCapacity(10);
example.setDescription("Motercycle");
example.setOwner(company);
return example;
@@ -220,8 +220,8 @@
public static Car imaginaryCarExample1()
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(30));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(30);
example.setDescription("PONTIAC");
example.setFuelType("Petrol");
// example.addPartNumber("021776RM-b");
@@ -232,8 +232,8 @@
public static Car imaginaryCarExample2()
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(4));
- example.setFuelCapacity(Integer.valueOf(50));
+ example.setPassengerCapacity(4);
+ example.setFuelCapacity(50);
example.setDescription("TOYOTA");
example.setFuelType("Petrol");
// example.addPartNumber("021776TT-a");
@@ -244,8 +244,8 @@
public static Car imaginaryCarExample3()
{
ImaginaryCar example = new ImaginaryCar();
- example.setPassengerCapacity(Integer.valueOf(5));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(5);
+ example.setFuelCapacity(60);
example.setDescription("BMW");
example.setFuelType("Disel");
// example.addPartNumber("021776KM-k");
@@ -256,8 +256,8 @@
public static Car imaginaryCarExample4()
{
Car example = new Car();
- example.setPassengerCapacity(Integer.valueOf(8));
- example.setFuelCapacity(Integer.valueOf(100));
+ example.setPassengerCapacity(8);
+ example.setFuelCapacity(100);
example.setDescription("Mazda");
example.setFuelType("Coca-Cola");
// example.addPartNumber("021776KM-k");
@@ -268,7 +268,7 @@
public static NonFueledVehicle nonFueledVehicleExample1(Company company) {
NonFueledVehicle example = new NonFueledVehicle();
- example.setPassengerCapacity(Integer.valueOf(1));
+ example.setPassengerCapacity(1);
example.setOwner(company);
return example;
}
@@ -319,8 +319,8 @@
public static Car sportsCarExample1() {
SportsCar example = new SportsCar();
- example.setPassengerCapacity(Integer.valueOf(2));
- example.setFuelCapacity(Integer.valueOf(60));
+ example.setPassengerCapacity(2);
+ example.setFuelCapacity(60);
example.setDescription("Corvet");
example.setFuelType("Disel");
return example;
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java
index 1aa12e6..74e750b 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java
@@ -54,7 +54,7 @@
public int hashCode() {
String hc = year.toString() + month.toString() + day.toString();
- return Integer.valueOf(hc).intValue();
+ return Integer.parseInt(hc);
}
public void setDay(Integer day) {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java
index 654eff5..1654512 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java
@@ -201,7 +201,7 @@
employee.setFirstName("Bob");
employee.setLastName("Smith");
employee.setMale();
- employee.setSalary(Long.valueOf(35000));
+ employee.setSalary(35000L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.setDepartment(departmentExample1());
@@ -224,7 +224,7 @@
employee.setFemale();
employee.setPeriod(employmentPeriodExample10());
employee.setAddress(addressExample10());
- employee.setSalary(Long.valueOf(56232));
+ employee.setSalary(56232L);
employee.addPhoneNumber(phoneNumberExample1());
employee.addPhoneNumber(phoneNumberExample2());
employee.addResponsibility("Sort files");
@@ -244,7 +244,7 @@
employee.setFemale();
employee.setPeriod(employmentPeriodExample11());
employee.setAddress(addressExample11());
- employee.setSalary(Long.valueOf(75000));
+ employee.setSalary(75000L);
employee.addPhoneNumber(phoneNumberExample2());
employee.addPhoneNumber(phoneNumberExample3());
employee.addPhoneNumber(phoneNumberExample4());
@@ -266,7 +266,7 @@
employee.setMale();
employee.setPeriod(employmentPeriodExample12());
employee.setAddress(addressExample12());
- employee.setSalary(Long.valueOf(50000));
+ employee.setSalary(50000L);
employee.addPhoneNumber(phoneNumberExample3());
employee.addPhoneNumber(phoneNumberExample4());
employee.addResponsibility("Bug fixes");
@@ -283,7 +283,7 @@
try {
employee.setFirstName("SquareRoot");
employee.setLastName("TestCase1");
- employee.setSalary(Long.valueOf(36));
+ employee.setSalary(36L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.addPhoneNumber(phoneNumberExample1());
@@ -302,7 +302,7 @@
try {
employee.setFirstName("SquareRoot");
employee.setLastName("TestCase2");
- employee.setSalary(Long.valueOf(49));
+ employee.setSalary(49L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.addPhoneNumber(phoneNumberExample1());
@@ -322,7 +322,7 @@
try {
employee.setFirstName("No Phone Number");
employee.setLastName("Test case");
- employee.setSalary(Long.valueOf(555));
+ employee.setSalary(555L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.addResponsibility("Find ways to make the days go by faster");
@@ -340,7 +340,7 @@
employee.setFirstName("John");
employee.setLastName("Way");
employee.setMale();
- employee.setSalary(Long.valueOf(53000));
+ employee.setSalary(53000L);
startCalendar.set(1970, 0, 1, 8, 0, 0);
endCalendar.set(1970, 0, 1, 17, 30, 0);
employee.setPeriod(employmentPeriodExample2());
@@ -364,7 +364,7 @@
employee.setFirstName("Charles");
employee.setLastName("Chanley");
employee.setMale();
- employee.setSalary(Long.valueOf(43000));
+ employee.setSalary(43000L);
startCalendar.set(1970, 0, 1, 7, 0, 0);
endCalendar.set(1970, 0, 1, 15, 30, 0);
employee.setPeriod(employmentPeriodExample6());
@@ -387,7 +387,7 @@
employee.setFirstName("Emanual");
employee.setLastName("Smith");
employee.setMale();
- employee.setSalary(Long.valueOf(49631));
+ employee.setSalary(49631L);
startCalendar.set(1970, 0, 1, 6, 45, 0);
endCalendar.set(1970, 0, 1, 16, 32, 0);
employee.setPeriod(employmentPeriodExample5());
@@ -411,7 +411,7 @@
employee.setFirstName("Sarah");
employee.setLastName("Way");
employee.setFemale();
- employee.setSalary(Long.valueOf(87000));
+ employee.setSalary(87000L);
startCalendar.set(1970, 0, 1, 12, 0, 0);
endCalendar.set(1970, 0, 1, 20, 0, 30);
employee.setPeriod(employmentPeriodExample4());
@@ -434,7 +434,7 @@
employee.setFirstName("Marcus");
employee.setLastName("Saunders");
employee.setMale();
- employee.setSalary(Long.valueOf(54300));
+ employee.setSalary(54300L);
employee.setPeriod(employmentPeriodExample3());
employee.setAddress(addressExample3());
employee.addResponsibility("Write user specifications.");
@@ -454,7 +454,7 @@
employee.setFirstName("Nancy");
employee.setLastName("White");
employee.setFemale();
- employee.setSalary(Long.valueOf(31000));
+ employee.setSalary(31000L);
employee.setPeriod(employmentPeriodExample7());
employee.setAddress(addressExample7());
employee.addPhoneNumber(phoneNumberExample3());
@@ -472,7 +472,7 @@
employee.setFirstName("Fred");
employee.setLastName("Jones");
employee.setMale();
- employee.setSalary(Long.valueOf(500000));
+ employee.setSalary(500000L);
employee.setPeriod(employmentPeriodExample8());
employee.setAddress(addressExample8());
employee.addPhoneNumber(phoneNumberExample4());
@@ -491,7 +491,7 @@
employee.setFirstName("Betty");
employee.setLastName("Jones");
employee.setFemale();
- employee.setSalary(Long.valueOf(500001));
+ employee.setSalary(500001L);
startCalendar.set(1970, 0, 1, 22, 0, 0);
endCalendar.set(1970, 0, 1, 5, 30, 0);
employee.setPeriod(employmentPeriodExample9());
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java
index f6c10b6..91e3ef0 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java
@@ -187,7 +187,7 @@
employee.setFirstName("Bob");
employee.setLastName("Smith");
employee.setMale();
- employee.setSalary(Long.valueOf(35000));
+ employee.setSalary(35000L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.setDepartment(departmentExample1());
@@ -210,7 +210,7 @@
employee.setFemale();
employee.setPeriod(employmentPeriodExample10());
employee.setAddress(addressExample10());
- employee.setSalary(Long.valueOf(56232));
+ employee.setSalary(56232L);
employee.addPhoneNumber(phoneNumberExample1());
employee.addPhoneNumber(phoneNumberExample2());
employee.addResponsibility("Sort files");
@@ -230,7 +230,7 @@
employee.setFemale();
employee.setPeriod(employmentPeriodExample11());
employee.setAddress(addressExample11());
- employee.setSalary(Long.valueOf(75000));
+ employee.setSalary(75000L);
employee.addPhoneNumber(phoneNumberExample2());
employee.addPhoneNumber(phoneNumberExample3());
employee.addPhoneNumber(phoneNumberExample4());
@@ -252,7 +252,7 @@
employee.setMale();
employee.setPeriod(employmentPeriodExample12());
employee.setAddress(addressExample12());
- employee.setSalary(Long.valueOf(50000));
+ employee.setSalary(50000L);
employee.addPhoneNumber(phoneNumberExample3());
employee.addPhoneNumber(phoneNumberExample4());
employee.addResponsibility("Bug fixes");
@@ -269,7 +269,7 @@
try {
employee.setFirstName("SquareRoot");
employee.setLastName("TestCase1");
- employee.setSalary(Long.valueOf(36));
+ employee.setSalary(36L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.addPhoneNumber(phoneNumberExample1());
@@ -288,7 +288,7 @@
try {
employee.setFirstName("SquareRoot");
employee.setLastName("TestCase2");
- employee.setSalary(Long.valueOf(49));
+ employee.setSalary(49L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.addPhoneNumber(phoneNumberExample1());
@@ -308,7 +308,7 @@
try {
employee.setFirstName("No Phone Number");
employee.setLastName("Test case");
- employee.setSalary(Long.valueOf(555));
+ employee.setSalary(555L);
employee.setPeriod(employmentPeriodExample1());
employee.setAddress(addressExample1());
employee.addResponsibility("Find ways to make the days go by faster");
@@ -326,7 +326,7 @@
employee.setFirstName("John");
employee.setLastName("Way");
employee.setMale();
- employee.setSalary(Long.valueOf(53000));
+ employee.setSalary(53000L);
startCalendar.set(1970, 0, 1, 8, 0, 0);
endCalendar.set(1970, 0, 1, 17, 30, 0);
employee.setPeriod(employmentPeriodExample2());
@@ -350,7 +350,7 @@
employee.setFirstName("Charles");
employee.setLastName("Chanley");
employee.setMale();
- employee.setSalary(Long.valueOf(43000));
+ employee.setSalary(43000L);
startCalendar.set(1970, 0, 1, 7, 0, 0);
endCalendar.set(1970, 0, 1, 15, 30, 0);
employee.setPeriod(employmentPeriodExample6());
@@ -373,7 +373,7 @@
employee.setFirstName("Emanual");
employee.setLastName("Smith");
employee.setMale();
- employee.setSalary(Long.valueOf(49631));
+ employee.setSalary(49631L);
startCalendar.set(1970, 0, 1, 6, 45, 0);
endCalendar.set(1970, 0, 1, 16, 32, 0);
employee.setPeriod(employmentPeriodExample5());
@@ -397,7 +397,7 @@
employee.setFirstName("Sarah");
employee.setLastName("Way");
employee.setFemale();
- employee.setSalary(Long.valueOf(87000));
+ employee.setSalary(87000L);
startCalendar.set(1970, 0, 1, 12, 0, 0);
endCalendar.set(1970, 0, 1, 20, 0, 30);
employee.setPeriod(employmentPeriodExample4());
@@ -420,7 +420,7 @@
employee.setFirstName("Marcus");
employee.setLastName("Saunders");
employee.setMale();
- employee.setSalary(Long.valueOf(54300));
+ employee.setSalary(54300L);
employee.setPeriod(employmentPeriodExample3());
employee.setAddress(addressExample3());
employee.addResponsibility("Write user specifications.");
@@ -440,7 +440,7 @@
employee.setFirstName("Nancy");
employee.setLastName("White");
employee.setFemale();
- employee.setSalary(Long.valueOf(31000));
+ employee.setSalary(31000L);
employee.setPeriod(employmentPeriodExample7());
employee.setAddress(addressExample7());
employee.addPhoneNumber(phoneNumberExample3());
@@ -458,7 +458,7 @@
employee.setFirstName("Fred");
employee.setLastName("Jones");
employee.setMale();
- employee.setSalary(Long.valueOf(500000));
+ employee.setSalary(500000L);
employee.setPeriod(employmentPeriodExample8());
employee.setAddress(addressExample8());
employee.addPhoneNumber(phoneNumberExample4());
@@ -477,7 +477,7 @@
employee.setFirstName("Betty");
employee.setLastName("Jones");
employee.setFemale();
- employee.setSalary(Long.valueOf(500001));
+ employee.setSalary(500001L);
startCalendar.set(1970, 0, 1, 22, 0, 0);
endCalendar.set(1970, 0, 1, 5, 30, 0);
employee.setPeriod(employmentPeriodExample9());
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa22/jta/AnimalDAOUpdate.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa22/jta/AnimalDAOUpdate.java
index 593740f..bc6a604 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa22/jta/AnimalDAOUpdate.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/models/jpa22/jta/AnimalDAOUpdate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -43,7 +43,7 @@
*/
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public Animal updateAnimal(final int id, final String name, final AnimalCheck listener) {
- Animal animal = em.find(Animal.class, Integer.valueOf(id));
+ Animal animal = em.find(Animal.class, id);
Animal eventOld = animal.clone();
animal.setName(name);
Animal eventNew = animal.clone();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java
index 75c6059..4ee1599 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java
@@ -1975,7 +1975,7 @@
Object[] objectdata = (Object[])aQuery.getSingleResult();
assertTrue("Address data not found or returned using stored procedure", ((objectdata!=null)&& (objectdata.length==2)) );
- assertTrue("Address Id data returned doesn't match persisted address", (address1.getID() == ((Long)objectdata[0]).longValue()) );
+ assertTrue("Address Id data returned doesn't match persisted address", (address1.getID() == (Long) objectdata[0]) );
assertTrue("Address Street data returned doesn't match persisted address", ( address1.getStreet().equals(objectdata[1] )) );
} catch (RuntimeException e) {
if (isTransactionActive(em)){
@@ -2485,7 +2485,7 @@
// verify properties set on Employee instance
errorMsg += verifyPropertyValue(descriptor, "entityName", String.class, "Employee");
- errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, Integer.valueOf(1));
+ errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, 1);
// each attribute of Employee was assigned a property attributeName with the value attribute name.
for(DatabaseMapping mapping : descriptor.getMappings()) {
@@ -2495,13 +2495,13 @@
// attribute m_lastName has many properties of different types
DatabaseMapping mapping = descriptor.getMappingForAttributeName("lastName");
errorMsg += verifyPropertyValue(mapping, "BooleanProperty", Boolean.class, Boolean.TRUE);
- errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, Byte.valueOf((byte)1));
- errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, Character.valueOf('A'));
- errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, Double.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, Float.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, Integer.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, Long.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, Short.valueOf((short)1));
+ errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, (byte) 1);
+ errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, 'A');
+ errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, 1.0);
+ errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, 1F);
+ errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, 1);
+ errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, 1L);
+ errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, (short) 1);
errorMsg += verifyPropertyValue(mapping, "BigDecimalProperty", java.math.BigDecimal.class, java.math.BigDecimal.ONE);
errorMsg += verifyPropertyValue(mapping, "BigIntegerProperty", java.math.BigInteger.class, java.math.BigInteger.ONE);
errorMsg += verifyPropertyValue(mapping, "byte[]Property", byte[].class, new byte[]{1, 2, 3, 4});
@@ -3864,7 +3864,7 @@
Vector pk = new Vector(1);
pk.add(dealer.getId());
- return ((Integer)getServerSession().getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, getServerSession())).intValue();
+ return (Integer) getServerSession().getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, getServerSession());
}
protected List<Employee> createEmployeesWithUnidirectionalMappings(String lastName) {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java
index d8df208..f26c94c 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java
@@ -316,7 +316,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
ChestProtector e1 = new ChestProtector();
e1.setDescription("chest_protector");
- e1.setSerialNumber(Integer.valueOf(ID_PADS));
+ e1.setSerialNumber(ID_PADS);
em.persist(e1);
commitTransaction(em);
// do not close the entityManager between transactions or you will get bug# 307445
@@ -325,7 +325,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
Pads p1 = new Pads();
p1.setDescription("pads");
- p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR));
+ p1.setSerialNumber(ID_CHESTPROTECTOR);
em.persist(p1);
commitTransaction(em);
closeEntityManager(em);
@@ -390,7 +390,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
ChestProtector e1 = new ChestProtector();
e1.setDescription("chest_protector");
- e1.setSerialNumber(Integer.valueOf(ID_PADS));
+ e1.setSerialNumber(ID_PADS);
em.persist(e1);
commitTransaction(em);
// do not close the entityManager between transactions or you will get bug# 307445
@@ -399,7 +399,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
Pads p1 = new Pads();
p1.setDescription("pads");
- p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR));
+ p1.setSerialNumber(ID_CHESTPROTECTOR);
em.persist(p1);
commitTransaction(em);
closeEntityManager(em);
@@ -463,7 +463,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
ChestProtector e1 = new ChestProtector();
e1.setDescription("chest_protector");
- e1.setSerialNumber(Integer.valueOf(ID_PADS));
+ e1.setSerialNumber(ID_PADS);
em.persist(e1);
commitTransaction(em);
// do not close the entityManager between transactions or you will get bug# 307445
@@ -472,7 +472,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
Pads p1 = new Pads();
p1.setDescription("pads");
- p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR));
+ p1.setSerialNumber(ID_CHESTPROTECTOR);
em.persist(p1);
commitTransaction(em);
closeEntityManager(em);
@@ -531,7 +531,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
ChestProtector e1 = new ChestProtector();
e1.setDescription("chest_protector");
- e1.setSerialNumber(Integer.valueOf(ID_PADS));
+ e1.setSerialNumber(ID_PADS);
em.persist(e1);
commitTransaction(em);
// do not close the entityManager between transactions or you will get bug# 307445
@@ -539,7 +539,7 @@
beginTransaction(em);
Pads p1 = new Pads();
p1.setDescription("pads");
- p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR));
+ p1.setSerialNumber(ID_CHESTPROTECTOR);
em.persist(p1);
commitTransaction(em);
closeEntityManager(em);
@@ -591,7 +591,7 @@
// HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity)
ChestProtector e1 = new ChestProtector();
e1.setDescription("gear");
- e1.setSerialNumber(Integer.valueOf(ID));
+ e1.setSerialNumber(ID);
em.persist(e1);
commitTransaction(em);
closeEntityManager(em);
@@ -663,7 +663,7 @@
EntityManager em1 = createEntityManager();
JpaCache anEclipseLinkCache = (JpaCache)getEntityManagerFactory().getCache();
try {
- anEclipseLinkCache.getId(Integer.valueOf(1));
+ anEclipseLinkCache.getId(1);
} catch (IllegalArgumentException iae) {
_exceptionThrown = true;
} finally {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CallbackEventJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CallbackEventJUnitTestSuite.java
index fc59e9f..ed049c4 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CallbackEventJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/CallbackEventJUnitTestSuite.java
@@ -257,7 +257,7 @@
protected int getVersion(Employee emp) {
Vector pk = new Vector();
pk.add(emp.getId());
- return ((Integer)getServerSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(emp, pk, getServerSession())).intValue();
+ return (Integer) getServerSession().getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(emp, pk, getServerSession());
}
// gf 2894: merge does not trigger prePersist callbacks
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java
index 95654bf..14a186f 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java
@@ -1319,8 +1319,8 @@
int lastIndex = firstName.length();
List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)").
setParameter("p1", firstName).
- setParameter("p2", Integer.valueOf(firstIndex)).
- setParameter("p3", Integer.valueOf(lastIndex)).
+ setParameter("p2", firstIndex).
+ setParameter("p3", lastIndex).
getResultList();
// clean up
@@ -1934,7 +1934,7 @@
employee = em.find(Employee.class, employee.getId(), LockModeType.PESSIMISTIC_FORCE_INCREMENT);
commitTransaction(em);
- assertTrue("The version was not updated on the pessimistic lock.", version1.intValue() < employee.getVersion().intValue());
+ assertTrue("The version was not updated on the pessimistic lock.", version1 < employee.getVersion());
} catch (RuntimeException ex) {
if (isTransactionActive(em)) {
rollbackTransaction(em);
@@ -5849,17 +5849,17 @@
assertTrue("FETCH_GROUP not set.", olrQuery.getFetchGroup() == fetchGroup);
// Timeout
- query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100));
+ query.setHint(QueryHints.JDBC_TIMEOUT, 100);
assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100);
// JDBC
- query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101));
+ query.setHint(QueryHints.JDBC_FETCH_SIZE, 101);
assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101);
- query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103));
+ query.setHint(QueryHints.JDBC_MAX_ROWS, 103);
assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103);
- query.setHint(QueryHints.JDBC_FIRST_RESULT, Integer.valueOf(123));
+ query.setHint(QueryHints.JDBC_FIRST_RESULT, 123);
assertTrue("JDBC_FIRST_RESULT not set.", olrQuery.getFirstResult() == 123);
// Refresh
@@ -7420,7 +7420,7 @@
em = createEntityManager();
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
@@ -7462,7 +7462,7 @@
int managerId = manager.getId();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
address = new Address();
@@ -7486,7 +7486,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
manager = employee.getManager();
@@ -7496,8 +7496,8 @@
assertTrue("The manager was not persisted.", employee.getManager() != null);
assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro"));
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
- Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId));
+ Address initialAddress = em.find(Address.class, addressId);
+ Employee initialManager = em.find(Employee.class, managerId);
employee.setAddress((Address)null);
employee.setManager(null);
em.remove(address);
@@ -7562,7 +7562,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
manager = employee.getManager();
@@ -7572,8 +7572,8 @@
assertTrue("The manager was not persisted.", employee.getManager() != null);
assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro"));
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
- Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId));
+ Address initialAddress = em.find(Address.class, addressId);
+ Employee initialManager = em.find(Employee.class, managerId);
employee.setAddress((Address)null);
employee.setManager(null);
em.remove(address);
@@ -7615,7 +7615,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
employee.getManager();
@@ -7639,7 +7639,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
manager = employee.getManager();
@@ -7649,8 +7649,8 @@
assertTrue("The manager was not persisted.", employee.getManager() != null);
assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro"));
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
- Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId));
+ Address initialAddress = em.find(Address.class, addressId);
+ Employee initialManager = em.find(Employee.class, managerId);
employee.setAddress((Address)null);
employee.setManager(null);
@@ -7871,7 +7871,7 @@
if(emp.getAddress() != null) {
error = " Employee "+emp.getLastName()+" still has address;";
}
- int ind = Integer.valueOf(emp.getLastName()).intValue();
+ int ind = Integer.parseInt(emp.getLastName());
if(emp.getSalary() != ind) {
error = " Employee "+emp.getLastName()+" has wrong salary "+emp.getSalary()+";";
}
@@ -8419,7 +8419,7 @@
errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage();
}
try {
- em.getReference(Employee.class, Integer.valueOf(1));
+ em.getReference(Employee.class, 1);
errorMsg = errorMsg + "; em.getReference() didn't throw exception";
} catch(IllegalStateException ise) {
// expected
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/ReportQueryConstructorExpressionTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/ReportQueryConstructorExpressionTestSuite.java
index 1b64033..09138a0 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/ReportQueryConstructorExpressionTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/ReportQueryConstructorExpressionTestSuite.java
@@ -235,7 +235,7 @@
while (i.hasNext()){
DataHolder holder = (DataHolder)((ReportQueryResult)i.next()).get(DataHolder.class.getName());
ReportQueryResult result = (ReportQueryResult)report.next();
- assertTrue("Incorrect salary ", ((Integer)result.get("salary")).intValue() == holder.getPrimitiveInt());
+ assertTrue("Incorrect salary ", (Integer) result.get("salary") == holder.getPrimitiveInt());
}
assertTrue("Different result sizes", !(report.hasNext()));
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java
index 91f4781..eda4438 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java
@@ -189,7 +189,7 @@
query.addArgument("1");
Vector params = new Vector();
//4000 is a more reasonable budget given test data if results are expected
- params.add(Integer.valueOf(4000));
+ params.add(4000);
List results = (List)getServerSession().executeQuery(query, params);
assertNotNull("No result returned", results);
assertTrue("Empty list returned", (results.size()!=0));
@@ -208,7 +208,7 @@
query.setShouldBindAllParameters(true);
query.addArgument("1");
Vector params = new Vector();
- params.add(Integer.valueOf(4000));
+ params.add(4000);
List results = (List)getServerSession().executeQuery(query, params);
assertNotNull("No result returned", results);
assertTrue("Empty list returned", (results.size()!=0));
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java
index fdb9e2f..a4e65bc 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java
@@ -1048,8 +1048,8 @@
b = em.merge(b);
a = em.merge(a);
- assertTrue("The PK value for "+ b.getClass() +" (" + b.getId().getNumberId().getValue() + ") is not sequence generated", (b.getId().getNumberId().getValue() >= Long.valueOf(1000)));
- assertTrue("The PK value for "+ a.getClass() +" (" + a.getId().getNumberId().getValue() + ") is not sequence generated", (a.getId().getNumberId().getValue() >= Long.valueOf(1000)));
+ assertTrue("The PK value for "+ b.getClass() +" (" + b.getId().getNumberId().getValue() + ") is not sequence generated", (b.getId().getNumberId().getValue() >= 1000L));
+ assertTrue("The PK value for "+ a.getClass() +" (" + a.getId().getNumberId().getValue() + ") is not sequence generated", (a.getId().getNumberId().getValue() >= 1000L));
rollbackTransaction(em);
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java
index c1cc449..56b567a 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java
@@ -64,7 +64,7 @@
em.getTransaction().commit();
em.close();
try {
- Integer i = Integer.valueOf(5);
+ Integer i = 5;
Thread thread1 = new Thread(new Runner1(i, dept.getId(), equip.getId(), emf));
thread1.setName("Runner1");
Thread thread2 = new Thread(new Runner2(i, dept.getId(), equip.getId(), emf));
@@ -107,7 +107,7 @@
if (isOnServer()) {
return;
}
- Integer toWaitOn = Integer.valueOf(4);
+ Integer toWaitOn = 4;
Thread thread1 = null;
EntityManagerFactory emf = getEntityManagerFactory();
EntityManager em = emf.createEntityManager();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java
index 0485017..9d8469a 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java
@@ -1365,8 +1365,8 @@
int lastIndex = firstName.length();
List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)").
setParameter("p1", firstName).
- setParameter("p2", Integer.valueOf(firstIndex)).
- setParameter("p3", Integer.valueOf(lastIndex)).
+ setParameter("p2", firstIndex).
+ setParameter("p3", lastIndex).
getResultList();
// clean up
@@ -1973,7 +1973,7 @@
employee = em.find(Employee.class, employee.getId(), LockModeType.PESSIMISTIC_FORCE_INCREMENT);
commitTransaction(em);
- assertTrue("The version was not updated on the pessimistic lock.", version1.intValue() < employee.getVersion().intValue());
+ assertTrue("The version was not updated on the pessimistic lock.", version1 < employee.getVersion());
} catch (RuntimeException ex) {
if (isTransactionActive(em)) {
rollbackTransaction(em);
@@ -5251,17 +5251,17 @@
assertTrue("FETCH_GROUP not set.", olrQuery.getFetchGroup() == fetchGroup);
// Timeout
- query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100));
+ query.setHint(QueryHints.JDBC_TIMEOUT, 100);
assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100);
// JDBC
- query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101));
+ query.setHint(QueryHints.JDBC_FETCH_SIZE, 101);
assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101);
- query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103));
+ query.setHint(QueryHints.JDBC_MAX_ROWS, 103);
assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103);
- query.setHint(QueryHints.JDBC_FIRST_RESULT, Integer.valueOf(123));
+ query.setHint(QueryHints.JDBC_FIRST_RESULT, 123);
assertTrue("JDBC_FIRST_RESULT not set.", olrQuery.getFirstResult() == 123);
// Refresh
@@ -6607,7 +6607,7 @@
em = createEntityManager();
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
@@ -6649,7 +6649,7 @@
int managerId = manager.getId();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
address = new Address();
@@ -6673,7 +6673,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
manager = employee.getManager();
@@ -6683,8 +6683,8 @@
assertTrue("The manager was not persisted.", employee.getManager() != null);
assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro"));
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
- Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId));
+ Address initialAddress = em.find(Address.class, addressId);
+ Employee initialManager = em.find(Employee.class, managerId);
employee.setAddress((Address)null);
employee.setManager(null);
em.remove(address);
@@ -6749,7 +6749,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
manager = employee.getManager();
@@ -6759,8 +6759,8 @@
assertTrue("The manager was not persisted.", employee.getManager() != null);
assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro"));
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
- Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId));
+ Address initialAddress = em.find(Address.class, addressId);
+ Employee initialManager = em.find(Employee.class, managerId);
employee.setAddress((Address)null);
employee.setManager(null);
em.remove(address);
@@ -6802,7 +6802,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
employee.getManager();
@@ -6826,7 +6826,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
manager = employee.getManager();
@@ -6836,8 +6836,8 @@
assertTrue("The manager was not persisted.", employee.getManager() != null);
assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro"));
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
- Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId));
+ Address initialAddress = em.find(Address.class, addressId);
+ Employee initialManager = em.find(Employee.class, managerId);
employee.setAddress((Address)null);
employee.setManager(null);
@@ -7281,7 +7281,7 @@
errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage();
}
try {
- em.getReference(Employee.class, Integer.valueOf(1));
+ em.getReference(Employee.class, 1);
errorMsg = errorMsg + "; em.getReference() didn't throw exception";
} catch(IllegalStateException ise) {
// expected
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/AdvancedCriteriaQueryTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/AdvancedCriteriaQueryTestSuite.java
index 9282af3..4dba003 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/AdvancedCriteriaQueryTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/AdvancedCriteriaQueryTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -972,7 +972,7 @@
TypedQuery<Object[]> tquery = em.createQuery(cquery);
List<Object[]> result = tquery.getResultList();
for(Object[] value : result){
- assertTrue("Incorrect responsibilities count", em.find(Employee.class, value[0]).getResponsibilities().size() == ((Integer)value[1]).intValue());
+ assertTrue("Incorrect responsibilities count", em.find(Employee.class, value[0]).getResponsibilities().size() == (Integer) value[1]);
}
// No assert as version is not actually a mapped field in dealer.
} finally {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java
index 206792a..506f200 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java
@@ -471,7 +471,7 @@
//need to cast to erase the type on the get("id") expression so it matches the type on param1
cq.where(qb.or( qb.greaterThan(root.<Integer>get("id" ), param1), param1.isNull()) );
- em.createQuery(cq).setParameter(param1, Integer.valueOf(1)).getResultList();
+ em.createQuery(cq).setParameter(param1, 1).getResultList();
} finally {
rollbackTransaction(em);
closeEntityManager(em);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java
index c59a5bc..2dabecf 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java
@@ -65,16 +65,16 @@
WrapperTypes[] wrapperTypes = new WrapperTypes[4];
wrapperTypes[0] = new WrapperTypes(BigDecimal.ZERO, BigInteger.ZERO, Boolean.FALSE,
Byte.valueOf("0"), 'A', Short.valueOf("0"),
- 0, 0L, Float.valueOf(0.0f), 0.0, "A String");
+ 0, 0L, 0.0f, 0.0, "A String");
wrapperTypes[1] = new WrapperTypes(BigDecimal.ONE, BigInteger.ONE, Boolean.TRUE,
Byte.valueOf("1"), 'B', Short.valueOf("1"),
- 1, 1L, Float.valueOf(1.0f), 1.0, "B String");
+ 1, 1L, 1.0f, 1.0, "B String");
wrapperTypes[2] = new WrapperTypes(new BigDecimal(2), new BigInteger("2"), Boolean.FALSE,
Byte.valueOf("2"), 'C', Short.valueOf("2"),
- 2, 2L, Float.valueOf(2.0f), 2.0, "C String");
+ 2, 2L, 2.0f, 2.0, "C String");
wrapperTypes[3] = new WrapperTypes(new BigDecimal(3), new BigInteger("3"), Boolean.TRUE,
Byte.valueOf("3"), 'D', Short.valueOf("3"),
- 3, 3L, Float.valueOf(3.0f), 3.0, "D String");
+ 3, 3L, 3.0f, 3.0, "D String");
for (WrapperTypes wrapperType: wrapperTypes) {
em.persist(wrapperType);
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java
index 64a27a2..fa0c6fa 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java
@@ -95,7 +95,7 @@
beginTransaction(em);
wt = new WrapperTypes(BigDecimal.ZERO, BigInteger.ZERO, Boolean.FALSE,
Byte.valueOf("0"), 'A', Short.valueOf("0"),
- 0, 0L, Float.valueOf(0.0f), 0.0, "A String");
+ 0, 0L, 0.0f, 0.0, "A String");
em.persist(wt);
wrapperId = wt.getId();
commitTransaction(em);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java
index a368ef4..4e43a8d 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java
@@ -2182,8 +2182,8 @@
mason.addAward(Helper.timestampFromDate(Helper.dateFromYearMonthDate(2009, 1, 1)), "Best pointer");
mason.addAward(Helper.timestampFromDate(Helper.dateFromYearMonthDate(2010, 5, 9)), "Least screw-ups");
- mason.addHoursWorked(Helper.timestampFromDate(Helper.dateFromYearMonthDate(2009, 1, 1)), Integer.valueOf(10));
- mason.addHoursWorked(Helper.timestampFromDate(Helper.dateFromYearMonthDate(2010, 5, 9)), Integer.valueOf(11));
+ mason.addHoursWorked(Helper.timestampFromDate(Helper.dateFromYearMonthDate(2009, 1, 1)), 10);
+ mason.addHoursWorked(Helper.timestampFromDate(Helper.dateFromYearMonthDate(2010, 5, 9)), 11);
mason.addUniSelf(Helper.timestampFromDate(Helper.dateFromYearMonthDate(2010, 5, 9)), mason);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/employee/EmployeeSparseMergeTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/employee/EmployeeSparseMergeTestSuite.java
index d653608..0e9b137 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/employee/EmployeeSparseMergeTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/employee/EmployeeSparseMergeTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -157,7 +157,7 @@
*/
sparseEmployee.set("firstName", "Mike");
sparseEmployee.set("lastName", "Norman");
- sparseEmployee.set("salary",Integer.valueOf(12345));
+ sparseEmployee.set("salary", 12345);
em.getTransaction().begin();
em.merge(sparseEmployee);
em.getTransaction().commit();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java
index a731702..7a18ec5 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeCompositeKeyTestSuite.java
@@ -95,7 +95,7 @@
0, simpleInstance.<Integer>get("id2").intValue());
assertFalse("value1 set on new instance", simpleInstance.isSet("value1"));
assertEquals("value2 not default value on new instance",
- false, simpleInstance.<Boolean>get("value2").booleanValue());
+ false, simpleInstance.<Boolean>get("value2"));
assertFalse("value3 set on new instance", simpleInstance.isSet("value3"));
assertFalse("value4 set on new instance", simpleInstance.isSet("value4"));
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java
index cb5340d..8e652a3 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java
@@ -120,7 +120,7 @@
EntityManager em = emf.createEntityManager();
DynamicEntity simpleInstance = find(em, 1);
assertNotNull("Could not find simple instance with id = 1", simpleInstance);
- simpleInstance = find(em, Integer.valueOf(1));
+ simpleInstance = find(em, 1);
assertNotNull("Could not find simple instance with id = Integer(1)", simpleInstance);
}
@@ -163,7 +163,7 @@
0, simpleInstance.<Integer>get("id").intValue());
assertFalse("value1 set on new instance", simpleInstance.isSet("value1"));
assertEquals("value2 not default value on new instance",
- false, simpleInstance.<Boolean>get("value2").booleanValue());
+ false, simpleInstance.<Boolean>get("value2"));
assertFalse("value3 set on new instance", simpleInstance.isSet("value3"));
assertFalse("value4 set on new instance", simpleInstance.isSet("value4"));
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/CallbackEventJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/CallbackEventJUnitTestSuite.java
index a8174f9..58046b5 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/CallbackEventJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/CallbackEventJUnitTestSuite.java
@@ -256,7 +256,7 @@
protected int getVersion(Employee emp) {
Vector pk = new Vector();
pk.add(emp.getId());
- return ((Integer)getServerSession("fieldaccess").getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(emp, pk, getServerSession("fieldaccess"))).intValue();
+ return (Integer) getServerSession("fieldaccess").getDescriptor(Employee.class).getOptimisticLockingPolicy().getWriteLockValue(emp, pk, getServerSession("fieldaccess"));
}
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java
index 2f4d0fc..06d5c5d 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java
@@ -718,8 +718,8 @@
int lastIndex = firstName.length();
List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)").
setParameter("p1", firstName).
- setParameter("p2", Integer.valueOf(firstIndex)).
- setParameter("p3", Integer.valueOf(lastIndex)).
+ setParameter("p2", firstIndex).
+ setParameter("p3", lastIndex).
getResultList();
// clean up
@@ -2561,12 +2561,12 @@
query.setHint(QueryHints.READ_ONLY, Boolean.FALSE);
assertFalse("Read-only not set.", olrQuery.isReadOnly());
- query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100));
+ query.setHint(QueryHints.JDBC_TIMEOUT, 100);
assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100);
- query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101));
+ query.setHint(QueryHints.JDBC_FETCH_SIZE, 101);
assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101);
- query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103));
+ query.setHint(QueryHints.JDBC_MAX_ROWS, 103);
assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103);
query.setHint(QueryHints.REFRESH_CASCADE, CascadePolicy.NoCascading);
assertTrue(olrQuery.getCascadePolicy()==DatabaseQuery.NoCascading);
@@ -3503,7 +3503,7 @@
em = createEntityManager();
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
@@ -3540,7 +3540,7 @@
int addressId = address.getId();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
address = new Address();
@@ -3560,13 +3560,13 @@
em = createEntityManager();
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis"));
} finally {
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
+ Address initialAddress = em.find(Address.class, addressId);
employee.setAddress(null);
employee.setManager(null);
em.remove(address);
@@ -3621,13 +3621,13 @@
em = createEntityManager();
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis"));
} finally {
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
+ Address initialAddress = em.find(Address.class, addressId);
employee.setAddress(null);
employee.setManager(null);
em.remove(address);
@@ -3663,7 +3663,7 @@
em = createEntityManager();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
address = new Address();
@@ -3683,14 +3683,14 @@
em = createEntityManager();
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis"));
} finally {
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
+ Address initialAddress = em.find(Address.class, addressId);
employee.setAddress(null);
employee.setManager(null);
em.remove(address);
@@ -3955,7 +3955,7 @@
if(emp.getAddress() != null) {
error = " Employee "+emp.getLastName()+" still has address;";
}
- int ind = Integer.valueOf(emp.getLastName()).intValue();
+ int ind = Integer.parseInt(emp.getLastName());
if(emp.getSalary() != ind) {
error = " Employee "+emp.getLastName()+" has wrong salary "+emp.getSalary()+";";
}
@@ -4415,7 +4415,7 @@
errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage();
}
try {
- em.getReference(Employee.class, Integer.valueOf(1));
+ em.getReference(Employee.class, 1);
errorMsg = errorMsg + "; em.getReference() didn't throw exception";
} catch(IllegalStateException ise) {
// expected
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java
index b48fb20..2085d10 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java
@@ -600,8 +600,8 @@
int lastIndex = firstName.length();
List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)").
setParameter("p1", firstName).
- setParameter("p2", Integer.valueOf(firstIndex)).
- setParameter("p3", Integer.valueOf(lastIndex)).
+ setParameter("p2", firstIndex).
+ setParameter("p3", lastIndex).
getResultList();
// clean up
@@ -2423,12 +2423,12 @@
query.setHint(QueryHints.READ_ONLY, Boolean.FALSE);
assertFalse("Read-only not set.", olrQuery.isReadOnly());
- query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100));
+ query.setHint(QueryHints.JDBC_TIMEOUT, 100);
assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100);
- query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101));
+ query.setHint(QueryHints.JDBC_FETCH_SIZE, 101);
assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101);
- query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103));
+ query.setHint(QueryHints.JDBC_MAX_ROWS, 103);
assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103);
query.setHint(QueryHints.REFRESH_CASCADE, CascadePolicy.NoCascading);
assertTrue(olrQuery.getCascadePolicy()==DatabaseQuery.NoCascading);
@@ -3357,7 +3357,7 @@
em = createEntityManager("fieldaccess");
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
@@ -3394,7 +3394,7 @@
int addressId = address.getId();
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
address = new Address();
@@ -3414,13 +3414,13 @@
em = createEntityManager("fieldaccess");
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis"));
} finally {
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
+ Address initialAddress = em.find(Address.class, addressId);
employee.setAddress(null);
employee.setManager(null);
em.remove(address);
@@ -3475,13 +3475,13 @@
em = createEntityManager("fieldaccess");
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis"));
} finally {
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
+ Address initialAddress = em.find(Address.class, addressId);
employee.setAddress(null);
employee.setManager(null);
em.remove(address);
@@ -3517,7 +3517,7 @@
em = createEntityManager("fieldaccess");
beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
employee.getAddress();
address = new Address();
@@ -3537,14 +3537,14 @@
em = createEntityManager("fieldaccess");
beginTransaction(em);
try {
- employee = em.find(Employee.class, Integer.valueOf(id));
+ employee = em.find(Employee.class, id);
address = employee.getAddress();
assertTrue("The address was not persisted.", employee.getAddress() != null);
assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis"));
} finally {
- Address initialAddress = em.find(Address.class, Integer.valueOf(addressId));
+ Address initialAddress = em.find(Address.class, addressId);
employee.setAddress(null);
employee.setManager(null);
em.remove(address);
@@ -3756,7 +3756,7 @@
if(emp.getAddress() != null) {
error = " Employee "+emp.getLastName()+" still has address;";
}
- int ind = Integer.valueOf(emp.getLastName()).intValue();
+ int ind = Integer.parseInt(emp.getLastName());
if(emp.getSalary() != ind) {
error = " Employee "+emp.getLastName()+" has wrong salary "+emp.getSalary()+";";
}
@@ -4215,7 +4215,7 @@
errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage();
}
try {
- em.getReference(Employee.class, Integer.valueOf(1));
+ em.getReference(Employee.class, 1);
errorMsg = errorMsg + "; em.getReference() didn't throw exception";
} catch(IllegalStateException ise) {
// expected
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/ReportQueryConstructorExpressionTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/ReportQueryConstructorExpressionTestSuite.java
index 779a13c..32aedc7 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/ReportQueryConstructorExpressionTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/ReportQueryConstructorExpressionTestSuite.java
@@ -230,7 +230,7 @@
while (i.hasNext()){
DataHolder holder = (DataHolder)((ReportQueryResult)i.next()).get(DataHolder.class.getName());
ReportQueryResult result = (ReportQueryResult)report.next();
- assertTrue("Incorrect salary ", ((Integer)result.get("salary")).intValue() == holder.getPrimitiveInt());
+ assertTrue("Incorrect salary ", (Integer) result.get("salary") == holder.getPrimitiveInt());
}
assertTrue("Different result sizes", !(report.hasNext()));
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java
index b3b5ad6..8aa9668 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java
@@ -199,7 +199,7 @@
query.addArgument("1");
Vector params = new Vector();
//4000 is a more reasonable budget given test data if results are expected
- params.add(Integer.valueOf(4000));
+ params.add(4000);
List results = (List)getServerSession("fieldaccess").executeQuery(query, params);
assertNotNull("No result returned", results);
assertTrue("Empty list returned", (results.size()!=0));
@@ -218,7 +218,7 @@
query.setShouldBindAllParameters(true);
query.addArgument("1");
Vector params = new Vector();
- params.add(Integer.valueOf(4000));
+ params.add(4000);
List results = (List)getServerSession("fieldaccess").executeQuery(query, params);
assertNotNull("No result returned", results);
assertTrue("Empty list returned", (results.size()!=0));
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java
index b598e6d..f2b1f10 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java
@@ -211,7 +211,7 @@
returnedCustomers1 = query1.getResultCollection();
EJBQueryImpl query2 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1);
- query2.setParameter("id", Integer.valueOf(-10));
+ query2.setParameter("id", -10);
returnedCustomers2 = query2.getResultCollection();
// bug:4297903, check container policy failure
@@ -233,7 +233,7 @@
entityManagerImpl = (EntityManagerImpl) em.getDelegate();
// bug:4300879, check ReadObjectQuery fails
EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1);
- query4.setParameter("id", Integer.valueOf(-10));
+ query4.setParameter("id", -10);
ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class);
readObjectQuery2.setEJBQLString(ejbql1);
query4.setDatabaseQuery(readObjectQuery2);
@@ -293,7 +293,7 @@
returnedCustomers1 = query1.getResultList();
Query query2 = em.createQuery(ejbql1);
- query2.setParameter("id", Integer.valueOf(-10));
+ query2.setParameter("id", -10);
returnedCustomers2 = query2.getResultList();
// bug:4297903, check container policy failure
@@ -315,7 +315,7 @@
entityManagerImpl = (EntityManagerImpl) em.getDelegate();
// bug:4300879, check ReadObjectQuery fails
EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1);
- query4.setParameter("id", Integer.valueOf(-10));
+ query4.setParameter("id", -10);
ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class);
readObjectQuery2.setEJBQLString(ejbql1);
query4.setDatabaseQuery(readObjectQuery2);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java
index 245ecb5..eb3f528 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java
@@ -157,8 +157,8 @@
try {
Bus bus = new Bus();
- bus.setPassengerCapacity(Integer.valueOf(50));
- bus.setFuelCapacity(Integer.valueOf(175));
+ bus.setPassengerCapacity(50);
+ bus.setFuelCapacity(175);
bus.setDescription("OC Transpo Bus");
bus.setFuelType("Diesel");
em.persist(bus);
@@ -203,8 +203,8 @@
try {
SportsCar sportsCar = new SportsCar();
- sportsCar.setPassengerCapacity(Integer.valueOf(4));
- sportsCar.setFuelCapacity(Integer.valueOf(55));
+ sportsCar.setPassengerCapacity(4);
+ sportsCar.setFuelCapacity(55);
sportsCar.setDescription("Porshe");
sportsCar.setFuelType("Gas");
em.persist(sportsCar);
@@ -238,8 +238,8 @@
try {
Bus bus = new Bus();
- bus.setPassengerCapacity(Integer.valueOf(30));
- bus.setFuelCapacity(Integer.valueOf(100));
+ bus.setPassengerCapacity(30);
+ bus.setFuelCapacity(100);
bus.setDescription("School Bus");
bus.setFuelType("Diesel");
em.persist(bus);
@@ -281,8 +281,8 @@
try {
SportsCar sportsCar = new SportsCar();
- sportsCar.setPassengerCapacity(Integer.valueOf(2));
- sportsCar.setFuelCapacity(Integer.valueOf(60));
+ sportsCar.setPassengerCapacity(2);
+ sportsCar.setFuelCapacity(60);
sportsCar.setDescription("Corvette");
sportsCar.setFuelType("Gas");
em.persist(sportsCar);
@@ -314,8 +314,8 @@
try {
SportsCar sportsCar = new SportsCar();
- sportsCar.setPassengerCapacity(Integer.valueOf(2));
- sportsCar.setFuelCapacity(Integer.valueOf(90));
+ sportsCar.setPassengerCapacity(2);
+ sportsCar.setFuelCapacity(90);
sportsCar.setDescription("Viper");
sportsCar.setFuelType("Gas");
em.persist(sportsCar);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java
index d649ade..a22fc11 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java
@@ -149,7 +149,7 @@
MudTireInfo mudTire = new MudTireInfo();
mudTire.setName("Goodyear Mud Tracks");
mudTire.setCode("MT-674-A4");
- mudTire.setPressure(Integer.valueOf(100));
+ mudTire.setPressure(100);
mudTire.setTreadDepth(3);
TireRating tireRating = new TireRating();
@@ -181,7 +181,7 @@
RockTireInfo rockTire = new RockTireInfo();
rockTire.setName("Goodyear Mud Tracks");
rockTire.setCode("AE-678");
- rockTire.setPressure(Integer.valueOf(100));
+ rockTire.setPressure(100);
rockTire.setGrip(RockTireInfo.Grip.SUPER);
try {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java
index 8cd7729..d98ffb2 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java
@@ -50,8 +50,8 @@
Bus bus = new Bus();
bus.setBusDriver(busDriver);
- bus.setFuelCapacity(Integer.valueOf(275));
- bus.setPassengerCapacity(Integer.valueOf(100));
+ bus.setFuelCapacity(275);
+ bus.setPassengerCapacity(100);
beginTransaction();
getEntityManager().persist(bus);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java
index 17ad391..b8d4b7a 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java
@@ -119,7 +119,7 @@
assassin.getNicknames().add("Clyde");
Gun gun = new Gun();
- gun.setCaliber(Integer.valueOf(50));
+ gun.setCaliber(50);
gun.setDescription("Sniper rifle");
gun.setModel("9-112");
@@ -638,8 +638,8 @@
Gun gun1 = em1.find(Gun.class, gunSerialNumber);
Gun gun2 = em2.find(Gun.class, gunSerialNumber);
- gun1.setCaliber(Integer.valueOf(12));
- gun2.setCaliber(Integer.valueOf(22));
+ gun1.setCaliber(12);
+ gun2.setCaliber(22);
em1.getTransaction().commit();
em2.getTransaction().commit();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java
index 5ae1d38..3d40f2d 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java
@@ -338,7 +338,7 @@
try {
Blue blue = new Blue();
- blue.setAlcoholContent(Float.valueOf(5.3f));
+ blue.setAlcoholContent(5.3f);
em.persist(blue);
m_blueId = blue.getId();
blue.setUniqueKey(m_blueId.toBigInteger());
@@ -1110,7 +1110,7 @@
consumer.setName("Keith Alexander");
BlueLight blueLight = new BlueLight();
- blueLight.setAlcoholContent(Float.valueOf(4.0f));
+ blueLight.setAlcoholContent(4.0f);
blueLight.setUniqueKey(new BigInteger((Long.valueOf(System.currentTimeMillis()).toString())));
em.persist(blueLight);
consumer.addBlueLightBeerToConsume(blueLight);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java
index d505bbf..fc08d0e 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java
@@ -1345,7 +1345,7 @@
commitTransaction(em);
employee = em.find(Employee.class, employee.getId());
- assertTrue("The version was not updated on the pessimistic lock.", version1.intValue() < employee.getVersion().intValue());
+ assertTrue("The version was not updated on the pessimistic lock.", version1 < employee.getVersion());
} catch (RuntimeException ex) {
if (isTransactionActive(em)) {
rollbackTransaction(em);
@@ -1767,7 +1767,7 @@
commitTransaction(em);
employee = em.find(Employee.class, employee.getId());
- assertTrue("The version was not updated on the pessimistic read lock.", version1.intValue() < employee.getVersion().intValue());
+ assertTrue("The version was not updated on the pessimistic read lock.", version1 < employee.getVersion());
} catch (RuntimeException ex) {
if (isTransactionActive(em)) {
rollbackTransaction(em);
@@ -1840,7 +1840,7 @@
commitTransaction(em);
employee = em.find(Employee.class, employee.getId());
- assertTrue("The version was not updated on the pessimistic write lock.", version1.intValue() < employee.getVersion().intValue());
+ assertTrue("The version was not updated on the pessimistic write lock.", version1 < employee.getVersion());
} catch (RuntimeException ex) {
if (isTransactionActive(em)) {
rollbackTransaction(em);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexAggregateTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexAggregateTestSuite.java
index af78b44..2325516 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexAggregateTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexAggregateTestSuite.java
@@ -529,7 +529,7 @@
EntityManager em = createEntityManager();
beginTransaction(em);
- Long expectedResult = Long.valueOf(getServerSession().readAllObjects(Employee.class).size());
+ Long expectedResult = (long) getServerSession().readAllObjects(Employee.class).size();
String jpql = "SELECT COUNT(DISTINCT e) FROM Employee e";
Query q = em.createQuery(jpql);
@@ -550,8 +550,8 @@
// Need to create the expected result manually, because using the
// TopLink query API would run into the same issue 2497.
- List expectedResult = Arrays.asList(new Long[] { Long.valueOf(1), Long.valueOf(0),
- Long.valueOf(0), Long.valueOf(1) });
+ List expectedResult = Arrays.asList(new Long[] {1L, 0L,
+ 0L, 1L});
Collections.sort(expectedResult);
String jpql = "SELECT COUNT(o) FROM Customer c LEFT JOIN c.orders o GROUP BY c.name";
@@ -578,7 +578,7 @@
// Need to create the expected result manually, because using the
// TopLink query API would run into the same issue 2497.
- List expectedResult = Arrays.asList(new Long[] { Long.valueOf(2), Long.valueOf(5), Long.valueOf(3) });
+ List expectedResult = Arrays.asList(new Long[] {2L, 5L, 3L});
Collections.sort(expectedResult);
String jpql = "SELECT COUNT(p) FROM Employee e LEFT JOIN e.phoneNumbers p WHERE e.lastName LIKE 'S%' GROUP BY e.lastName";
@@ -619,7 +619,7 @@
// Need to create the expected result manually, because using the
// TopLink query API would run into the same issue 6155093.
- List expectedResult = Arrays.asList(new Long[] { Long.valueOf(1) });
+ List expectedResult = Arrays.asList(new Long[] {1L});
Collections.sort(expectedResult);
// COUNT DISTINCT with inner join
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java
index 87c4687..f2dad78 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java
@@ -785,8 +785,8 @@
Employee emp1 = (Employee) expectedResult.elementAt(0);
Employee emp2 = (Employee) expectedResult.elementAt(1);
- double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue()));
- double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue()));
+ double salarySquareRoot1 = Math.sqrt(((double) emp1.getSalary()));
+ double salarySquareRoot2 = Math.sqrt(((double) emp2.getSalary()));
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
ejbqlString = ejbqlString + salarySquareRoot1;
@@ -824,8 +824,8 @@
Employee emp1 = (Employee) expectedResult.elementAt(0);
Employee emp2 = (Employee) expectedResult.elementAt(1);
- double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue()));
- double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue()));
+ double salarySquareRoot1 = Math.sqrt(((double) emp1.getSalary()));
+ double salarySquareRoot2 = Math.sqrt(((double) emp2.getSalary()));
String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE ";
ejbqlString = ejbqlString + "(SQRT(emp.salary) = ";
@@ -1387,7 +1387,7 @@
sum += e.getSalary();
}
}
- LongHolder expectedResult = new LongHolder(Long.valueOf(sum), Long.valueOf(count));
+ LongHolder expectedResult = new LongHolder((long) sum, (long) count);
Assert.assertTrue("Constructor with aggregates argument Test Case Failed", result.equals(expectedResult));
}
@@ -2722,8 +2722,8 @@
em.persist(consumer);
em.flush();
List expectedResult = new ArrayList();
- expectedResult.add(Integer.valueOf(0));
- expectedResult.add(Integer.valueOf(1));
+ expectedResult.add(0);
+ expectedResult.add(1);
clearCache();
String ejbqlString = "select index(d) from EXPERT_CONSUMER e join e.designations d";
@@ -2919,7 +2919,7 @@
List result = em.createQuery(ejbqlString).getResultList();
- assertTrue("The wrong absolute value was returned.", ((Integer)result.get(0)).intValue() == 35000);
+ assertTrue("The wrong absolute value was returned.", (Integer) result.get(0) == 35000);
}
public void modInSelectTest(){
@@ -2929,7 +2929,7 @@
List result = em.createQuery(ejbqlString).getResultList();
- assertTrue("The wrong mod value was returned.", ((Integer)result.get(0)).intValue() == 0);
+ assertTrue("The wrong mod value was returned.", (Integer) result.get(0) == 0);
}
public void sqrtInSelectTest(){
@@ -2944,8 +2944,8 @@
List result = em.createQuery(ejbqlString).getResultList();
- assertTrue("The wrong square root value was returned.", ((Double)result.get(0)).doubleValue() > 187);
- assertTrue("The wrong square root value was returned.", ((Double)result.get(0)).doubleValue() < 188);
+ assertTrue("The wrong square root value was returned.", (Double) result.get(0) > 187);
+ assertTrue("The wrong square root value was returned.", (Double) result.get(0) < 188);
}
public void sizeInSelectTest(){
@@ -2955,7 +2955,7 @@
List result = em.createQuery(ejbqlString).getResultList();
- assertTrue("The wrong absolute value was returned.", ((Integer)result.get(0)).intValue() == 2);
+ assertTrue("The wrong absolute value was returned.", (Integer) result.get(0) == 2);
}
public void mathInSelectTest(){
@@ -2965,7 +2965,7 @@
List result = em.createQuery(ejbqlString).getResultList();
- assertTrue("The wrong value was returned.", ((Integer)result.get(0)).intValue() == 35100);
+ assertTrue("The wrong value was returned.", (Integer) result.get(0) == 35100);
}
public void paramNoVariableTest(){
@@ -4408,7 +4408,7 @@
EntityManager em = createEntityManager();
Employee emp = (Employee)em.createQuery("select e from Employee e where e.firstName = 'John' and e.lastName = 'Way'").getSingleResult();
Long result = (Long)em.createQuery("select count(pn) from Employee e join e.phoneQK pn where e.id = :id").setParameter("id", emp.getId()).getSingleResult();
- assertTrue("Incorrect number of results returned", result.equals(Long.valueOf(2)));
+ assertTrue("Incorrect number of results returned", result.equals(2L));
}
// Bug 306766
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java
index cae463b..60197f6 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java
@@ -449,7 +449,7 @@
subQuery.setReferenceClass(Employee.class);
Expression managerExpression = employeeBuilder.get("manager").get("id").equal(managerBuilder.get("id"));
- subQuery.addAttribute("one", new ConstantExpression(Integer.valueOf(1), subQuery.getExpressionBuilder()));
+ subQuery.addAttribute("one", new ConstantExpression(1, subQuery.getExpressionBuilder()));
subQuery.setSelectionCriteria(managerExpression);
Expression employeeExpression = employeeBuilder.exists(subQuery);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java
index 3a77ee3..7f11462 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java
@@ -1015,10 +1015,10 @@
// \ is always treated as escape in MySQL. Therefore ESCAPE '\' is considered a syntax error
if (getServerSession().getPlatform().isMySQL()) {
patternString = "234 RUBY $_Way";
- escChar = Character.valueOf('$');
+ escChar = '$';
} else {
patternString = "234 RUBY \\_Way";
- escChar = Character.valueOf('\\');
+ escChar = '\\';
}
List result = em.createQuery(ejbqlString).setParameter("pattern", patternString).setParameter("esc", escChar).getResultList();
@@ -1370,7 +1370,7 @@
Vector expectedResult = (Vector)getServerSession().executeQuery(raq);
- double salarySquareRoot = Math.sqrt((Double.valueOf(((Employee)expectedResult.firstElement()).getSalary()).doubleValue()));
+ double salarySquareRoot = Math.sqrt(((double) ((Employee) expectedResult.firstElement()).getSalary()));
clearCache();
@@ -1423,7 +1423,7 @@
Vector expectedResult = (Vector)getServerSession().executeQuery(raq);
- double salarySquareRoot = Math.sqrt((Double.valueOf(((Employee)expectedResult.firstElement()).getSalary()).doubleValue()));
+ double salarySquareRoot = Math.sqrt(((double) ((Employee) expectedResult.firstElement()).getSalary()));
clearCache();
@@ -1589,11 +1589,11 @@
serverSession.login();
UnitOfWork unitOfWork = serverSession.acquireUnitOfWork();
Employee newEmployee = new Employee();
- newEmployee.setId(Integer.valueOf(9000));
+ newEmployee.setId(9000);
unitOfWork.registerObject(newEmployee);
Vector testV = new Vector();
- testV.addElement(Integer.valueOf(9000));
+ testV.addElement(9000);
Employee result = (Employee)unitOfWork.executeQuery(readObjectQuery, testV);
@@ -2150,7 +2150,7 @@
try {
jakarta.persistence.Query query = em.createNamedQuery("findEmployeeByPK");
query.setParameter("id", emp1.getId());
- query.setHint("lockMode", Short.valueOf((short)1));
+ query.setHint("lockMode", (short) 1);
emp2 = (Employee)query.getSingleResult();
} catch (Exception e) {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java
index aa09e7a..d841307 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java
@@ -374,7 +374,7 @@
try {
String ejbqlString = "SELECT emp FROM Employee emp WHERE emp.id > :param1 OR :param1 IS null";
- createEntityManager().createQuery(ejbqlString).setParameter("param1", Integer.valueOf(1)).getResultList();
+ createEntityManager().createQuery(ejbqlString).setParameter("param1", 1).getResultList();
} catch (Exception e) {
exception = e;
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java
index 87084ff..d865d27 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java
@@ -647,7 +647,7 @@
Query query = em.createQuery("Select e from Employee e where e.firstName = :fname AND e.lastName = :lname ");
try {
query.setParameter("fname", "foo");
- query.setParameter("lname", Integer.valueOf(1));
+ query.setParameter("lname", 1);
query.getResultList();
} catch (IllegalArgumentException ex) {
assertTrue("Failed to throw expected IllegalArgumentException, when parameter with incorrect type is used", ex.getMessage().contains("attempted to set a value of type"));
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java
index 3be6cd9..6fe3ef1 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java
@@ -318,7 +318,7 @@
manager.close();
}
manager = createEntityManager();
- address = manager.find(Address.class, Long.valueOf(address.getId()));
+ address = manager.find(Address.class, address.getId());
if (address.getStreet().equals("Hastings")) {
throwError("Change tracking detected the change (not used?).");
} else {
@@ -347,7 +347,7 @@
manager.close();
}
manager = createEntityManager();
- address = manager.find(Address.class, Long.valueOf(address.getId()));
+ address = manager.find(Address.class, address.getId());
if (address.getStreet().equals("Hastings")) {
throwError("Change tracking detected the change (not used?).");
} else {
@@ -378,7 +378,7 @@
manager.close();
}
manager = createEntityManager();
- employee = manager.getReference(Employee.class, Long.valueOf(employee.getId()));
+ employee = manager.getReference(Employee.class, employee.getId());
if (employee.getLastName().equals("Hastings")) {
throwError("Change tracking detected the change (not used?).");
} else {
@@ -408,7 +408,7 @@
manager.close();
}
manager = createEntityManager();
- employee = manager.getReference(Employee.class, Long.valueOf(employee.getId()));
+ employee = manager.getReference(Employee.class, employee.getId());
manager.refresh(employee);
if (employee.getPeriod().getStartDate().getDate() == 7) {
throwError("Change tracking detected the change (not used?).");
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java
index c63b352..3522c4e 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java
@@ -46,7 +46,7 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId));
+ Employee employee = manager.getReference(Employee.class, this.employeeId);
employee.getAddress().toString();
String.valueOf(employee.getManager());
employee.getManagedEmployees().size();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java
index af268c7..58c2862 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java
@@ -37,9 +37,9 @@
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
Query query = manager.createQuery("Select e from Employee e join fetch e.address left join fetch e.phoneNumbers");
- query.setHint("org.hibernate.readOnly", Boolean.valueOf(isReadOnly()));
- query.setHint("eclipselink.read-only", Boolean.valueOf(isReadOnly()));
- query.setHint("toplink.return-shared", Boolean.valueOf(isReadOnly()));
+ query.setHint("org.hibernate.readOnly", isReadOnly());
+ query.setHint("eclipselink.read-only", isReadOnly());
+ query.setHint("toplink.return-shared", isReadOnly());
List result = query.getResultList();
for (Iterator iterator = result.iterator(); iterator.hasNext();) {
Employee employee = (Employee)iterator.next();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java
index c3f5eee..bbe26a8 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java
@@ -37,9 +37,9 @@
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
Query query = manager.createQuery("Select e from Employee e");
- query.setHint("org.hibernate.readOnly", Boolean.valueOf(isReadOnly()));
- query.setHint("eclipselink.read-only", Boolean.valueOf(isReadOnly()));
- query.setHint("toplink.return-shared", Boolean.valueOf(isReadOnly()));
+ query.setHint("org.hibernate.readOnly", isReadOnly());
+ query.setHint("eclipselink.read-only", isReadOnly());
+ query.setHint("toplink.return-shared", isReadOnly());
List result = query.getResultList();
for (Iterator iterator = result.iterator(); iterator.hasNext();) {
Employee employee = (Employee)iterator.next();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java
index 7bfb84a..c14b884 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java
@@ -52,7 +52,7 @@
Query query = manager.createQuery("Select a from Address a where a.id = :id");
query.setHint(QueryHints.QUERY_TYPE, QueryType.ReadObject);
query.setHint(QueryHints.CACHE_USAGE, CacheUsage.CheckCacheByExactPrimaryKey);
- query.setParameter("id", Long.valueOf(this.addressId));
+ query.setParameter("id", this.addressId);
Address address = (Address)query.getSingleResult();
address.toString();
manager.getTransaction().commit();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java
index 8003a8e..e6587c9 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java
@@ -46,7 +46,7 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId));
+ Employee employee = manager.getReference(Employee.class, this.employeeId);
employee.getAddress().toString();
String.valueOf(employee.getManager());
employee.getManagedEmployees().size();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java
index fb681c4..454615b 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java
@@ -46,7 +46,7 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId));
+ Employee employee = manager.getReference(Employee.class, this.employeeId);
employee.toString();
manager.getTransaction().commit();
manager.close();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java
index db9afa1..47cb0b5 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java
@@ -46,7 +46,7 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Address address = manager.getReference(Address.class, Long.valueOf(this.addressId));
+ Address address = manager.getReference(Address.class, this.addressId);
address.getId();
manager.getTransaction().commit();
manager.close();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java
index 7b88c9d..1f296c0 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java
@@ -49,7 +49,7 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Employee employee = manager.find(Employee.class, Long.valueOf(originalEmployee.getId()));
+ Employee employee = manager.find(Employee.class, originalEmployee.getId());
count++;
employee.setFirstName(originalEmployee.getFirstName() + count);
employee.setLastName(originalEmployee.getLastName() + count);
@@ -102,7 +102,7 @@
manager.getTransaction().commit();
} catch (Exception exception) {
// Cache can get stale from TopLink run, so force refresh.
- employee = manager.getReference(Employee.class, Long.valueOf(originalEmployee.getId()));
+ employee = manager.getReference(Employee.class, originalEmployee.getId());
manager.refresh(employee);
employee.getPhoneNumbers();
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java
index 432e558..efd9782 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java
@@ -41,7 +41,7 @@
Employee any = (Employee)manager.createQuery("Select e from Employee e").getResultList().get(0);
// Create a query to avoid a cache hit to load emulated data.
Query query = manager.createQuery("Select e from Employee e where e.id = :id");
- query.setParameter("id", Long.valueOf(any.getId()));
+ query.setParameter("id", any.getId());
any = (Employee)query.getSingleResult();
manager.close();
manager = createEntityManager();
@@ -84,7 +84,7 @@
manager = createEntityManager();
manager.getTransaction().begin();
- employee = manager.getReference(Employee.class, Long.valueOf(employee.getId()));
+ employee = manager.getReference(Employee.class, employee.getId());
manager.remove(employee);
manager.getTransaction().commit();
manager.close();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java
index a367612..7705ea3 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java
@@ -51,13 +51,13 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId));
+ Employee employee = manager.getReference(Employee.class, this.employeeId);
count++;
employee.setFirstName(this.firstName + count);
try {
manager.getTransaction().commit();
} catch (Exception exception) {
- employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId));
+ employee = manager.getReference(Employee.class, this.employeeId);
manager.refresh(employee);
}
manager.close();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java
index e1d4e98..c81c6f6 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java
@@ -50,7 +50,7 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Employee employee = manager.find(Employee.class, Long.valueOf(originalEmployee.getId()));
+ Employee employee = manager.find(Employee.class, originalEmployee.getId());
count++;
employee.setFirstName(originalEmployee.getFirstName() + count);
employee.setLastName(originalEmployee.getLastName() + count);
@@ -79,7 +79,7 @@
manager.getTransaction().commit();
} catch (Exception exception) {
// Cache can get stale from TopLink run, so force refresh.
- employee = manager.getReference(Employee.class, Long.valueOf(originalEmployee.getId()));
+ employee = manager.getReference(Employee.class, originalEmployee.getId());
manager.refresh(employee);
employee.getPhoneNumbers();
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java
index e835263..5bdf9c2 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java
@@ -36,7 +36,7 @@
Address any = (Address)manager.createQuery("Select a from Address a").getResultList().get(0);
// Create a query to avoid a cache hit to load emulated data.
Query query = manager.createQuery("Select a from Address a where a.id = :id");
- query.setParameter("id", Long.valueOf(any.getId()));
+ query.setParameter("id", any.getId());
any = (Address)query.getSingleResult();
manager.close();
manager = createEntityManager();
@@ -62,7 +62,7 @@
manager = createEntityManager();
manager.getTransaction().begin();
- address = manager.getReference(Address.class, Long.valueOf(address.getId()));
+ address = manager.getReference(Address.class, address.getId());
manager.remove(address);
manager.getTransaction().commit();
manager.close();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java
index b42f019..460a278 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java
@@ -37,7 +37,7 @@
Employee any = (Employee)manager.createQuery("Select e from Employee e").getResultList().get(0);
// Create a query to avoid a cache hit to load emulated data.
Query query = manager.createQuery("Select e from Employee e where e.id = :id");
- query.setParameter("id", Long.valueOf(any.getId()));
+ query.setParameter("id", any.getId());
any = (Employee)query.getSingleResult();
manager.close();
manager = createEntityManager();
@@ -88,7 +88,7 @@
manager = createEntityManager();
manager.getTransaction().begin();
- employee = manager.getReference(Employee.class, Long.valueOf(employee.getId()));
+ employee = manager.getReference(Employee.class, employee.getId());
manager.remove(employee);
manager.getTransaction().commit();
manager.close();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java
index db2e54d..8fafedf 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java
@@ -51,7 +51,7 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Address address = manager.find(Address.class, Long.valueOf(this.addressId));
+ Address address = manager.find(Address.class, this.addressId);
count++;
address.setStreet(street + count);
manager.getTransaction().commit();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java
index 05a0a3e..aa5abf2 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java
@@ -51,13 +51,13 @@
public void test() throws Exception {
EntityManager manager = createEntityManager();
manager.getTransaction().begin();
- Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId));
+ Employee employee = manager.getReference(Employee.class, this.employeeId);
count++;
employee.setFirstName(this.firstName + count);
try {
manager.getTransaction().commit();
} catch (Exception exception) {
- employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId));
+ employee = manager.getReference(Employee.class, this.employeeId);
manager.refresh(employee);
}
manager.close();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java
index f5e7220..b229949 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java
@@ -33,7 +33,7 @@
import junit.framework.TestSuite;
public class EMQueryJUnitTestSuite extends JUnitTestCase {
- protected Integer nonExistingCustomerId = Integer.valueOf(999999);
+ protected Integer nonExistingCustomerId = 999999;
public EMQueryJUnitTestSuite() {
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java
index d8e1ebc..dd47f44 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java
@@ -473,7 +473,7 @@
returnedCustomers1 = query1.getResultCollection();
EJBQueryImpl query2 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1);
- query2.setParameter("id", Integer.valueOf(-10));
+ query2.setParameter("id", -10);
returnedCustomers2 = query2.getResultCollection();
// bug:4297903, check container policy failure
@@ -495,7 +495,7 @@
entityManagerImpl = (EntityManagerImpl) em.getDelegate();
// bug:4300879, check ReadObjectQuery fails
EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1);
- query4.setParameter("id", Integer.valueOf(-10));
+ query4.setParameter("id", -10);
ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class);
readObjectQuery2.setEJBQLString(ejbql1);
query4.setDatabaseQuery(readObjectQuery2);
@@ -555,7 +555,7 @@
returnedCustomers1 = query1.getResultList();
Query query2 = em.createQuery(ejbql1);
- query2.setParameter("id", Integer.valueOf(-10));
+ query2.setParameter("id", -10);
returnedCustomers2 = query2.getResultList();
// bug:4297903, check container policy failure
@@ -577,7 +577,7 @@
entityManagerImpl = (EntityManagerImpl) em.getDelegate();
// bug:4300879, check ReadObjectQuery fails
EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1);
- query4.setParameter("id", Integer.valueOf(-10));
+ query4.setParameter("id", -10);
ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class);
readObjectQuery2.setEJBQLString(ejbql1);
query4.setDatabaseQuery(readObjectQuery2);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/AdvancedJunitTest.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/AdvancedJunitTest.java
index 8bd10ef..5b43748 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/AdvancedJunitTest.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/AdvancedJunitTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -264,7 +264,7 @@
CacheAuditor interceptor = (CacheAuditor) getServerSession(m_persistenceUnit).getIdentityMapAccessorInstance().getIdentityMap(descriptor);
interceptor.resetAccessCount();
try{
- em.find(Address.class, Integer.valueOf((int) System.currentTimeMillis()));
+ em.find(Address.class, (int) System.currentTimeMillis());
assertTrue("To many calls to cache for missing Entity", interceptor.getAccessCount() == 1);
}finally{
interceptor.resetAccessCount();
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java
index 7132fbf..365a547 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java
@@ -1049,8 +1049,8 @@
int lastIndex = firstName.length();
List employees = em.createQuery("SELECT object(e) FROM XMLEmployee e where e.firstName = substring(:p1, :p2, :p3)").
setParameter("p1", firstName).
- setParameter("p2", Integer.valueOf(firstIndex)).
- setParameter("p3", Integer.valueOf(lastIndex)).
+ setParameter("p2", firstIndex).
+ setParameter("p3", lastIndex).
getResultList();
// clean up
@@ -1299,7 +1299,7 @@
// verify properties set on Employee instance
errorMsg += verifyPropertyValue(descriptor, "entityName", String.class, "XMLEmployee");
- errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, Integer.valueOf(1));
+ errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, 1);
errorMsg += verifyPropertyValue(descriptor, "ToBeOverriddenByXml", Boolean.class, Boolean.TRUE);
errorMsg += verifyPropertyValue(descriptor, "ToBeProcessed", Boolean.class, Boolean.TRUE);
@@ -1311,13 +1311,13 @@
// attribute m_lastName has many properties of different types
DatabaseMapping mapping = descriptor.getMappingForAttributeName("lastName");
errorMsg += verifyPropertyValue(mapping, "BooleanProperty", Boolean.class, Boolean.TRUE);
- errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, Byte.valueOf((byte)1));
- errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, Character.valueOf('A'));
- errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, Double.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, Float.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, Integer.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, Long.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, Short.valueOf((short)1));
+ errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, (byte) 1);
+ errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, 'A');
+ errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, 1.0);
+ errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, 1F);
+ errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, 1);
+ errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, 1L);
+ errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, (short) 1);
errorMsg += verifyPropertyValue(mapping, "BigDecimalProperty", java.math.BigDecimal.class, java.math.BigDecimal.ONE);
errorMsg += verifyPropertyValue(mapping, "BigIntegerProperty", java.math.BigInteger.class, java.math.BigInteger.ONE);
errorMsg += verifyPropertyValue(mapping, "TimeProperty", java.sql.Time.class, Helper.timeFromString("13:59:59"));
@@ -1717,9 +1717,9 @@
pk.add(dealer.getId());
if (isOnServer()) {
- return ((Integer)getServerSession().getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, getServerSession())).intValue();
+ return (Integer) getServerSession().getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, getServerSession());
} else {
- return ((Integer)((EntityManagerImpl)em).getServerSession().getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, ((EntityManagerImpl)em).getServerSession())).intValue();
+ return (Integer) ((EntityManagerImpl) em).getServerSession().getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, ((EntityManagerImpl) em).getServerSession());
}
}
@@ -1845,7 +1845,7 @@
// Cost
Shovel shovel = new Shovel();
- shovel.setMy("cost", Double.valueOf(9.99));
+ shovel.setMy("cost", 9.99);
// Sections
ShovelSections shovelSections = new ShovelSections();
@@ -1906,7 +1906,7 @@
beginTransaction(em);
em.merge(refreshedShovel);
- refreshedShovel.setMy("cost", Double.valueOf(7.99));
+ refreshedShovel.setMy("cost", 7.99);
commitTransaction(em);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsDynamicAdvancedJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsDynamicAdvancedJUnitTestCase.java
index bb9869b..c71ee08 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsDynamicAdvancedJUnitTestCase.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsDynamicAdvancedJUnitTestCase.java
@@ -410,7 +410,7 @@
// Cost
DynamicEntity shovel = helper.newDynamicEntity("DynamicShovel");
- shovel.set("cost", Double.valueOf(9.99));
+ shovel.set("cost", 9.99);
// Sections
DynamicEntity shovelSections = helper.newDynamicEntity("ShovelSections");
@@ -471,7 +471,7 @@
beginTransaction(em);
em.merge(refreshedShovel);
- refreshedShovel.set("cost", Double.valueOf(7.99));
+ refreshedShovel.set("cost", 7.99);
commitTransaction(em);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java
index 4dfc4f8..8f0088b 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java
@@ -1078,8 +1078,8 @@
int lastIndex = firstName.length();
List employees = em.createQuery("SELECT object(e) FROM XMLEmployee e where e.firstName = substring(:p1, :p2, :p3)").
setParameter("p1", firstName).
- setParameter("p2", Integer.valueOf(firstIndex)).
- setParameter("p3", Integer.valueOf(lastIndex)).
+ setParameter("p2", firstIndex).
+ setParameter("p3", lastIndex).
getResultList();
// clean up
@@ -1329,7 +1329,7 @@
// verify properties set on Employee instance
errorMsg += verifyPropertyValue(descriptor, "entityName", String.class, "XMLEmployee");
- errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, Integer.valueOf(1));
+ errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, 1);
errorMsg += verifyPropertyValue(descriptor, "ToBeOverriddenByXml", Boolean.class, Boolean.TRUE);
errorMsg += verifyPropertyValue(descriptor, "ToBeProcessed", Boolean.class, Boolean.TRUE);
@@ -1341,13 +1341,13 @@
// attribute m_lastName has many properties of different types
DatabaseMapping mapping = descriptor.getMappingForAttributeName("lastName");
errorMsg += verifyPropertyValue(mapping, "BooleanProperty", Boolean.class, Boolean.TRUE);
- errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, Byte.valueOf((byte)1));
- errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, Character.valueOf('A'));
- errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, Double.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, Float.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, Integer.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, Long.valueOf(1));
- errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, Short.valueOf((short)1));
+ errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, (byte) 1);
+ errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, 'A');
+ errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, 1.0);
+ errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, 1F);
+ errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, 1);
+ errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, 1L);
+ errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, (short) 1);
errorMsg += verifyPropertyValue(mapping, "BigDecimalProperty", java.math.BigDecimal.class, java.math.BigDecimal.ONE);
errorMsg += verifyPropertyValue(mapping, "BigIntegerProperty", java.math.BigInteger.class, java.math.BigInteger.ONE);
errorMsg += verifyPropertyValue(mapping, "TimeProperty", java.sql.Time.class, Helper.timeFromString("13:59:59"));
@@ -1732,7 +1732,7 @@
pk.add(dealer.getId());
DatabaseSessionImpl session = getDatabaseSession();
- return ((Integer)session.getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, session)).intValue();
+ return (Integer) session.getDescriptor(Dealer.class).getOptimisticLockingPolicy().getWriteLockValue(dealer, pk, session);
}
protected List<Employee> createEmployeesWithUnidirectionalMappings(String lastName) {
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java
index de487ca..8761fe5 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java
@@ -177,8 +177,8 @@
beginTransaction(em);
Bus bus = new Bus();
- bus.setPassengerCapacity(Integer.valueOf(50));
- bus.setFuelCapacity(Integer.valueOf(175));
+ bus.setPassengerCapacity(50);
+ bus.setFuelCapacity(175);
bus.setDescription("OC Transpo Bus");
bus.setFuelType("Diesel");
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java
index 6b9fc30..f0c9f68 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java
@@ -147,7 +147,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
@@ -207,7 +207,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
//This string causes an exception to be thrown from the ResponsibilityConverter.convertToEntityAttribute method
responsibility.setDescription(ResponsibilityConverter.THROW_EXCEPTION_IN_TO_ENTITY_ATTRIBUTE);
@@ -262,7 +262,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
//This string causes an exception to be thrown from the ResponsibilityConverter.convertToDatabaseColumn method
responsibility.setDescription(ResponsibilityConverter.THROW_EXCEPTION_IN_TO_DATABASE_COLUMN);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java
index 85cd964..cd797a0 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java
@@ -171,7 +171,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java
index 2fe57d3..e410b0d 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java
@@ -226,7 +226,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java
index 079323b..93dbd87 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java
@@ -347,7 +347,7 @@
// reason MySql returns a Long here. By position is ok, that is,
// it returns an Integer (as we registered)
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes));
}
@@ -383,7 +383,7 @@
// This test also mixes index and named parameters, so this test my be invalid to begin with.
assertNotNull("The output parameter was null.", outputParamValueFromPosition);
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes));
}
@@ -512,7 +512,7 @@
// reason MySql returns a Long here. By position is ok, that is,
// it returns an Integer (as we registered)
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes));
}
@@ -547,7 +547,7 @@
// This test also mixes index and named parameters, so this test my be invalid to begin with.
assertNotNull("The output parameter was null.", outputParamValueFromPosition);
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes));
}
@@ -676,7 +676,7 @@
assertTrue("Incorrect number of addresses returned", addresses.size() == 1);
Object[] addressContent = (Object[]) addresses.get(0);
assertTrue("Incorrect data content size", addressContent.length == 6);
- assertTrue("Id content incorrect", addressContent[0].equals(Long.valueOf(address1.getId())));
+ assertTrue("Id content incorrect", addressContent[0].equals((long) address1.getId()));
assertTrue("Steet content incorrect", addressContent[1].equals(address1.getStreet()));
assertTrue("City content incorrect", addressContent[2].equals(address1.getCity()));
assertTrue("Country content incorrect", addressContent[3].equals(address1.getCountry()));
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java
index 7c1afef..4989a67 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java
@@ -100,7 +100,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java
index c3b441d..95708d9 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java
@@ -217,7 +217,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java
index 2367d20..5908bd1 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java
@@ -165,7 +165,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java
index 8e236d6..10e69d2 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java
@@ -220,7 +220,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java
index 27ad4c0..872b630 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java
@@ -345,7 +345,7 @@
// reason MySql returns a Long here. By position is ok, that is,
// it returns an Integer (as we registered)
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes));
}
@@ -381,7 +381,7 @@
// This test also mixes index and named parameters, so this test my be invalid to begin with.
assertNotNull("The output parameter was null.", outputParamValueFromPosition);
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes));
}
@@ -509,7 +509,7 @@
// reason MySql returns a Long here. By position is ok, that is,
// it returns an Integer (as we registered)
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes));
}
@@ -544,7 +544,7 @@
// This test also mixes index and named parameters, so this test my be invalid to begin with.
assertNotNull("The output parameter was null.", outputParamValueFromPosition);
if (outputParamValueFromName instanceof Long) {
- assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes)));
+ assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals((long) numberOfEmployes));
} else if (outputParamValueFromName instanceof Integer) {
assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes));
}
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java
index 627ca17..61cb15d 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java
@@ -100,7 +100,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java
index 4a81ebe..86c8397 100644
--- a/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java
+++ b/jpa/eclipselink.jpa.test/src/it/java/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java
@@ -217,7 +217,7 @@
organizer.setRace(race);
Responsibility responsibility = new Responsibility();
- responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis()));
+ responsibility.setUniqueIdentifier(System.currentTimeMillis());
responsibility.setDescription("Raise funds");
race.addOrganizer(organizer, responsibility);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/framework/wdf/SkipBugzillaTestRunner.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/framework/wdf/SkipBugzillaTestRunner.java
index b7fb302..4d1dabd 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/framework/wdf/SkipBugzillaTestRunner.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/framework/wdf/SkipBugzillaTestRunner.java
@@ -47,7 +47,7 @@
@Override
public void run(RunNotifier notifier) {
- if (Boolean.valueOf(System.getProperty("servertest"))) {
+ if (Boolean.parseBoolean(System.getProperty("servertest"))) {
runOnServer(notifier);
} else {
super.run(notifier);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java
index 5699a5e..58307d3 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java
@@ -48,7 +48,7 @@
}
public Cubicle(CubiclePrimaryKeyClass key, String color, Employee emp) {
- this(Integer.valueOf(key.getFloor().intValue()), Integer.valueOf(key.getPlace().intValue()), color, emp);
+ this(key.getFloor(), key.getPlace(), color, emp);
}
public Cubicle(Integer aFloor, Integer aPlace, String aColor, Employee aEmployee) {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Nasty.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Nasty.java
index 8b9b632..9e1c816 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Nasty.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Nasty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -25,7 +25,7 @@
@PrePersist
public void prePersist() {
- setId(Long.valueOf(1000));
+ setId(1000L);
}
public Long getId() {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Timestamp.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Timestamp.java
index 1095385..bc178f3 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Timestamp.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/timestamp/Timestamp.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -35,7 +35,7 @@
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
- id = Long.valueOf(System.currentTimeMillis());
+ id = System.currentTimeMillis();
}
public Long getId() {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java
index 4604845..4fd1343 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java
@@ -264,13 +264,13 @@
primitiveFloat = 1.5f;
primitiveDouble = 2.5;
wrapperBoolean = Boolean.TRUE;
- wrapperByte = Byte.valueOf((byte) 1);
- wrapperCharacter = Character.valueOf('A');
- wrapperShort = Short.valueOf((short) 2);
- wrapperInteger = Integer.valueOf(3);
- wrapperLong = Long.valueOf(4);
- wrapperFloat = Float.valueOf(1.5f);
- wrapperDouble = Double.valueOf(2.5);
+ wrapperByte = (byte) 1;
+ wrapperCharacter = 'A';
+ wrapperShort = (short) 2;
+ wrapperInteger = 3;
+ wrapperLong = 4L;
+ wrapperFloat = 1.5f;
+ wrapperDouble = 2.5;
string2Varchar = "VARCHAR";
string2Clob = "CLOB";
bigDecimal = new BigDecimal("42.42");
@@ -291,26 +291,26 @@
primitiveByteArray2Blob[i] = (byte) i;
}
- wrapperByteArray2Binary = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2), Byte.valueOf((byte) 3),
- Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) };
+ wrapperByteArray2Binary = new Byte[] {(byte) 0, (byte) 1, (byte) 2, (byte) 3,
+ (byte) 4, (byte) 5, (byte) 6, (byte) 7};
wrapperByteArray2Longvarbinary = new Byte[1111];
for (int i = 0; i < wrapperByteArray2Longvarbinary.length; i++) {
- wrapperByteArray2Longvarbinary[i] = Byte.valueOf((byte) i);
+ wrapperByteArray2Longvarbinary[i] = (byte) i;
}
wrapperByteArray2Blob = new Byte[3333];
for (int i = 0; i < wrapperByteArray2Blob.length; i++) {
- wrapperByteArray2Blob[i] = Byte.valueOf((byte) i);
+ wrapperByteArray2Blob[i] = (byte) i;
}
primitiveCharArray2Varchar = new char[] { 'V', 'A', 'R', 'C', 'A', 'R' };
primitiveCharArray2Clob = new char[] { 'C', 'L', 'O', 'B' };
- wrapperCharacterArray2Varchar = new Character[] { Character.valueOf('V'), Character.valueOf('A'), Character.valueOf('R'),
- Character.valueOf('C'), Character.valueOf('H'), Character.valueOf('A'), Character.valueOf('R') };
- wrapperCharacterArray2Clob = new Character[] { Character.valueOf('C'), Character.valueOf('L'), Character.valueOf('O'),
- Character.valueOf('B') };
+ wrapperCharacterArray2Varchar = new Character[] {'V', 'A', 'R',
+ 'C', 'H', 'A', 'R'};
+ wrapperCharacterArray2Clob = new Character[] {'C', 'L', 'O',
+ 'B'};
serializable = new UserDefinedSerializable("REGEN"); // BLOB
setEnumOrdinal(UserDefinedEnum.EMIL);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java
index 776075e..b7d9f2c 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java
@@ -162,13 +162,13 @@
_primitiveFloat = 1.5f;
_primitiveDouble = 2.5;
_wrapperBoolean = Boolean.TRUE;
- _wrapperByte = Byte.valueOf((byte) 1);
- _wrapperCharacter = Character.valueOf('A');
- _wrapperShort = Short.valueOf((short) 2);
- _wrapperInteger = Integer.valueOf(3);
- _wrapperLong = Long.valueOf(4);
- _wrapperFloat = Float.valueOf(1.5f);
- _wrapperDouble = Double.valueOf(2.5);
+ _wrapperByte = (byte) 1;
+ _wrapperCharacter = 'A';
+ _wrapperShort = (short) 2;
+ _wrapperInteger = 3;
+ _wrapperLong = 4L;
+ _wrapperFloat = 1.5f;
+ _wrapperDouble = 2.5;
_string2Varchar = "VARCHAR";
_string2Clob = "CLOB";
_bigDecimal = new BigDecimal("42.42");
@@ -189,26 +189,26 @@
_primitiveByteArray2Blob[i] = (byte) i;
}
- _wrapperByteArray2Binary = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2), Byte.valueOf((byte) 3),
- Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) };
+ _wrapperByteArray2Binary = new Byte[] {(byte) 0, (byte) 1, (byte) 2, (byte) 3,
+ (byte) 4, (byte) 5, (byte) 6, (byte) 7};
_wrapperByteArray2Longvarbinary = new Byte[1111];
for (int i = 0; i < _wrapperByteArray2Longvarbinary.length; i++) {
- _wrapperByteArray2Longvarbinary[i] = Byte.valueOf((byte) i);
+ _wrapperByteArray2Longvarbinary[i] = (byte) i;
}
_wrapperByteArray2Blob = new Byte[3333];
for (int i = 0; i < _wrapperByteArray2Blob.length; i++) {
- _wrapperByteArray2Blob[i] = Byte.valueOf((byte) i);
+ _wrapperByteArray2Blob[i] = (byte) i;
}
_primitiveCharArray2Varchar = new char[] { 'V', 'A', 'R', 'C', 'A', 'R' };
_primitiveCharArray2Clob = new char[] { 'C', 'L', 'O', 'B' };
- _wrapperCharacterArray2Varchar = new Character[] { Character.valueOf('V'), Character.valueOf('A'), Character.valueOf('R'),
- Character.valueOf('C'), Character.valueOf('H'), Character.valueOf('A'), Character.valueOf('R') };
- _wrapperCharacterArray2Clob = new Character[] { Character.valueOf('C'), Character.valueOf('L'), Character.valueOf('O'),
- Character.valueOf('B') };
+ _wrapperCharacterArray2Varchar = new Character[] {'V', 'A', 'R',
+ 'C', 'H', 'A', 'R'};
+ _wrapperCharacterArray2Clob = new Character[] {'C', 'L', 'O',
+ 'B'};
_serializable = new UserDefinedSerializable("REGEN"); // BLOB
_enumOrdinal = UserDefinedEnum.EMIL;
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddedIdAsInnerClass.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddedIdAsInnerClass.java
index 86c4e41..1ac9d86 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddedIdAsInnerClass.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddedIdAsInnerClass.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -45,8 +45,8 @@
assertEquals(query.getResultList().size(), 3);
query = em.createQuery("select t from Trailer t where t.pk.low = ?1 and t.pk.high = ?2");
- query.setParameter(1, Integer.valueOf(new Trailer.PK(1, 2).getLow()));
- query.setParameter(2, Integer.valueOf(new Trailer.PK(1, 2).getHigh()));
+ query.setParameter(1, new Trailer.PK(1, 2).getLow());
+ query.setParameter(2, new Trailer.PK(1, 2).getHigh());
final Trailer result = (Trailer) query.getSingleResult();
Assert.assertEquals("wrong load", trailer12.getLoad(), result.getLoad(), 0.0);
} finally {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java
index 81e9112..8dc6212 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java
@@ -43,14 +43,14 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(EmbeddingFieldAccess.class, Integer.valueOf(0));
+ obj = em.find(EmbeddingFieldAccess.class, 0);
} finally {
closeEntityManager(em);
}
}
private EmbeddingFieldAccess find(EntityManager em, int id) {
- return em.find(EmbeddingFieldAccess.class, Integer.valueOf(id));
+ return em.find(EmbeddingFieldAccess.class, id);
}
private void validateMutable(final int id, MutableValidator validator, String fieldName) {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java
index 88e5d39..c387a05 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java
@@ -44,14 +44,14 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(EmbeddingPropertyAccess.class, Integer.valueOf(0));
+ obj = em.find(EmbeddingPropertyAccess.class, 0);
} finally {
closeEntityManager(em);
}
}
private EmbeddingPropertyAccess find(EntityManager em, int id) {
- return em.find(EmbeddingPropertyAccess.class, Integer.valueOf(id));
+ return em.find(EmbeddingPropertyAccess.class, id);
}
private void validateMutable(final int id, MutableValidator validator, String fieldName) {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java
index f05e6ff..46ad526 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java
@@ -178,7 +178,7 @@
em.persist(existing);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // known object in state managed
+ existing = em.find(CascadingNode.class, existing.getId()); // known object in state managed
em.persist(parent);
CascadingNode child = new CascadingNode(existing.getId(), parent);
child.setParent(null); // to avoid circular cascade
@@ -213,7 +213,7 @@
em.persist(existing);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId()));
+ existing = em.find(CascadingNode.class, existing.getId());
em.remove(existing); // known object in state deleted
em.persist(parent);
CascadingNode child = new CascadingNode(existing.getId(), parent);
@@ -253,7 +253,7 @@
env.beginTransaction(em);
CascadingNode parent = new CascadingNode(32, null);
em.persist(parent);
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
em.remove(child);
parent.addChild(child);
verify(em.contains(parent), "Parent not contained in persistence context after persist");
@@ -310,7 +310,7 @@
env.commitTransaction(em);
em.clear();
env.beginTransaction(em);
- em.find(CascadingNode.class, Integer.valueOf(rootId));
+ em.find(CascadingNode.class, rootId);
env.commitTransaction(em);
} finally {
closeEntityManager(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java
index f7a6b0a..80a8efd 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java
@@ -146,9 +146,8 @@
CascadingNodeDescription grandchildDescription = new CascadingNodeDescription(106, null, "new grandchild");
grandchild.setDescription(grandchildDescription);
child.addChild(grandchild);
- CascadingNode managedChild = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
- CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, Integer.valueOf(
- childDescription.getId()));
+ CascadingNode managedChild = em.find(CascadingNode.class, child.getId());
+ CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, childDescription.getId());
CascadingNode managedGrandchild = new CascadingNode(grandchild.getId(), null);
CascadingNodeDescription managedGrandchildDescription = new CascadingNodeDescription(grandchildDescription.getId(),
null, "new grandchild");
@@ -253,15 +252,12 @@
verifyExistence(em, grandchild);
verifyExistence(em, grandchildDescription);
env.beginTransaction(em);
- CascadingNode managedParent = em.find(CascadingNode.class, Integer.valueOf(parent.getId()));
- CascadingNodeDescription managedParentDescription = em.find(CascadingNodeDescription.class, Integer.valueOf(
- parentDescription.getId()));
- CascadingNode managedChild = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
- CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, Integer.valueOf(
- childDescription.getId()));
- CascadingNode managedGrandchild = em.find(CascadingNode.class, Integer.valueOf(grandchild.getId()));
- CascadingNodeDescription managedGrandchildDescription = em.find(CascadingNodeDescription.class, Integer.valueOf(
- grandchildDescription.getId()));
+ CascadingNode managedParent = em.find(CascadingNode.class, parent.getId());
+ CascadingNodeDescription managedParentDescription = em.find(CascadingNodeDescription.class, parentDescription.getId());
+ CascadingNode managedChild = em.find(CascadingNode.class, child.getId());
+ CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, childDescription.getId());
+ CascadingNode managedGrandchild = em.find(CascadingNode.class, grandchild.getId());
+ CascadingNodeDescription managedGrandchildDescription = em.find(CascadingNodeDescription.class, grandchildDescription.getId());
managedParent.setChildren(null);
em.remove(managedChild);
em.persist(managedGrandchild);
@@ -365,7 +361,7 @@
env.commitTransactionAndClear(em);
verifyExistence(em, managedNode);
env.beginTransaction(em);
- managedNode = em.find(CascadingNode.class, Integer.valueOf(managedNode.getId()));
+ managedNode = em.find(CascadingNode.class, managedNode.getId());
managedNode.addChild(detachedNode);
detachedNode.addChild(managedNode);
CascadingNode mergedNode = em.merge(detachedNode);
@@ -416,7 +412,7 @@
verifyAbsence(em, child);
verifyAbsence(em, childDescription);
env.beginTransaction(em);
- parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId()));
+ parent = em.find(CascadingNode.class, parent.getId());
parent.addChild(child);
// setup complete
CascadingNode mergedNode = em.merge(parent);
@@ -480,7 +476,7 @@
verifyExistence(em, child);
verifyExistence(em, childDescription);
env.beginTransaction(em);
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
em.remove(child);
parent.addChild(child);
verify(!em.contains(parent), "parent not new");
@@ -521,11 +517,11 @@
private void verifyExistence(EntityManager em, Object entity) {
if (entity instanceof CascadingNode) {
CascadingNode node = (CascadingNode) entity;
- CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId()));
+ CascadingNode found = em.find(CascadingNode.class, node.getId());
verify(found != null, "cascading node with id " + node.getId() + " not found");
} else if (entity instanceof CascadingNodeDescription) {
CascadingNodeDescription desc = (CascadingNodeDescription) entity;
- CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId()));
+ CascadingNodeDescription found = em.find(CascadingNodeDescription.class, desc.getId());
verify(found != null, "cascading node description with id " + desc.getId() + " not found");
} else {
throw new IllegalArgumentException("not supported");
@@ -535,11 +531,11 @@
private void verifyAbsence(EntityManager em, Object entity) {
if (entity instanceof CascadingNode) {
CascadingNode node = (CascadingNode) entity;
- CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId()));
+ CascadingNode found = em.find(CascadingNode.class, node.getId());
verify(found == null, "cascading node with id " + node.getId() + " found");
} else if (entity instanceof CascadingNodeDescription) {
CascadingNodeDescription desc = (CascadingNodeDescription) entity;
- CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId()));
+ CascadingNodeDescription found = em.find(CascadingNodeDescription.class, desc.getId());
verify(found == null, "cascading node description with id " + desc.getId() + " found");
} else {
throw new IllegalArgumentException("not supported");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java
index 87ef8a3..7d6cd49 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java
@@ -80,7 +80,7 @@
env.commitTransactionAndClear(em);
// cascade from parent to child
env.beginTransaction(em);
- parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); // parent is now managed
+ parent = em.find(CascadingNode.class, parent.getId()); // parent is now managed
CascadingNode child = new CascadingNode(12, parent);
child.setParent(null); // to avoid circular cascade
em.persist(parent);
@@ -183,7 +183,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // known object in state managed
+ existing = em.find(CascadingNode.class, existing.getId()); // known object in state managed
persistFailed = false;
immediateException = false;
try {
@@ -221,7 +221,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId()));
+ existing = em.find(CascadingNode.class, existing.getId());
em.remove(existing); // known object in state deleted
persistFailed = false;
immediateException = false;
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java
index d2cc11c..2a78476 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java
@@ -60,8 +60,8 @@
em.persist(parent);
verify(em.contains(parent), "parent is not managed");
verify(em.contains(parentDescription), "parentDescription is not managed");
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
- childDescription = em.find(CascadingNodeDescription.class, Integer.valueOf(childDescription.getId()));
+ child = em.find(CascadingNode.class, child.getId());
+ childDescription = em.find(CascadingNodeDescription.class, childDescription.getId());
childDescription.setDescription("updated");
parent.addChild(child);
child.setChildren(null);
@@ -115,11 +115,11 @@
private void verifyExistence(EntityManager em, Object entity) {
if (entity instanceof CascadingNode) {
CascadingNode node = (CascadingNode) entity;
- CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId()));
+ CascadingNode found = em.find(CascadingNode.class, node.getId());
verify(found != null, "cascading node with id " + node.getId() + " not found");
} else if (entity instanceof CascadingNodeDescription) {
CascadingNodeDescription desc = (CascadingNodeDescription) entity;
- CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId()));
+ CascadingNodeDescription found = em.find(CascadingNodeDescription.class, desc.getId());
verify(found != null, "cascading node description with id " + desc.getId() + " not found");
} else {
throw new IllegalArgumentException("not supported");
@@ -129,11 +129,11 @@
private void verifyAbsence(EntityManager em, Object entity) {
if (entity instanceof CascadingNode) {
CascadingNode node = (CascadingNode) entity;
- CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId()));
+ CascadingNode found = em.find(CascadingNode.class, node.getId());
verify(found == null, "cascading node with id " + node.getId() + " found");
} else if (entity instanceof CascadingNodeDescription) {
CascadingNodeDescription desc = (CascadingNodeDescription) entity;
- CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId()));
+ CascadingNodeDescription found = em.find(CascadingNodeDescription.class, desc.getId());
verify(found == null, "cascading node description with id " + desc.getId() + " found");
} else {
throw new IllegalArgumentException("not supported");
@@ -141,7 +141,7 @@
}
private void verifyDescription(EntityManager em, CascadingNodeDescription desc, String expectedDescription) {
- CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId()));
+ CascadingNodeDescription found = em.find(CascadingNodeDescription.class, desc.getId());
verify(found != null, "cascading node description with id " + desc.getId() + " not found");
if (found != null) {
verify(expectedDescription.equals(found.getDescription()), "cascading node " + found.getId()
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java
index 5764a17..46171ac 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java
@@ -63,7 +63,7 @@
em.persist(child);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
CascadingNode parent = new CascadingNode(2, null);
parent.addChild(child);
verify(!em.contains(parent), "Parent not a new entity");
@@ -78,7 +78,7 @@
em.persist(description);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId()));
+ description = em.find(CascadingNodeDescription.class, description.getId());
parent = new CascadingNode(4, null);
parent.setDescription(description);
description.setNode(parent);
@@ -107,7 +107,7 @@
env.beginTransaction(em);
CascadingNode parent = new CascadingNode(102, null);
em.persist(parent);
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
parent.addChild(child);
verify(em.contains(parent), "Parent not managed");
verify(em.contains(child), "Child not managed");
@@ -123,7 +123,7 @@
env.beginTransaction(em);
parent = new CascadingNode(104, null);
em.persist(parent);
- description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId()));
+ description = em.find(CascadingNodeDescription.class, description.getId());
parent.setDescription(description);
description.setNode(parent);
verify(em.contains(parent), "Parent not managed");
@@ -141,8 +141,8 @@
em.persist(child);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId()));
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ parent = em.find(CascadingNode.class, parent.getId());
+ child = em.find(CascadingNode.class, child.getId());
parent.addChild(child);
verify(em.contains(parent), "Parent not managed");
verify(em.contains(child), "Child not managed");
@@ -158,7 +158,7 @@
em.persist(parent);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId()));
+ parent = em.find(CascadingNode.class, parent.getId());
description = parent.getDescription();
verify(em.contains(parent), "Parent not managed");
verify(em.contains(description), "Description not managed");
@@ -185,7 +185,7 @@
em.persist(child);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
parent.addChild(child);
verify(!em.contains(parent), "Parent not detached");
verify(em.contains(child), "Child not managed");
@@ -222,7 +222,7 @@
em.persist(description);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId()));
+ description = em.find(CascadingNodeDescription.class, description.getId());
parent.setDescription(description);
verify(!em.contains(parent), "Parent not detached");
verify(em.contains(description), "Description not managed");
@@ -262,7 +262,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
em.persist(existing); // status FOR_INSERT
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
parent.addChild(child);
verify(!em.contains(parent), "Parent not detached");
verify(em.contains(existing), "Existing not managed");
@@ -302,7 +302,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
em.persist(existing); // status FOR_INSERT
- description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId()));
+ description = em.find(CascadingNodeDescription.class, description.getId());
parent.setDescription(description);
verify(!em.contains(parent), "Parent not detached");
verify(em.contains(existing), "Existing not managed");
@@ -343,8 +343,8 @@
em.persist(child);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // state FOR_UPADTE
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ existing = em.find(CascadingNode.class, existing.getId()); // state FOR_UPADTE
+ child = em.find(CascadingNode.class, child.getId());
parent.addChild(child);
verify(!em.contains(parent), "Parent not detached");
verify(em.contains(existing), "Existing not managed");
@@ -384,8 +384,8 @@
em.persist(description);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // state FOR_UPADTE
- description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId()));
+ existing = em.find(CascadingNode.class, existing.getId()); // state FOR_UPADTE
+ description = em.find(CascadingNodeDescription.class, description.getId());
parent.setDescription(description);
verify(!em.contains(parent), "Parent not detached");
verify(em.contains(existing), "Existing not managed");
@@ -426,9 +426,9 @@
em.persist(child);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId()));
+ existing = em.find(CascadingNode.class, existing.getId());
em.remove(existing); // state FOR_REMOVE
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
parent.addChild(child);
verify(!em.contains(parent), "Parent not detached");
verify(!em.contains(existing), "Existing not removed");
@@ -467,9 +467,9 @@
em.persist(description);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId()));
+ existing = em.find(CascadingNode.class, existing.getId());
em.remove(existing); // state FOR_REMOVE
- description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId()));
+ description = em.find(CascadingNodeDescription.class, description.getId());
parent.setDescription(description);
verify(!em.contains(parent), "Parent not detached");
verify(!em.contains(existing), "Existing not removed");
@@ -518,9 +518,9 @@
em.persist(child);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId()));
+ parent = em.find(CascadingNode.class, parent.getId());
em.remove(parent);
- child = em.find(CascadingNode.class, Integer.valueOf(child.getId()));
+ child = em.find(CascadingNode.class, child.getId());
parent.addChild(child);
verify(!em.contains(parent), "Parent not removed");
verify(em.contains(child), "Child not managed");
@@ -536,9 +536,9 @@
em.persist(description);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId()));
+ parent = em.find(CascadingNode.class, parent.getId());
em.remove(parent);
- description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId()));
+ description = em.find(CascadingNodeDescription.class, description.getId());
parent.setDescription(description);
verify(!em.contains(parent), "Parent not removed");
verify(em.contains(description), "Description not managed");
@@ -567,8 +567,8 @@
verifyExistenceInNodeTable(node1.getId());
verifyExistenceInNodeTable(node2.getId());
env.beginTransaction(em);
- node1 = em.find(CascadingNode.class, Integer.valueOf(node1.getId()));
- node2 = em.find(CascadingNode.class, Integer.valueOf(node2.getId()));
+ node1 = em.find(CascadingNode.class, node1.getId());
+ node2 = em.find(CascadingNode.class, node2.getId());
em.remove(node1);
env.commitTransactionAndClear(em);
verifyAbsenceFromNodeTable(node1.getId());
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java
index 7e616f0..50ae79f 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java
@@ -36,7 +36,7 @@
em.persist(dep1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep1 = em.find(Department.class, Integer.valueOf(dep1.getId()));
+ dep1 = em.find(Department.class, dep1.getId());
em.persist(dep2);
verify(em.contains(dep1), "entity not managed");
verify(em.contains(dep2), "entity not managed");
@@ -45,10 +45,10 @@
verify(!em.contains(dep1), "entity managed");
verify(!em.contains(dep2), "entity managed");
env.commitTransactionAndClear(em);
- Department dep = em.find(Department.class, Integer.valueOf(dep1.getId()));
+ Department dep = em.find(Department.class, dep1.getId());
verify(dep != null, "department with id " + dep1.getId() + " does not exist");
verify("one".equals(dep.getName()), "department has wrong name: " + dep.getName());
- dep = em.find(Department.class, Integer.valueOf(dep2.getId()));
+ dep = em.find(Department.class, dep2.getId());
verify(dep == null, "department with id " + dep2.getId() + " exists");
} finally {
closeEntityManager(em);
@@ -66,7 +66,7 @@
env.beginTransaction(em);
em.persist(dep1);
env.commitTransactionAndClear(em);
- dep1 = em.find(Department.class, Integer.valueOf(dep1.getId()));
+ dep1 = em.find(Department.class, dep1.getId());
if (extended) {
em.persist(dep2);
verify(em.contains(dep1), "entity not managed");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java
index 4cb6fa2..fdb97a0 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java
@@ -101,7 +101,7 @@
em.close();
verify(!em.isOpen(), "EntityManager is not closed");
try {
- em.find(Department.class, Integer.valueOf(1));
+ em.find(Department.class, 1);
flop("operation on a closed entity manager did not throw IllegalStateException");
} catch (IllegalStateException e) {
// $JL-EXC$ expected behavior
@@ -118,7 +118,7 @@
em.close();
verify(!em.isOpen(), "EntityManager is not closed");
try {
- em.getReference(Department.class, Integer.valueOf(1));
+ em.getReference(Department.class, 1);
flop("operation on a closed entity manager did not throw IllegalStateException");
} catch (IllegalStateException e) {
// $JL-EXC$ expected behavior
@@ -373,7 +373,7 @@
em.persist(dep1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep1 = em.find(Department.class, Integer.valueOf(dep1.getId()));
+ dep1 = em.find(Department.class, dep1.getId());
em.persist(dep2);
em.close(); // persistence context should remain active
try {
@@ -436,7 +436,7 @@
// it would be nice to test that the underlying EntityManagerImpl is closed, but how?
em = env.getEntityManager();
verify(!em.contains(dep), "persistence context not empty");
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
verify(dep != null, "Department is null");
} finally {
closeEntityManager(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java
index 290452b..ed556e7 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java
@@ -52,7 +52,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
// 1. managed after find ouside tx
- Object obj = em.find(Department.class, Integer.valueOf(11));
+ Object obj = em.find(Department.class, 11);
if (extended) {
verify(em.contains(obj), "object retrieved by find outside of transaction is not contained");
} else {
@@ -61,7 +61,7 @@
em.clear();
// 2. managed after find inside tx
env.beginTransaction(em);
- obj = em.find(Department.class, Integer.valueOf(11));
+ obj = em.find(Department.class, 11);
verify(em.contains(obj), "object retrieved by find inside transaction is not contained");
env.rollbackTransactionAndClear(em);
verify(!em.contains(obj), "object contained after rollback and clear");
@@ -94,7 +94,7 @@
verify(!em.contains(dep), "object contained after commit");
// 1. remove found object
env.beginTransaction(em);
- Object obj = em.find(Department.class, Integer.valueOf(21));
+ Object obj = em.find(Department.class, 21);
verify(em.contains(obj), "object not contained after find inside tx");
em.remove(obj);
verify(!em.contains(obj), "object contained after remove");
@@ -136,7 +136,7 @@
verify(!em.contains(detachedDep), "detached object contained, another object with same pk is in state MANAGED_NEW");
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // object is now in state MANAGED
+ dep = em.find(Department.class, id); // object is now in state MANAGED
verify(!em.contains(detachedDep), "detached object contained, another object with same pk is in state MANAGED");
em.remove(dep); // object is now in state DELETED
verify(!em.contains(detachedDep), "detached object contained, another object with same pk is in state DELETED");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java
index c864978..8b5dd07 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java
@@ -82,7 +82,7 @@
em.persist(dep1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep1 = em.find(Department.class, Integer.valueOf(dep1.getId()));
+ dep1 = em.find(Department.class, dep1.getId());
em.persist(dep2);
try {
emf.close(); // persistence context should remain active
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java
index d6c4bbb..971983a 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java
@@ -46,7 +46,7 @@
env.commitTransaction(em);
verify(em.contains(dep), "persistence context does not contain entity");
em.clear();
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
verify(dep != null, "entity not found");
} finally {
closeEntityManager(em);
@@ -63,14 +63,14 @@
env.beginTransaction(em);
em.persist(dep);
env.commitTransactionAndClear(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
dep.setName("modified");
env.beginTransaction(em);
verify(em.contains(dep), "persistence context does not contain entity");
env.commitTransaction(em);
verify(em.contains(dep), "persistence context does not contain entity");
em.clear();
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
verify("modified".equals(dep.getName()), "entity not updated");
} finally {
closeEntityManager(em);
@@ -90,7 +90,7 @@
em.remove(dep);
env.beginTransaction(em);
env.commitTransactionAndClear(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
verify(dep == null, "entity not removed");
} finally {
closeEntityManager(em);
@@ -112,7 +112,7 @@
verify("detached".equals(dep.getName()), "entity not merged");
env.beginTransaction(em);
env.commitTransactionAndClear(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
verify("detached".equals(dep.getName()), "entity not merged");
} finally {
closeEntityManager(em);
@@ -134,7 +134,7 @@
verify("test".equals(dep.getName()), "entity not refreshed");
env.beginTransaction(em);
env.commitTransactionAndClear(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
verify("test".equals(dep.getName()), "entity not refreshed");
} finally {
closeEntityManager(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java
index 67aba7e..2624d0c 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java
@@ -31,7 +31,7 @@
private final Department _dep = new Department(1, "eins");
private final Employee _emp = new Employee(7, "first", "last", _dep);
- private final Cubicle _cub = new Cubicle(Integer.valueOf(1), Integer.valueOf(2), "yellow", _emp);
+ private final Cubicle _cub = new Cubicle(1, 2, "yellow", _emp);
@Override
public void setup() {
@@ -57,13 +57,13 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Employee emp = em.find(Employee.class, Integer.valueOf(7));
+ Employee emp = em.find(Employee.class, 7);
verify(em.contains(emp), "Object not loaded");
verify(emp.getId() == 7, "wrong id");
verify(emp.getDepartment().getName().equals("eins"), "wrong department");
- emp = em.find(Employee.class, Integer.valueOf(7));
+ emp = em.find(Employee.class, 7);
verify(emp.getId() == 7, "wrong id");
- Department dep = em.find(Department.class, Integer.valueOf(1));
+ Department dep = em.find(Department.class, 1);
verify(em.contains(dep), "Object not loaded");
verify(dep.getId() == 1, "wrong id");
env.rollbackTransactionAndClear(em);
@@ -76,12 +76,12 @@
public void testPositivNonTx() {
final EntityManager em = getEnvironment().getEntityManager();
try {
- Employee emp = em.find(Employee.class, Integer.valueOf(7));
+ Employee emp = em.find(Employee.class, 7);
verify(emp.getId() == 7, "wrong id");
verify(emp.getDepartment().getName().equals("eins"), "wrong department");
- emp = em.find(Employee.class, Integer.valueOf(7));
+ emp = em.find(Employee.class, 7);
verify(emp.getId() == 7, "wrong id");
- Department dep = em.find(Department.class, Integer.valueOf(1));
+ Department dep = em.find(Department.class, 1);
verify(dep.getId() == 1, "wrong id");
} finally {
closeEntityManager(em);
@@ -92,7 +92,7 @@
public void testNegativ() {
final EntityManager em = getEnvironment().getEntityManager();
try {
- Object result = em.find(Employee.class, Integer.valueOf(17 + 12345));
+ Object result = em.find(Employee.class, 17 + 12345);
verify(result == null, "found something");
} finally {
closeEntityManager(em);
@@ -108,7 +108,7 @@
final EntityManager em = getEnvironment().getEntityManager();
try {
try {
- em.find(String.class, Integer.valueOf(17 + 4));
+ em.find(String.class, 17 + 4);
flop("no IllegalArgumentException thrown");
} catch (IllegalArgumentException ex) {
verify(true, "");
@@ -140,8 +140,8 @@
public void testFindWithCompositeKey() {
final EntityManager em = getEnvironment().getEntityManager();
try {
- Integer one = Integer.valueOf(1);
- Integer two = Integer.valueOf(2);
+ Integer one = 1;
+ Integer two = 2;
CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(one, two);
Cubicle cub = em.find(Cubicle.class, cubKey);
verify(cub.getFloor().equals(one) && cub.getPlace().equals(two), "wrong cubicle");
@@ -159,7 +159,7 @@
Island island = new Island();
em.persist(island);
env.commitTransactionAndClear(em);
- Integer islandId = Integer.valueOf(island.getId());
+ Integer islandId = island.getId();
env.beginTransaction(em);
island = em.find(Island.class, islandId);
em.remove(island);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java
index 8c2bc37..8c3bc2c 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java
@@ -51,7 +51,7 @@
// case 1: direct relationship Employee -> Cubicle (new) - 1:1
Department dep = new Department(1, "dep");
Employee emp1 = new Employee(2, "first", "last", dep);
- Cubicle cub1 = new Cubicle(Integer.valueOf(3), Integer.valueOf(3), "color", emp1);
+ Cubicle cub1 = new Cubicle(3, 3, "color", emp1);
emp1.setCubicle(cub1);
env.beginTransaction(em);
em.persist(dep);
@@ -174,7 +174,7 @@
// case 1: direct relationship Employee -> Cubicle (FOR_DELETE) - 1:1
Department dep = new Department(101, "dep");
Employee emp1 = new Employee(102, "first", "last", dep);
- Cubicle cub1 = new Cubicle(Integer.valueOf(103), Integer.valueOf(103), "color", emp1);
+ Cubicle cub1 = new Cubicle(103, 103, "color", emp1);
emp1.setCubicle(cub1);
env.beginTransaction(em);
em.persist(dep);
@@ -183,7 +183,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
cub1 = em.find(Cubicle.class, cub1.getId());
cub1.setEmployee(null); // added as suggested by Tom
em.remove(cub1);
@@ -226,7 +226,7 @@
em.persist(emp1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
proj = em.find(Project.class, proj.getId());
emp1.getProjects().size();
em.remove(proj);
@@ -275,8 +275,8 @@
em.persist(emp2);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
- emp2 = em.find(Employee.class, Integer.valueOf(emp2.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
+ emp2 = em.find(Employee.class, emp2.getId());
proj = em.find(Project.class, proj.getId());
emp1.getProjects().size();
proj.getEmployees().size();
@@ -307,14 +307,14 @@
// case 1b: direct relationship Employee -> Cubicle (DELETE_EXECUTED) - 1:1
dep = new Department(111, "dep");
emp1 = new Employee(112, "first", "last", dep);
- cub1 = new Cubicle(Integer.valueOf(113), Integer.valueOf(112), "color", emp1);
+ cub1 = new Cubicle(113, 112, "color", emp1);
env.beginTransaction(em);
em.persist(dep);
em.persist(emp1);
em.persist(cub1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
cub1 = em.find(Cubicle.class, cub1.getId());
em.remove(cub1);
em.flush();
@@ -352,7 +352,7 @@
em.persist(proj);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
proj = em.find(Project.class, proj.getId());
em.remove(proj);
em.flush();
@@ -403,8 +403,8 @@
em.persist(emp2);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
- emp2 = em.find(Employee.class, Integer.valueOf(emp2.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
+ emp2 = em.find(Employee.class, emp2.getId());
proj = em.find(Project.class, proj.getId());
emp1.getProjects().size();
projEmployees = proj.getEmployees();
@@ -475,10 +475,10 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
proj = em.find(Project.class, proj.getId());
em.remove(proj);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
// copy all projects from emp1 to emp2 with out actually touching them
Employee emp2 = new Employee(203, "aaa", "bbb", dep);
proj.addEmployee(emp2); // added as suggested by Tom
@@ -523,10 +523,10 @@
em.persist(emp1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
proj = em.find(Project.class, proj.getId());
em.remove(proj);
- emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId()));
+ emp1 = em.find(Employee.class, emp1.getId());
// copy all projects from emp1 to emp2 with out actually touching them
emp2 = new Employee(206, "aaa", "bbb", dep);
emp2.setProjects(emp1.getProjects());
@@ -590,14 +590,14 @@
department.setName(initial);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- department = em.find(Department.class, Integer.valueOf(id));
+ department = em.find(Department.class, id);
verify(initial.equals(department.getName()), "wrong name: " + department.getName());
department.setName("changed");
em.flush();
// lets try the same with a managed field
department.setName(initial);
env.commitTransactionAndClear(em);
- department = em.find(Department.class, Integer.valueOf(id));
+ department = em.find(Department.class, id);
verify(initial.equals(department.getName()), "wrong name: " + department.getName());
} finally {
closeEntityManager(em);
@@ -624,7 +624,7 @@
em.persist(r3);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- frank = em.find(Employee.class, Integer.valueOf(id));
+ frank = em.find(Employee.class, id);
Set<Review> reviewsFound = frank.getReviews();
int foundSize = reviewsFound.size();
// lets remove a department the same with a managed field
@@ -637,7 +637,7 @@
frank.setReviews(reviewsFound);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- frank = em.find(Employee.class, Integer.valueOf(id));
+ frank = em.find(Employee.class, id);
verify(frank.getReviews().size() == foundSize, "wrong number of reviews: " + frank.getReviews().size());
env.rollbackTransactionAndClear(em);
} finally {
@@ -672,7 +672,7 @@
em.flush();
// verify that entity is inserted
Query query = em.createQuery("select d from Department d where d.id = ?1");
- query.setParameter(1, Integer.valueOf(dep.getId()));
+ query.setParameter(1, dep.getId());
List<Department> result = query.getResultList();
verify(result.size() == 1, "query returned " + result.size() + " entities");
env.rollbackTransaction(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java
index f710013..ef17307 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java
@@ -44,7 +44,7 @@
private final Department _dep = new Department(1, "eins");
private final Department _dep2 = new Department(2, "zwei");
private final Employee _emp = new Employee(7, "first", "last", _dep);
- private final Cubicle _cub = new Cubicle(Integer.valueOf(1), Integer.valueOf(2), "yellow", _emp);
+ private final Cubicle _cub = new Cubicle(1, 2, "yellow", _emp);
private final Patent _pat = new Patent("12345", 2007, "whatever", Date.valueOf("2007-01-01"));
private final CreditCardAccount _ccacc = new CreditCardAccount();
@@ -78,7 +78,7 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Employee emp = em.getReference(Employee.class, Integer.valueOf(7));
+ Employee emp = em.getReference(Employee.class, 7);
verify(em.contains(emp), "Object not managed");
env.commitTransactionAndClear(em);
} finally {
@@ -92,13 +92,13 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Employee emp = em.getReference(Employee.class, Integer.valueOf(7));
+ Employee emp = em.getReference(Employee.class, 7);
verify(em.contains(emp), "Object not managed");
verify(emp.getId() == 7, "wrong id");
verify(emp.getDepartment().getName().equals("eins"), "wrong department");
- emp = em.getReference(Employee.class, Integer.valueOf(7));
+ emp = em.getReference(Employee.class, 7);
verify(emp.getId() == 7, "wrong id");
- Department dep = em.getReference(Department.class, Integer.valueOf(1));
+ Department dep = em.getReference(Department.class, 1);
verify(em.contains(dep), "Object not loaded");
verify(dep.getId() == 1, "wrong id");
env.rollbackTransactionAndClear(em);
@@ -111,13 +111,13 @@
public void testPositivNonTx() {
final EntityManager em = getEnvironment().getEntityManager();
try {
- Employee emp = em.getReference(Employee.class, Integer.valueOf(7));
+ Employee emp = em.getReference(Employee.class, 7);
try {
verify(emp.getId() == 7, "wrong id");
verify(emp.getDepartment().getName().equals("eins"), "wrong department");
- emp = em.getReference(Employee.class, Integer.valueOf(7));
+ emp = em.getReference(Employee.class, 7);
verify(emp.getId() == 7, "wrong id");
- Department dep = em.getReference(Department.class, Integer.valueOf(1));
+ Department dep = em.getReference(Department.class, 1);
verify(dep.getId() == 1, "wrong id");
} catch (PersistenceException e) {
if (getEnvironment().usesExtendedPC()) {
@@ -137,7 +137,7 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Department dep = em.getReference(Department.class, Integer.valueOf(1));
+ Department dep = em.getReference(Department.class, 1);
verify(em.contains(dep), "Object not managed");
verify(dep.getId() == 1, "wrong id");
verify(dep.getName().equals("eins"), "wrong name");
@@ -151,7 +151,7 @@
public void testPositivNonTxPropertyAccess() {
final EntityManager em = getEnvironment().getEntityManager();
try {
- Department dep = em.getReference(Department.class, Integer.valueOf(1));
+ Department dep = em.getReference(Department.class, 1);
verify(dep.getId() == 1, "wrong id");
try {
verify(dep.getName().equals("eins"), "wrong name");
@@ -181,7 +181,7 @@
boolean operationFailed = false;
env.beginTransaction(em);
try {
- employee = em.getReference(Employee.class, Integer.valueOf(17 + 4));
+ employee = em.getReference(Employee.class, 17 + 4);
} catch (EntityNotFoundException e) {
// $JL-EXC$ expected behavior
operationFailed = true;
@@ -210,7 +210,7 @@
final EntityManager em = getEnvironment().getEntityManager();
try {
try {
- em.getReference(String.class, Integer.valueOf(17 + 4));
+ em.getReference(String.class, 17 + 4);
flop("no IllegalArgumentException thrown");
} catch (IllegalArgumentException ex) {
verify(true, "");
@@ -244,8 +244,8 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Integer one = Integer.valueOf(1);
- Integer two = Integer.valueOf(2);
+ Integer one = 1;
+ Integer two = 2;
CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(one, two);
Cubicle cub = em.getReference(Cubicle.class, cubKey);
verify(cub.getFloor().equals(one) && cub.getPlace().equals(two), "wrong cubicle");
@@ -291,9 +291,9 @@
Employee employee = null;
Department nonExistingDepartment = null;
env.beginTransaction(em);
- employee = em.find(Employee.class, Integer.valueOf(7));
+ employee = em.find(Employee.class, 7);
try {
- nonExistingDepartment = em.getReference(Department.class, Integer.valueOf(999));
+ nonExistingDepartment = em.getReference(Department.class, 999);
} catch (EntityNotFoundException e) {
// $JL-EXC$ expected behavior
return; // getReference checks -> fail fast
@@ -312,13 +312,13 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- CreditCardAccount acc = em.getReference(CreditCardAccount.class, Long.valueOf(1));
+ CreditCardAccount acc = em.getReference(CreditCardAccount.class, 1L);
// verify method declared by superclass
verify("me".equals(acc.getOwner()), "wrong owner");
env.rollbackTransactionAndClear(em);
env.beginTransaction(em);
- acc = (CreditCardAccount) em.getReference(Account.class, Long.valueOf(1));
+ acc = (CreditCardAccount) em.getReference(Account.class, 1L);
// verify method declared by subclass of Account
verify(Long.valueOf(123).equals(acc.getCardNumber()), "wrong card number");
env.rollbackTransactionAndClear(em);
@@ -341,7 +341,7 @@
boolean operationFailed = false;
env.beginTransaction(em);
try {
- account = em.getReference(CreditCardAccount.class, Long.valueOf(999)); // does not exist
+ account = em.getReference(CreditCardAccount.class, 999L); // does not exist
} catch (EntityNotFoundException e) {
// $JL-EXC$ expected behavior
operationFailed = true;
@@ -370,7 +370,7 @@
boolean operationFailed = false;
env.beginTransaction(em);
try {
- emp = em.getReference(Employee.class, Integer.valueOf(99));
+ emp = em.getReference(Employee.class, 99);
} catch (EntityNotFoundException e) {
// $JL-EXC$ expected behavior
operationFailed = true;
@@ -410,32 +410,32 @@
// update to increase version counter
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(11));
+ dep = em.find(Department.class, 11);
dep.setName("updated");
- rev = em.find(Review.class, Integer.valueOf(11));
+ rev = em.find(Review.class, 11);
rev.setReviewText("updated");
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp = em.getReference(Employee.class, Integer.valueOf(11));
+ emp = em.getReference(Employee.class, 11);
em.remove(emp);
em.flush();
env.commitTransactionAndClear(em);
- verify(em.find(Employee.class, Integer.valueOf(11)) == null, "employee not removed");
+ verify(em.find(Employee.class, 11) == null, "employee not removed");
env.beginTransaction(em);
- dep = em.getReference(Department.class, Integer.valueOf(11));
+ dep = em.getReference(Department.class, 11);
em.remove(dep);
em.flush();
env.commitTransactionAndClear(em);
- verify(em.find(Department.class, Integer.valueOf(11)) == null, "department not removed");
+ verify(em.find(Department.class, 11) == null, "department not removed");
env.beginTransaction(em);
- rev = em.getReference(Review.class, Integer.valueOf(11));
+ rev = em.getReference(Review.class, 11);
em.remove(rev);
em.flush();
env.commitTransactionAndClear(em);
- verify(em.find(Review.class, Integer.valueOf(11)) == null, "review not removed");
+ verify(em.find(Review.class, 11) == null, "review not removed");
} finally {
closeEntityManager(em);
}
@@ -448,7 +448,7 @@
try {
env.beginTransaction(em);
try {
- Employee emp = em.getReference(Employee.class, Integer.valueOf(99)); // versioning, entity does not exist
+ Employee emp = em.getReference(Employee.class, 99); // versioning, entity does not exist
em.remove(emp);
em.flush();
flop("PersistenceException not thrown as expected");
@@ -459,7 +459,7 @@
env.beginTransaction(em);
try {
- Department dep = em.getReference(Department.class, Integer.valueOf(99)); // versioning, entity does not exist
+ Department dep = em.getReference(Department.class, 99); // versioning, entity does not exist
em.remove(dep);
em.flush();
flop("PersistenceException not thrown as expected");
@@ -481,13 +481,13 @@
// case 1: hollow entity is managed
env.beginTransaction(em);
- emp = em.getReference(Employee.class, Integer.valueOf(7));
+ emp = em.getReference(Employee.class, 7);
em.merge(emp);
em.flush();
env.rollbackTransactionAndClear(em);
// case 2: hollow entity is detached
- emp = em.getReference(Employee.class, Integer.valueOf(7));
+ emp = em.getReference(Employee.class, 7);
boolean shouldFail = isHollow(emp);
env.beginTransaction(em);
try {
@@ -525,17 +525,17 @@
em.persist(emp);
env.commitTransactionAndClear(em);
- Employee empDetached = em.find(Employee.class, Integer.valueOf(id));
+ Employee empDetached = em.find(Employee.class, id);
em.clear(); // detach entity
empDetached.setFirstName("updated");
env.beginTransaction(em);
- emp = em.getReference(Employee.class, Integer.valueOf(id));
+ emp = em.getReference(Employee.class, id);
em.merge(empDetached);
em.flush();
env.commitTransactionAndClear(em);
- emp = em.find(Employee.class, Integer.valueOf(id));
+ emp = em.find(Employee.class, id);
verify("updated".equals(emp.getFirstName()), "wrong first name: " + emp.getFirstName());
} finally {
closeEntityManager(em);
@@ -549,7 +549,7 @@
try {
Employee emp = null;
env.beginTransaction(em);
- emp = em.getReference(Employee.class, Integer.valueOf(7));
+ emp = em.getReference(Employee.class, 7);
em.refresh(emp);
em.flush();
env.rollbackTransactionAndClear(em);
@@ -564,7 +564,7 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Department dep = em.getReference(Department.class, Integer.valueOf(1));
+ Department dep = em.getReference(Department.class, 1);
em.lock(dep, LockModeType.READ);
em.flush();
env.rollbackTransactionAndClear(em);
@@ -579,12 +579,12 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Department dep = em.find(Department.class, Integer.valueOf(1));
+ Department dep = em.find(Department.class, 1);
int version = dep.getVersion();
env.rollbackTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.getReference(Department.class, Integer.valueOf(1));
+ dep = em.getReference(Department.class, 1);
em.lock(dep, LockModeType.WRITE);
em.flush();
verify(dep.getVersion() > version, "version not incremented");
@@ -608,13 +608,13 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- parent = em.getReference(CascadingNode.class, Integer.valueOf(1));
+ parent = em.getReference(CascadingNode.class, 1);
em.remove(parent);
em.flush();
env.commitTransactionAndClear(em);
- parent = em.find(CascadingNode.class, Integer.valueOf(1));
+ parent = em.find(CascadingNode.class, 1);
verify(parent == null, "parent not removed");
- child = em.find(CascadingNode.class, Integer.valueOf(2));
+ child = em.find(CascadingNode.class, 2);
verify(child == null, "child not removed");
} finally {
closeEntityManager(em);
@@ -635,7 +635,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- em.getReference(CascadingNode.class, Integer.valueOf(11));
+ em.getReference(CascadingNode.class, 11);
em.flush();
env.rollbackTransactionAndClear(em);
@@ -656,7 +656,7 @@
final EntityManager em = env.getEntityManager();
try {
// case 1: entity with standard serialization
- Employee emp = em.getReference(Employee.class, Integer.valueOf(7));
+ Employee emp = em.getReference(Employee.class, 7);
// load entity
emp.getFirstName();
Employee resultEmp = AbstractBaseTest.serializeDeserialize(emp);
@@ -665,7 +665,7 @@
em.clear();
// case 2: entity with writeReplace
- Department dep = em.getReference(Department.class, Integer.valueOf(1));
+ Department dep = em.getReference(Department.class, 1);
// load entity
dep.getName();
Department resultDep = AbstractBaseTest.serializeDeserialize(dep);
@@ -674,9 +674,9 @@
em.clear();
// case 3: related entities
- emp = em.getReference(Employee.class, Integer.valueOf(7));
+ emp = em.getReference(Employee.class, 7);
emp.getFirstName();
- dep = em.getReference(Department.class, Integer.valueOf(2));
+ dep = em.getReference(Department.class, 2);
dep.getName();
emp.setDepartment(dep);
Cubicle cub = em.getReference(Cubicle.class, new CubiclePrimaryKeyClass(1, 2));
@@ -698,7 +698,7 @@
final EntityManager em = env.getEntityManager();
try {
// case 1: entity with standard serialization
- Employee emp = em.getReference(Employee.class, Integer.valueOf(7));
+ Employee emp = em.getReference(Employee.class, 7);
boolean shouldFail = isHollow(emp);
try {
Employee resultEmp = AbstractBaseTest.serializeDeserialize(emp);
@@ -712,7 +712,7 @@
em.clear();
// case 2: entity with writeReplace
- Department dep = em.getReference(Department.class, Integer.valueOf(1));
+ Department dep = em.getReference(Department.class, 1);
shouldFail = isHollow(dep);
try {
Department resultDep = AbstractBaseTest.serializeDeserialize(dep);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java
index 945c7d3..1a806df 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java
@@ -105,12 +105,12 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
// relations of the managed employee
- Employee empManaged = em.find(Employee.class, Integer.valueOf(empDetached.getId()));
+ Employee empManaged = em.find(Employee.class, empDetached.getId());
empManaged.setFirstName("Adrian");
- revManaged = em.find(Review.class, Integer.valueOf(revManaged.getId()));
- Review revSamePKAsDetached = em.find(Review.class, Integer.valueOf(revDetached.getId()));
+ revManaged = em.find(Review.class, revManaged.getId());
+ Review revSamePKAsDetached = em.find(Review.class, revDetached.getId());
revSamePKAsDetached.setReviewText("same PK as detached review");
- revAddedInManagedEmp = em.find(Review.class, Integer.valueOf(revAddedInManagedEmp.getId()));
+ revAddedInManagedEmp = em.find(Review.class, revAddedInManagedEmp.getId());
em.persist(revAddedInManagedEmp);
empManaged.addReview(revManaged);
empManaged.addReview(revSamePKAsDetached);
@@ -218,7 +218,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // object is now in state MANAGED
+ dep = em.find(Department.class, id); // object is now in state MANAGED
checkDepartment(dep, id, "MANAGED");
verify(em.contains(dep), "entity manager does not contain object");
mergeResult = em.merge(dep); // this should be ignored
@@ -247,7 +247,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id1));
+ dep = em.find(Department.class, id1);
em.remove(dep);
// now the entity should be REMOVED
boolean failed = false;
@@ -277,7 +277,7 @@
em.persist(depEM);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- depEM = em.find(Department.class, Integer.valueOf(id));
+ depEM = em.find(Department.class, id);
checkDepartment(depEM, id, "REMOVE");
em.remove(depEM); // this is now in state REMOVED
failed = false;
@@ -302,7 +302,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id1));
+ dep = em.find(Department.class, id1);
em.remove(dep);
em.flush();
// now the entity should be in state DELETE_EXECUTED
@@ -376,11 +376,11 @@
em.persist(depEM);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- depClient = em.find(Department.class, Integer.valueOf(id));
+ depClient = em.find(Department.class, id);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
depClient.setName(("NEW_NAME"));
- depEM = em.find(Department.class, Integer.valueOf(id)); // this is now in state managed
+ depEM = em.find(Department.class, id); // this is now in state managed
checkDepartment(depEM, id, "ORIGINAL");
verify(em.contains(depEM), "entity manager does not contain department -> it cannot be merged");
mergeResult = em.merge(depClient);
@@ -396,7 +396,7 @@
private void verifyExistence(final EntityManager em, int id, String name) {
Department dep;
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
verify(dep != null, "department not found");
verify(name.equals(dep.getName()), "department has wrong name: " + dep.getName());
}
@@ -458,8 +458,8 @@
em.persist(hobbyDetachedNotInPC);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- revManaged = em.find(Review.class, Integer.valueOf(revManaged.getId()));
- Review revSamePKAsDetached = em.find(Review.class, Integer.valueOf(revDetached.getId()));
+ revManaged = em.find(Review.class, revManaged.getId());
+ Review revSamePKAsDetached = em.find(Review.class, revDetached.getId());
revSamePKAsDetached.setReviewText("same PK as detached review");
empNew.addReview(revManaged);
empNew.addReview(revDetached);
@@ -552,10 +552,10 @@
em.persist(hobby2);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- Employee empDetached = em.find(Employee.class, Integer.valueOf(emp.getId()));
+ Employee empDetached = em.find(Employee.class, emp.getId());
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp = em.find(Employee.class, Integer.valueOf(emp.getId()));
+ emp = em.find(Employee.class, emp.getId());
emp.setFirstName("Managed");
emp = em.merge(empDetached);
verify(empDetached.getFirstName().equals(emp.getFirstName()), "Merged employee has wrong first name");
@@ -564,11 +564,11 @@
env.commitTransactionAndClear(em);
// Case 2: Change observer pending in detached object and loaded but unchanged in managed object
env.beginTransaction(em);
- empDetached = em.find(Employee.class, Integer.valueOf(emp.getId()));
+ empDetached = em.find(Employee.class, emp.getId());
emp.setFirstName("Detached");
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp = em.find(Employee.class, Integer.valueOf(emp.getId()));
+ emp = em.find(Employee.class, emp.getId());
emp.setFirstName("Managed");
Set<Review> reviews = emp.getReviews();
verify(reviews.size() == 2, "Employee has " + reviews.size() + " reviews, expected 2");
@@ -856,7 +856,7 @@
// $JL-EXC$
}
Timestamp t = new Timestamp();
- t.setId(Long.valueOf(1));
+ t.setId(1L);
//
verifyMergeNewEntityWithIdSetInPrePersist(t);
}
@@ -900,7 +900,7 @@
verify(value != null, "id is null");
try {
Nasty n2 = new Nasty();
- n2.setId(Long.valueOf(2000));
+ n2.setId(2000L);
em.merge(n2);
env.commitTransaction(em);
flop("persisting second nasty timestamp succeeded");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java
index b8bf1a6..c9d06db 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java
@@ -141,7 +141,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
// find a department in the state MANAGED
- dep = em.find(Department.class, Integer.valueOf(id1));
+ dep = em.find(Department.class, id1);
verify(dep != null, "department not found");
dep.setName("CHANGED");
if (flushBeforePersist) {
@@ -186,7 +186,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id1));
+ dep = em.find(Department.class, id1);
em.remove(dep);
// now, the entity should be REMOVED
if (flushBeforePersist) {
@@ -197,7 +197,7 @@
dep.setName("REINVIGORATED");
env.commitTransactionAndClear(em);
- dep = em.find(Department.class, Integer.valueOf(id1));
+ dep = em.find(Department.class, id1);
verify(dep != null, "department not found");
verify("REINVIGORATED".equals(dep.getName()), "department has wrong name: " + dep.getName());
@@ -214,7 +214,7 @@
dep.setName("REINVIGORATED");
env.commitTransactionAndClear(em);
- dep = em.find(Department.class, Integer.valueOf(id2));
+ dep = em.find(Department.class, id2);
verify(dep != null, "department not found");
verify("REINVIGORATED".equals(dep.getName()), "department has wrong name: " + dep.getName());
} finally {
@@ -315,7 +315,7 @@
env.commitTransactionAndClear(em);
verifyExistenceOnDatabase(id, "TMP_DEP");
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // this is now in state managed
+ dep = em.find(Department.class, id); // this is now in state managed
try {
em.persist(detachedDep);
} catch (EntityExistsException e) {
@@ -343,7 +343,7 @@
env.commitTransactionAndClear(em);
verifyExistenceOnDatabase(id, "TMP_DEP");
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
em.remove(dep); // this is now in state deleted
try {
em.persist(detachedDep);
@@ -388,7 +388,7 @@
env.commitTransactionAndClear(em);
verifyExistenceOnDatabase(id, "TMP_DEP");
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
em.remove(dep);
em.flush();
try {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java
index 3ff461b..4145e72 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java
@@ -101,7 +101,7 @@
dep.setName("UPDATED");
env.commitTransactionAndClear(em);
// verify that updated name present on db
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
checkDepartment(dep, id, "UPDATED");
} finally {
closeEntityManager(em);
@@ -152,7 +152,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // this is now in
+ dep = em.find(Department.class, id); // this is now in
// state MANAGED
dep.setName("UPDATED");
em.refresh(dep);
@@ -160,7 +160,7 @@
verify(em.contains(dep), "Department is not managed");
env.commitTransactionAndClear(em);
// verify that original name present on db
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
checkDepartment(dep, id, "MANAGED");
// case 2: refresh with data changed on db in a different tx
id = 22;
@@ -170,7 +170,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // this is now in
+ dep = em.find(Department.class, id); // this is now in
// state MANAGED
updateDepartmentOnDatabase(updatedDep);
em.refresh(dep);
@@ -179,7 +179,7 @@
dep.setName("MANAGED");
env.commitTransactionAndClear(em);
// verify that original name present on db
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
checkDepartment(dep, id, "MANAGED");
} finally {
closeEntityManager(em);
@@ -208,7 +208,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // this is now in
+ dep = em.find(Department.class, id); // this is now in
// state MANAGED
deleteDepartmentFromDatabase(id);
verifyAbsenceFromDatabase(em, id);
@@ -235,7 +235,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
em.remove(dep);
if (flush) {
em.flush(); // this is now in state DELETE_EXECUTED
@@ -316,7 +316,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // this is now in
+ dep = em.find(Department.class, id); // this is now in
// state MANAGED
try {
em.refresh(detachedDep); // this object is detached
@@ -333,7 +333,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
em.remove(dep); // this is now in state DELETED
try {
em.refresh(detachedDep); // this object is detached
@@ -417,8 +417,8 @@
em.persist(rev2);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp = em.find(Employee.class, Integer.valueOf(emp.getId()));
- rev1 = em.find(Review.class, Integer.valueOf(rev1.getId()));
+ emp = em.find(Employee.class, emp.getId());
+ rev1 = em.find(Review.class, rev1.getId());
Review rev3 = new Review(105, Date.valueOf("2006-02-05"), "Test coverage");
Set<Review> reviews = new HashSet<Review>();
reviews.add(rev1);
@@ -436,7 +436,7 @@
}
env.commitTransactionAndClear(em);
// verify that original name present on db
- rev1 = em.find(Review.class, Integer.valueOf(rev1.getId()));
+ rev1 = em.find(Review.class, rev1.getId());
verify("UPDATED".equals(rev1.getReviewText()), "Rev1 has wrong text: " + rev1.getReviewText());
} finally {
closeEntityManager(em);
@@ -454,7 +454,7 @@
env.commitTransaction(em);
em.clear();
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
dep.setName("updated");
env.markTransactionForRollback(em);
em.refresh(dep);
@@ -489,7 +489,7 @@
private void verifyAbsenceFromDatabase(EntityManager em, int id) {
Query query = em.createQuery("SELECT d.id from Department d where d.id = ?1");
query.setFlushMode(FlushModeType.COMMIT);
- query.setParameter(1, Integer.valueOf(id));
+ query.setParameter(1, id);
verify(query.getResultList().size() == 0, "wrong result list size");
}
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java
index 6be2021..6962fc9 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java
@@ -96,7 +96,7 @@
env.commitTransactionAndClear(em);
env.beginTransaction(em);
// find a department in the state MANAGED
- dep = em.find(Department.class, Integer.valueOf(id1));
+ dep = em.find(Department.class, id1);
verify(dep != null, "department not found");
dep.setName("NEW");
if (flushBeforeRemove) {
@@ -147,7 +147,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id1));
+ dep = em.find(Department.class, id1);
em.remove(dep);
// no, the entity should be REMOVED
if (flushBeforePersist) {
@@ -251,7 +251,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id)); // object is now in state MANAGED
+ dep = em.find(Department.class, id); // object is now in state MANAGED
try {
em.remove(detachedDep);
} catch (IllegalArgumentException e) {
@@ -275,7 +275,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
em.remove(dep); // object is now in state DELETED
try {
em.remove(detachedDep);
@@ -318,7 +318,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(id));
+ dep = em.find(Department.class, id);
em.remove(dep);
em.flush();
try {
@@ -373,8 +373,8 @@
final JPAEnvironment env = getEnvironment();
final EntityManager em = env.getEntityManager();
try {
- Cubicle cub = new Cubicle(Integer.valueOf(30), Integer.valueOf(31), "green", null /* employee */);
- CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(Integer.valueOf(30), Integer.valueOf(31));
+ Cubicle cub = new Cubicle(30, 31, "green", null /* employee */);
+ CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(30, 31);
env.beginTransaction(em);
em.persist(cub);
env.commitTransactionAndClear(em);
@@ -415,7 +415,7 @@
env.commitTransaction(em);
em.clear();
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
env.markTransactionForRollback(em);
em.remove(dep);
verify(!em.contains(dep), "entity still contained in persistence context");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java
index cd6fc2a..74fd4a8 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java
@@ -33,7 +33,7 @@
final JPAEnvironment env = getEnvironment();
final EntityManager em = env.getEntityManager();
try {
- CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(Integer.valueOf(40), Integer.valueOf(41));
+ CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(40, 41);
Cubicle cub = new Cubicle(cubKey, "green", null /* employee */
);
env.beginTransaction(em);
@@ -59,8 +59,8 @@
try {
Employee emp = new Employee(17, "first", "last", null /* department */
);
- CubiclePrimaryKeyClass key1 = new CubiclePrimaryKeyClass(Integer.valueOf(98), Integer.valueOf(99));
- CubiclePrimaryKeyClass key2 = new CubiclePrimaryKeyClass(Integer.valueOf(5), Integer.valueOf(6));
+ CubiclePrimaryKeyClass key1 = new CubiclePrimaryKeyClass(98, 99);
+ CubiclePrimaryKeyClass key2 = new CubiclePrimaryKeyClass(5, 6);
Cubicle cub1 = new Cubicle(key1, "orange", emp);
env.beginTransaction(em);
emp.setCubicle(cub1);
@@ -68,12 +68,12 @@
em.persist(cub1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp = em.find(Employee.class, Integer.valueOf(17));
+ emp = em.find(Employee.class, 17);
Cubicle cub2 = new Cubicle(key2, "dusky pink", emp);
emp.setCubicle(cub2);
em.persist(cub2);
env.commitTransactionAndClear(em);
- emp = em.find(Employee.class, Integer.valueOf(17));
+ emp = em.find(Employee.class, 17);
verify(emp != null, "employee lost");
verify(emp.getCubicle() != null, "cubicle lost");
CubiclePrimaryKeyClass key = emp.getCubicle().getId();
@@ -94,7 +94,7 @@
env.commitTransaction(em);
em.clear();
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
dep.setId(99);
try {
env.commitTransaction(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestGenerator.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestGenerator.java
index 1e08f89..e7f27de 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestGenerator.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -38,7 +38,7 @@
Project p1 = new Project();
em.persist(p1);
verify(p1.getId() != null, "id is null");
- verify(p1.getId().intValue() != 0, "id == 0");
+ verify(p1.getId() != 0, "id == 0");
env.rollbackTransactionAndClear(em);
} finally {
closeEntityManager(em);
@@ -77,7 +77,7 @@
Project p1 = new Project();
p1 = em.merge(p1);
verify(p1.getId() != null, "id is null");
- verify(p1.getId().intValue() != 0, "id == 0");
+ verify(p1.getId() != 0, "id == 0");
env.rollbackTransactionAndClear(em);
} finally {
closeEntityManager(em);
@@ -97,7 +97,7 @@
env.beginTransaction(em);
p1 = em.merge(p1);
verify(p1.getId() != null, "id is null");
- verify(p1.getId().intValue() != 0, "id == 0");
+ verify(p1.getId() != 0, "id == 0");
env.rollbackTransactionAndClear(em);
} finally {
closeEntityManager(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestSequence.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestSequence.java
index b430a54..aa90a66 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestSequence.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/generator/TestSequence.java
@@ -64,7 +64,7 @@
em.getTransaction().begin();
final Animal firstDove = new Animal("dove ");
em.persist(firstDove);
- final int offset = firstDove.getId().intValue();
+ final int offset = firstDove.getId();
for (int i = 1; i < 100; i++) {
final Animal dove = new Animal("dove " + i);
em.persist(dove);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/RelationsTest.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/RelationsTest.java
index 99a05a4..434f5b2 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/RelationsTest.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/RelationsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -58,7 +58,7 @@
env.commitTransaction(em);
employee = null;
em.clear();
- employee = em.find(Employee.class, Integer.valueOf(1234));
+ employee = em.find(Employee.class, 1234);
verify(employee != null, "employee not found");
MotorVehicle motorVehicle = employee.getMotorVehicle();
verify(motorVehicle != null, "no motor vehicle found");
@@ -93,7 +93,7 @@
env.commitTransaction(em);
employee = null;
em.clear();
- employee = em.find(Employee.class, Integer.valueOf(17));
+ employee = em.find(Employee.class, 17);
verify(employee != null, "employee not found");
bicycles = employee.getBicycles();
verify(bicycles != null, "bicycles is null");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/SimpleInheritanceTest.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/SimpleInheritanceTest.java
index fe531b7..6853a53 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/SimpleInheritanceTest.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/inheritance/SimpleInheritanceTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -43,7 +43,7 @@
try {
PreparedStatement stmt = conn.prepareStatement("select ID from TMP_VEHICLE where ID = ?");
try {
- stmt.setShort(1, vehicleId.shortValue());
+ stmt.setShort(1, vehicleId);
ResultSet rs = stmt.executeQuery();
try {
verify(rs.next(), "no department with id " + vehicleId + " found using JDBC.");
@@ -63,7 +63,7 @@
try {
PreparedStatement stmt = conn.prepareStatement("select ID, DTYPE from TMP_VEHICLE where ID = ?");
try {
- stmt.setShort(1, vehicleId.shortValue());
+ stmt.setShort(1, vehicleId);
ResultSet rs = stmt.executeQuery();
try {
verify(rs.next(), "no department with id " + vehicleId + " found using JDBC.");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java
index 6d6aefd..65e25e3 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java
@@ -83,7 +83,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(100));
+ dep = em.find(Department.class, 100);
em.remove(dep);
em.lock(dep, LockModeType.READ);
flop("no exception NonManagedEntity");
@@ -104,7 +104,7 @@
em.persist(dep);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(101));
+ dep = em.find(Department.class, 101);
em.remove(dep);
em.flush();
em.lock(dep, LockModeType.READ);
@@ -256,11 +256,11 @@
env.commitTransactionAndClear(em1);
// read first version
env.beginTransaction(em1);
- dep1 = em1.find(Department.class, Integer.valueOf(id));
+ dep1 = em1.find(Department.class, id);
verify(dep1 != null, "Department is null");
// change entity meanwhile
env.beginTransaction(em2);
- Department dep2 = em2.find(Department.class, Integer.valueOf(id));
+ Department dep2 = em2.find(Department.class, id);
dep2.setName("dep" + id + "x");
env.commitTransactionAndClear(em2);
// try to lock first version
@@ -325,7 +325,7 @@
env.commitTransaction(em);
em.clear();
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
try {
em.lock(depDetached, LockModeType.READ);
flop("exception not thrown as expected");
@@ -342,7 +342,7 @@
env.commitTransaction(em);
em.clear();
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
em.remove(dep);
try {
em.lock(depDetached, LockModeType.READ);
@@ -360,7 +360,7 @@
env.commitTransaction(em);
em.clear();
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(dep.getId()));
+ dep = em.find(Department.class, dep.getId());
em.remove(dep);
em.flush();
try {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java
index a319f45..81b601d 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java
@@ -58,14 +58,14 @@
env.commitTransactionAndClear(em1);
env.beginTransaction(em1);
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
rev1.getVersion();
EntityManager em2 = env.getEntityManagerFactory().createEntityManager();
try {
env.beginTransaction(em2);
- Review rev2 = em2.find(Review.class, Integer.valueOf(id));
+ Review rev2 = em2.find(Review.class, id);
rev2.setReviewText("two"); // 1 update
env.commitTransactionAndClear(em2);
} finally {
@@ -109,10 +109,10 @@
env.commitTransactionAndClear(em1);
env.beginTransaction(em1);
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
env.beginTransaction(em2);
- Review rev2 = em2.find(Review.class, Integer.valueOf(id));
+ Review rev2 = em2.find(Review.class, id);
em2.remove(rev2); // 1 delete
env.commitTransactionAndClear(em2);
rev1.setReviewText("1"); // 2 update
@@ -149,10 +149,10 @@
em1.persist(rev1);
env.commitTransactionAndClear(em1);
env.beginTransaction(em1);
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
env.beginTransaction(em2);
- Review rev2 = em2.find(Review.class, Integer.valueOf(id));
+ Review rev2 = em2.find(Review.class, id);
rev2.setReviewDate(Date.valueOf("2005-12-23")); // 1 update
env.commitTransactionAndClear(em2);
em1.remove(rev1); // 2 delete
@@ -186,10 +186,10 @@
em1.persist(rev1);
env.commitTransactionAndClear(em1);
env.beginTransaction(em1);
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
env.beginTransaction(em2);
- Review rev2 = em2.find(Review.class, Integer.valueOf(id));
+ Review rev2 = em2.find(Review.class, id);
em2.remove(rev2); // 1 delete
env.commitTransactionAndClear(em2);
em1.remove(rev1); // 2 delete
@@ -218,7 +218,7 @@
env.commitTransactionAndClear(em);
version = rev.getVersion();
env.beginTransaction(em);
- rev = em.find(Review.class, Integer.valueOf(id));
+ rev = em.find(Review.class, id);
verify(rev != null, "Review is null");
rev.setReviewText(rev.getReviewText()); // no change
env.commitTransactionAndClear(em);
@@ -297,7 +297,7 @@
rev = em.merge(rev);
em.flush();
env.commitTransactionAndClear(em); // still 4th version
- rev = em.find(Review.class, Integer.valueOf(id));
+ rev = em.find(Review.class, id);
verify(rev.getReviewText().equals("BBB"), "wrong reviewText");
verify(rev.getReviewDate().equals(Date.valueOf("2005-12-23")), "wrong reviewDate");
verify(rev.getVersion() == startVersion + 3, "wrong version");
@@ -340,10 +340,10 @@
em1.persist(rev1);
env.commitTransactionAndClear(em1);
env.beginTransaction(em1);
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
env.beginTransaction(em2);
- Review rev2 = em2.find(Review.class, Integer.valueOf(id));
+ Review rev2 = em2.find(Review.class, id);
rev2.setReviewDate(Date.valueOf("2005-12-23"));
env.commitTransactionAndClear(em2);
em1.refresh(rev1);
@@ -368,7 +368,7 @@
env.commitTransactionAndClear(em);
for (int i = 0; i < 3; i++) {
env.beginTransaction(em);
- rev = em.find(Review.class, Integer.valueOf(id));
+ rev = em.find(Review.class, id);
verify(rev != null, "Review is null");
rev.setReviewText(Integer.valueOf(i).toString());
env.commitTransactionAndClear(em);
@@ -391,7 +391,7 @@
em.persist(rev1);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- rev1 = em.find(Review.class, Integer.valueOf(id));
+ rev1 = em.find(Review.class, id);
verify(rev1 != null, "Review is null");
em.persist(rev1);
verify(rev1.getVersion() > 0, "Version reset");
@@ -417,17 +417,17 @@
em1.persist(rev1);
env.commitTransactionAndClear(em1);
env.beginTransaction(em1); // Tx1 read and flush change
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
rev1.setReviewText("2");
em1.flush();
env.beginTransaction(em2); // Tx2 read flushed entity ?
- Review rev2 = em2.find(Review.class, Integer.valueOf(id));
+ Review rev2 = em2.find(Review.class, id);
verify(rev2 != null, "Review is null");
env.rollbackTransactionAndClear(em1); // Tx1 rollback first change
// and commit second
env.beginTransaction(em1);
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
rev1.setReviewText("3");
env.commitTransactionAndClear(em1);
@@ -473,7 +473,7 @@
private void updateNodes(JPAEnvironment env, EntityManager em, String newName) {
env.beginTransaction(em);
- Node tmp = em.find(Node.class, Integer.valueOf(0));
+ Node tmp = em.find(Node.class, 0);
verify(tmp.getVersion() != 0, "wrong version");
while (tmp != null) {
tmp.setName(newName);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/mapping/TestSecondaryTable.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/mapping/TestSecondaryTable.java
index 82a7782..1d45794 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/mapping/TestSecondaryTable.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/mapping/TestSecondaryTable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -75,7 +75,7 @@
Integer projectId = project.getId();
con = env.getDataSource().getConnection();
pstmt = con.prepareStatement("select count(*) from TMP_PROJECT_DETAILS where PROJECT_ID = ?");
- pstmt.setInt(1, projectId.intValue());
+ pstmt.setInt(1, projectId);
rs = pstmt.executeQuery();
rs.next();
verify(rs.getInt(1) == 0, "secondary table not empty");
@@ -152,11 +152,11 @@
rev1.setSuccessRate((short) 0);
env.commitTransactionAndClear(em1);
env.beginTransaction(em1);
- rev1 = em1.find(Review.class, Integer.valueOf(id));
+ rev1 = em1.find(Review.class, id);
verify(rev1 != null, "Review is null");
version = rev1.getVersion();
env.beginTransaction(em2);
- Review rev2 = em2.find(Review.class, Integer.valueOf(id));
+ Review rev2 = em2.find(Review.class, id);
rev2.setSuccessRate((short) 10); // 1 update
env.commitTransactionAndClear(em2);
rev1.setSuccessRate((short) 20); // 2 update
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java
index bf30b3d..c3786f8 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java
@@ -64,7 +64,7 @@
env.beginTransaction(em);
Employee knut = new Employee(1, "Knut", "Maier", dep10);
Employee fred = new Employee(2, "Fred", "Schmidt", null);
- Cubicle green = new Cubicle(Integer.valueOf(1), Integer.valueOf(2), "green", knut);
+ Cubicle green = new Cubicle(1, 2, "green", knut);
knut.setCubicle(green);
em.persist(dep10);
em.persist(dep20);
@@ -88,7 +88,7 @@
Query updateQuery = em
.createQuery("UPDATE Employee e SET e.salary = e.salary*(1+(:percent/100)) WHERE EXISTS (SELECT p FROM e.projects p WHERE p.name LIKE :projectName)");
- updateQuery.setParameter("percent", Integer.valueOf(15));
+ updateQuery.setParameter("percent", 15);
updateQuery.setParameter("projectName", "testing project");
updateQuery.executeUpdate();
@@ -279,7 +279,7 @@
@Test
public void testPrimitiveByte() {
- assertValidParameterForBasicTypesFieldAccess("primititveByte", Byte.valueOf((byte) 2));
+ assertValidParameterForBasicTypesFieldAccess("primititveByte", (byte) 2);
}
@Test
@@ -315,42 +315,42 @@
// wrappers of primitive types
@Test
public void testWrapperBoolean() {
- assertValidParameterForBasicTypesFieldAccess("wrapperBoolean", Boolean.valueOf(true));
+ assertValidParameterForBasicTypesFieldAccess("wrapperBoolean", Boolean.TRUE);
}
@Test
public void testWrapperByte() {
- assertValidParameterForBasicTypesFieldAccess("wrapperByte", Byte.valueOf((byte) 2));
+ assertValidParameterForBasicTypesFieldAccess("wrapperByte", (byte) 2);
}
@Test
public void testWrapperCharacter() {
- assertValidParameterForBasicTypesFieldAccess("wrapperCharacter", Character.valueOf('c'));
+ assertValidParameterForBasicTypesFieldAccess("wrapperCharacter", 'c');
}
@Test
public void testWrapperShort() {
- assertValidParameterForBasicTypesFieldAccess("wrapperShort", Short.valueOf((short) 1));
+ assertValidParameterForBasicTypesFieldAccess("wrapperShort", (short) 1);
}
@Test
public void testWrapperInteger() {
- assertValidParameterForBasicTypesFieldAccess("wrapperInteger", Integer.valueOf(1));
+ assertValidParameterForBasicTypesFieldAccess("wrapperInteger", 1);
}
@Test
public void testWrapperLong() {
- assertValidParameterForBasicTypesFieldAccess("wrapperLong", Long.valueOf(1L));
+ assertValidParameterForBasicTypesFieldAccess("wrapperLong", 1L);
}
@Test
public void testWrapperDouble() {
- assertValidParameterForBasicTypesFieldAccess("wrapperDouble", Double.valueOf(0.00));
+ assertValidParameterForBasicTypesFieldAccess("wrapperDouble", 0.00);
}
@Test
public void testWrapperFloat() {
- assertValidParameterForBasicTypesFieldAccess("wrapperFloat", Float.valueOf(1F));
+ assertValidParameterForBasicTypesFieldAccess("wrapperFloat", 1F);
}
// immutable reference types
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestCount.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestCount.java
index 658f7fe..557c0ad 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestCount.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestCount.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -59,7 +59,7 @@
em.persist(eisKratzen);
Project schneeSchieben = new Project("Schnee Schieben");
em.persist(schneeSchieben);
- Cubicle cubicle = new Cubicle(new CubiclePrimaryKeyClass(Integer.valueOf(1), Integer.valueOf(2)), "red-green-gold",
+ Cubicle cubicle = new Cubicle(new CubiclePrimaryKeyClass(1, 2), "red-green-gold",
null);
em.persist(cubicle);
env.commitTransactionAndClear(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestDeleteQuery.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestDeleteQuery.java
index f8aa502..63f5bd5 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestDeleteQuery.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestDeleteQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -173,7 +173,7 @@
EntityManager em = getEnvironment().getEntityManager();
try {
init();
- Department department = em.find(Department.class, Integer.valueOf(10));
+ Department department = em.find(Department.class, 10);
verifyDeleteEmployeeWithGivenDepartment(em, department);
em.clear();
init();
@@ -192,7 +192,7 @@
verify(count == 1, "wrong update count: " + count);
getEnvironment().commitTransaction(em);
getEnvironment().evict(em, Employee.class);
- verify(null == em.find(Employee.class, Integer.valueOf(1)), "employee found");
+ verify(null == em.find(Employee.class, 1), "employee found");
}
@Test
@@ -295,10 +295,10 @@
getEnvironment().beginTransaction(em);
Query query = em.createQuery("update Department d set d.name = ?1 where d.id = ?2");
query.setParameter(1, "emil");
- query.setParameter(2, Integer.valueOf(1));
+ query.setParameter(2, 1);
query.executeUpdate();
getEnvironment().commitTransactionAndClear(em);
- Department found = em.find(Department.class, Integer.valueOf(1));
+ Department found = em.find(Department.class, 1);
verify("emil".equals(found.getName()), "wrong name: " + found.getName());
} finally {
closeEntityManager(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java
index f81ded3..df19bfd 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java
@@ -98,10 +98,10 @@
protected String getRandomSurname() {
String tmpName = SURNAMES[nameRandomizer.nextInt(SURNAMES.length)];
if (!NUMBER_OF_SURNAMES_USED.containsKey(tmpName)) {
- NUMBER_OF_SURNAMES_USED.put(tmpName, Integer.valueOf(1));
+ NUMBER_OF_SURNAMES_USED.put(tmpName, 1);
} else {
Integer tmpNum = NUMBER_OF_SURNAMES_USED.get(tmpName);
- tmpNum = Integer.valueOf(tmpNum.intValue() + 1);
+ tmpNum = tmpNum + 1;
NUMBER_OF_SURNAMES_USED.put(tmpName, tmpNum);
}
return tmpName;
@@ -110,10 +110,10 @@
protected String getRandomGivenName() {
String tmpName = GIVEN_NAMES[nameRandomizer.nextInt(GIVEN_NAMES.length)];
if (!NUMBER_OF_GIVEN_NAMES_USED.containsKey(tmpName)) {
- NUMBER_OF_GIVEN_NAMES_USED.put(tmpName, Integer.valueOf(1));
+ NUMBER_OF_GIVEN_NAMES_USED.put(tmpName, 1);
} else {
Integer tmpNum = NUMBER_OF_GIVEN_NAMES_USED.get(tmpName);
- tmpNum = Integer.valueOf(tmpNum.intValue() + 1);
+ tmpNum = tmpNum + 1;
NUMBER_OF_GIVEN_NAMES_USED.put(tmpName, tmpNum);
}
return tmpName;
@@ -264,10 +264,10 @@
env.beginTransaction(em);
Query query = em
.createQuery("UPDATE Employee emp SET emp.salary = emp.salary + :param1 WHERE emp.firstname = SUBSTRING(:string, :int1, :int2)");
- query.setParameter("param1", Integer.valueOf(13));
+ query.setParameter("param1", 13);
query.setParameter("string", "moo");
- query.setParameter("int1", Integer.valueOf(1));
- query.setParameter("int2", Integer.valueOf(2));
+ query.setParameter("int1", 1);
+ query.setParameter("int2", 2);
query.executeUpdate();
env.commitTransaction(em);
} finally {
@@ -282,7 +282,7 @@
try {
// test string-mapping of enums
Query query = em.createQuery("Select DISTINCT Object(emp) From Employee emp WHERE emp.salary > ABS(:dbl)");
- query.setParameter("dbl", Double.valueOf(1180D));
+ query.setParameter("dbl", 1180D);
query.getResultList();
} finally {
closeEntityManager(em);
@@ -298,8 +298,8 @@
Query query = em
.createQuery("Select Distinct Object(emp) FROM Employee emp WHERE emp.firstname = SUBSTRING(:string, :int1, :int2)");
query.setParameter("string", "moo");
- query.setParameter("int1", Integer.valueOf(1));
- query.setParameter("int2", Integer.valueOf(2));
+ query.setParameter("int1", 1);
+ query.setParameter("int2", 2);
query.getResultList();
} finally {
closeEntityManager(em);
@@ -360,8 +360,8 @@
try {
// this one tests for the IN predicate in combination with two parameters
Query query1 = em.createQuery("select e.id from Employee e where e.id IN (?1, ?2)");
- query1.setParameter(1, Integer.valueOf(1));
- query1.setParameter(2, Integer.valueOf(2));
+ query1.setParameter(1, 1);
+ query1.setParameter(2, 2);
query1.getResultList();
} finally {
closeEntityManager(em);
@@ -452,7 +452,7 @@
Integer surnamesUsed = NUMBER_OF_SURNAMES_USED.get(surname);
query.setParameter(1, surname);
List result = query.getResultList();
- verify(result.size() == surnamesUsed.intValue(), "the number of persons with given name " + surname
+ verify(result.size() == surnamesUsed, "the number of persons with given name " + surname
+ " in the result does not match the number of names used when the entities where created.");
}
} finally {
@@ -472,7 +472,7 @@
Integer givenNamesUsed = NUMBER_OF_GIVEN_NAMES_USED.get(givenName);
query.setParameter(1, givenName);
List result = query.getResultList();
- verify(result.size() == givenNamesUsed.intValue(), "the number of persons with given name " + givenName
+ verify(result.size() == givenNamesUsed, "the number of persons with given name " + givenName
+ " in the result does not match the number of names used when the entities where created.");
}
} finally {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestJoinedInheritance.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestJoinedInheritance.java
index c8dc5e0..d254f48 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestJoinedInheritance.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestJoinedInheritance.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -267,7 +267,7 @@
Iterator iter = result.iterator();
Object obj = iter.next();
verify(obj instanceof Integer, "select item is no Integer (wrong class " + obj.getClass() + ")");
- int id = ((Integer) obj).intValue();
+ int id = (Integer) obj;
verify(id == 1, "wrong employee id " + id + ", 1 is expected");
query = em
.createQuery("select distinct e.id from Employee e join e.checkingAccount c where c.balance = 99 and c.client.creditCardAccounts is not empty");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestNativeQuery.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestNativeQuery.java
index 2ec655e..28f1624 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestNativeQuery.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestNativeQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -50,7 +50,7 @@
env.beginTransaction(em);
Employee knut = new Employee(1, "Knut", "Maier", dep10);
Employee fred = new Employee(2, "Fred", "Schmidt", null);
- Cubicle green = new Cubicle(Integer.valueOf(1), Integer.valueOf(2), "green", knut);
+ Cubicle green = new Cubicle(1, 2, "green", knut);
knut.setCubicle(green);
em.persist(dep10);
em.persist(dep20);
@@ -202,7 +202,7 @@
try {
getEnvironment().beginTransaction(em);
Query query = em.createNativeQuery("select * from TMP_DEP D where D.ID = ?", Department.class);
- query.setParameter(1, Integer.valueOf(10));
+ query.setParameter(1, 10);
List result = query.getResultList();
Iterator iter = result.iterator();
verify(iter.hasNext(), "no results");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java
index 0fddbdb..1f0e325 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java
@@ -45,7 +45,7 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(0));
+ obj = em.find(BasicTypesFieldAccess.class, 0);
} finally {
closeEntityManager(em);
}
@@ -129,7 +129,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primitiveBoolean = ?1 and b.id = ?2")
- .setParameter(1, Boolean.TRUE).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, Boolean.TRUE).setParameter(2, id);
}
@Override
@@ -156,8 +156,8 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primititveByte = ?1 and b.id = ?2")
- .setParameter(1, Byte.valueOf((byte) 17)).setParameter(2, Integer.valueOf(id)).setParameter(2,
- Integer.valueOf(id));
+ .setParameter(1, (byte) 17).setParameter(2, id).setParameter(2,
+ id);
}
};
validatePrimitive(2, validator);
@@ -179,7 +179,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primitiveChar = ?1 and b.id = ?2")
- .setParameter(1, Character.valueOf('A')).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, 'A').setParameter(2, id);
}
};
validatePrimitive(3, validator);
@@ -201,7 +201,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primitiveShort = ?1 and b.id = ?2")
- .setParameter(1, Short.valueOf((short) 19)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, (short) 19).setParameter(2, id);
}
};
validatePrimitive(4, validator);
@@ -223,7 +223,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primitiveInt = ?1 and b.id = ?2")
- .setParameter(1, Integer.valueOf(88)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, 88).setParameter(2, id);
}
};
validatePrimitive(5, validator);
@@ -245,7 +245,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primitiveLong = ?1 and b.id = ?2")
- .setParameter(1, Long.valueOf(88)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, 88L).setParameter(2, id);
}
};
validatePrimitive(6, validator);
@@ -267,7 +267,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primitiveFloat = ?1 and b.id = ?2")
- .setParameter(1, Float.valueOf("88.5")).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, Float.valueOf("88.5")).setParameter(2, id);
}
};
validatePrimitive(7, validator);
@@ -289,7 +289,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.primitiveDouble = ?1 and b.id = ?2")
- .setParameter(1, Double.valueOf(("99.5"))).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, Double.valueOf(("99.5"))).setParameter(2, id);
}
};
validatePrimitive(8, validator);
@@ -307,7 +307,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperBoolean = ?1 and b.id = ?2")
- .setParameter(1, Boolean.TRUE).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, Boolean.TRUE).setParameter(2, id);
}
@Override
@@ -323,7 +323,7 @@
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperByte(Byte.valueOf((byte) 17));
+ obj.setWrapperByte((byte) 17);
}
@Override
@@ -334,7 +334,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperByte = ?1 and b.id = ?2")
- .setParameter(1, Byte.valueOf((byte) 17)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, (byte) 17).setParameter(2, id);
}
};
validateReference(12, validator);
@@ -345,7 +345,7 @@
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperCharacter(Character.valueOf('A'));
+ obj.setWrapperCharacter('A');
}
@Override
@@ -356,7 +356,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperCharacter = ?1 and b.id = ?2")
- .setParameter(1, Character.valueOf('A')).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, 'A').setParameter(2, id);
}
};
validateReference(13, validator);
@@ -367,7 +367,7 @@
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperShort(Short.valueOf((short) 1));
+ obj.setWrapperShort((short) 1);
}
@Override
@@ -378,7 +378,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperShort = ?1 and b.id = ?2")
- .setParameter(1, Short.valueOf((short) 1)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, (short) 1).setParameter(2, id);
}
};
validateReference(14, validator);
@@ -389,7 +389,7 @@
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperInteger(Integer.valueOf(1));
+ obj.setWrapperInteger(1);
}
@Override
@@ -400,7 +400,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperInteger = ?1 and b.id = ?2")
- .setParameter(1, Integer.valueOf(1)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, 1).setParameter(2, id);
}
};
validateReference(15, validator);
@@ -411,7 +411,7 @@
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperLong(Long.valueOf(1));
+ obj.setWrapperLong(1L);
}
@Override
@@ -422,7 +422,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperLong = ?1 and b.id = ?2")
- .setParameter(1, Long.valueOf(1)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, 1L).setParameter(2, id);
}
};
validateReference(16, validator);
@@ -433,7 +433,7 @@
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperDouble(Double.valueOf(1));
+ obj.setWrapperDouble(1.0);
}
@Override
@@ -444,7 +444,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperDouble = ?1 and b.id = ?2")
- .setParameter(1, Double.valueOf(("1"))).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, Double.valueOf(("1"))).setParameter(2, id);
}
};
validateReference(18, validator);
@@ -455,7 +455,7 @@
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperFloat(Float.valueOf(1));
+ obj.setWrapperFloat(1F);
}
@Override
@@ -466,7 +466,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.wrapperFloat = ?1 and b.id = ?2")
- .setParameter(1, Float.valueOf("1")).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, Float.valueOf("1")).setParameter(2, id);
}
};
validateReference(17, validator);
@@ -489,7 +489,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.string2Varchar = ?1 and b.id = ?2")
- .setParameter(1, "VC 1").setParameter(2, Integer.valueOf(id));
+ .setParameter(1, "VC 1").setParameter(2, id);
}
};
validateReference(21, validator);
@@ -532,7 +532,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.bigDecimal = ?1 and b.id = ?2")
- .setParameter(1, new BigDecimal("1.1")).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, new BigDecimal("1.1")).setParameter(2, id);
}
};
validateReference(23, validator);
@@ -554,7 +554,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.bigInteger = ?1 and b.id = ?2")
- .setParameter(1, new BigInteger("11")).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, new BigInteger("11")).setParameter(2, id);
}
};
validateReference(24, validator);
@@ -577,7 +577,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.utilDate = ?1 and b.id = ?2")
- .setParameter(1, new Date(1000), TemporalType.TIMESTAMP).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, new Date(1000), TemporalType.TIMESTAMP).setParameter(2, id);
}
};
validateMutable(31, validator);
@@ -600,7 +600,7 @@
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.utilCalendar = ?1 and b.id = ?2")
.setParameter(1, new GregorianCalendar(2005, 9, 8, 10, 49), TemporalType.TIMESTAMP).setParameter(2,
- Integer.valueOf(id));
+ id);
}
};
validateMutable(32, validator);
@@ -622,7 +622,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.sqlDate = ?1 and b.id = ?2").setParameter(
- 1, java.sql.Date.valueOf("2005-09-08")).setParameter(2, Integer.valueOf(id));
+ 1, java.sql.Date.valueOf("2005-09-08")).setParameter(2, id);
}
};
validateMutable(33, validator);
@@ -644,7 +644,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.sqlTime = ?1 and b.id = ?2").setParameter(
- 1, java.sql.Time.valueOf("10:49:00")).setParameter(2, Integer.valueOf(id));
+ 1, java.sql.Time.valueOf("10:49:00")).setParameter(2, id);
}
};
validateMutable(34, validator);
@@ -666,7 +666,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.sqlTimestamp = ?1 and b.id = ?2")
- .setParameter(1, new java.sql.Timestamp(1000)).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, new java.sql.Timestamp(1000)).setParameter(2, id);
}
};
validateMutable(35, validator);
@@ -691,7 +691,7 @@
public Query createQuery(EntityManager em, int id) {
return em.createQuery(
"select b from BasicTypesFieldAccess b where b.primitiveByteArray2Binary = ?1 and b.id = ?2")
- .setParameter(1, UNCHANGED).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, UNCHANGED).setParameter(2, id);
}
};
validateMutable(41, validator);
@@ -759,7 +759,7 @@
public Query createQuery(EntityManager em, int id) {
return em.createQuery(
"select b from BasicTypesFieldAccess b where b.primitiveCharArray2Varchar = ?1 and b.id = ?2")
- .setParameter(1, UNCHANGED).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, UNCHANGED).setParameter(2, id);
}
};
validateMutable(44, validator);
@@ -789,9 +789,9 @@
@Test
public void testWrapperByteArray2Binary() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7) };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7};
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
@@ -807,7 +807,7 @@
public Query createQuery(EntityManager em, int id) {
return em.createQuery(
"select b from BasicTypesFieldAccess b where b.wrapperByteArray2Binary = ?1 and b.id = ?2")
- .setParameter(1, UNCHANGED).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, UNCHANGED).setParameter(2, id);
}
};
validateMutable(46, validator);
@@ -815,9 +815,9 @@
@Test
public void testWrapperByteArray2Longvarbinary() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7) };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7};
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
@@ -839,9 +839,9 @@
@Test
public void testWrapperByteArray2Blob() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7) };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7};
Validator validator = new Validator() {
@Override
public void set(BasicTypesFieldAccess obj) {
@@ -880,7 +880,7 @@
public Query createQuery(EntityManager em, int id) {
return em.createQuery(
"select b from BasicTypesFieldAccess b where b.wrapperCharacterArray2Varchar = ?1 and b.id = ?2")
- .setParameter(1, UNCHANGED).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, UNCHANGED).setParameter(2, id);
}
};
validateMutable(49, validator);
@@ -943,7 +943,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.enumString = ?1 and b.id = ?2")
- .setParameter(1, UserDefinedEnum.HUGO).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, UserDefinedEnum.HUGO).setParameter(2, id);
}
@Override
@@ -965,7 +965,7 @@
@Override
public Query createQuery(EntityManager em, int id) {
return em.createQuery("select b from BasicTypesFieldAccess b where b.enumOrdinal = ?1 and b.id = ?2")
- .setParameter(1, UserDefinedEnum.HUGO).setParameter(2, Integer.valueOf(id));
+ .setParameter(1, UserDefinedEnum.HUGO).setParameter(2, id);
}
@Override
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java
index 3dcd379..9f1babc 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java
@@ -129,11 +129,11 @@
// test invalid typed ordered param
Query q3 = em.createQuery(queryStringOrderedParam);
- assertOrderedParameterInvalid(q3, 1, Integer.valueOf(2));
+ assertOrderedParameterInvalid(q3, 1, 2);
// test invalid typed named param
Query q4 = em.createQuery(queryStringNamedParam);
- assertNamedParameterInvalid(q4, "firstname", Integer.valueOf(3));
+ assertNamedParameterInvalid(q4, "firstname", 3);
// test invalid named ordered param
Query q5 = em.createQuery(queryStringOrderedParam);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java
index ef792d6..9d2ec60 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java
@@ -46,7 +46,7 @@
env.beginTransaction(em);
em.persist(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(0));
+ obj = em.find(BasicTypesFieldAccess.class, 0);
} finally {
closeEntityManager(em);
}
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSetFunctions.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSetFunctions.java
index 3e62369..595e304 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSetFunctions.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSetFunctions.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -127,7 +127,7 @@
JPAEnvironment env = getEnvironment();
EntityManager em = env.getEntityManager();
try {
- verifyDouble(em, "select avg(e.salary) from Employee e", Double.valueOf(7000));
+ verifyDouble(em, "select avg(e.salary) from Employee e", 7000.0);
} finally {
closeEntityManager(em);
}
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java
index cce5719..5e15e6c 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java
@@ -181,7 +181,7 @@
env.beginTransaction(em);
Project project = new Project(null);
em.persist(project);
- final int projectId = project.getId().intValue();
+ final int projectId = project.getId();
env.commitTransactionAndClear(em);
Query query = em.createQuery("select p from Project p where p.name IS NULL");
List result = query.getResultList();
@@ -189,7 +189,7 @@
Iterator iter = result.iterator();
while (iter.hasNext()) {
project = (Project) iter.next();
- verify(project.getId().intValue() == projectId, "wrong project");
+ verify(project.getId() == projectId, "wrong project");
}
query = em.createQuery("select distinct p from Project p where p.name IS NULL");
result = query.getResultList();
@@ -197,7 +197,7 @@
iter = result.iterator();
while (iter.hasNext()) {
project = (Project) iter.next();
- verify(project.getId().intValue() == projectId, "wrong project");
+ verify(project.getId() == projectId, "wrong project");
}
} finally {
closeEntityManager(em);
@@ -210,11 +210,11 @@
Set<Integer> actual = new HashSet<Integer>();
for (Object object : result) {
BasicTypesFieldAccess fa = (BasicTypesFieldAccess) object;
- actual.add(Integer.valueOf(fa.getId()));
+ actual.add(fa.getId());
}
Set<Integer> expected = new HashSet<Integer>();
for (int i : ids) {
- expected.add(Integer.valueOf(i));
+ expected.add(i);
}
verify(expected.equals(actual), "expecetd and actual sets are different for query >>" + txt + "<<");
}
@@ -456,7 +456,7 @@
try {
Query query = em.createQuery("select d from Department d where d.name = ?1 and d.id = ?2");
query.setParameter(1, "twenty");
- query.setParameter(2, Integer.valueOf(20));
+ query.setParameter(2, 20);
List result = query.getResultList();
Iterator iter = result.iterator();
verify(iter.hasNext(), "row not found");
@@ -469,7 +469,7 @@
verify(entity.equals(dep20), " got wrong department");
verify(!iter.hasNext(), "too many rows");
query.setParameter(1, "ten");
- query.setParameter(2, Integer.valueOf(10));
+ query.setParameter(2, 10);
result = query.getResultList();
iter = result.iterator();
verify(iter.hasNext(), "row not found");
@@ -549,7 +549,7 @@
em.persist(dep10);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- Department dep = em.find(Department.class, Integer.valueOf(10));
+ Department dep = em.find(Department.class, 10);
dep.setName("newName");
em.flush();
Query query = em.createQuery("select d from Department d where d.name = :name");
@@ -677,7 +677,7 @@
query.setFlushMode(flushModeQuery);
}
boolean flushExpected = isFlushExpected(flushModeEM, flushModeQuery);
- Department dep = em.find(Department.class, Integer.valueOf(10));
+ Department dep = em.find(Department.class, 10);
dep.setName("updated");
List result = query.getResultList();
if (flushExpected) {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java
index 689272d..229423c 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java
@@ -47,10 +47,10 @@
public class TestBidirectionalManyToMany extends JPA1Base {
private static final int HANS_ID_VALUE = 1;
- private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE);
+ private static final Integer HANS_ID = HANS_ID_VALUE;
private static final Set<Pair> HANS_SET = new HashSet<Pair>();
private static final int FRED_ID_VALUE = 2;
- private static final Integer FRED_ID = Integer.valueOf(FRED_ID_VALUE);
+ private static final Integer FRED_ID = FRED_ID_VALUE;
private static final Set<Pair> FRED_SET = new HashSet<Pair>();
private static final Set<Pair> SEED_SET = new HashSet<Pair>();
private static final Project PUHLEN = new Project("G\u00fcrteltiere puhlen");
@@ -92,11 +92,11 @@
env.commitTransactionAndClear(em);
HANS_SET.clear();
for (final Project element : hansProjects) {
- HANS_SET.add(new Pair(HANS_ID_VALUE, element.getId().intValue()));
+ HANS_SET.add(new Pair(HANS_ID_VALUE, element.getId()));
}
FRED_SET.clear();
for (final Project element : fredProjects) {
- FRED_SET.add(new Pair(FRED_ID_VALUE, element.getId().intValue()));
+ FRED_SET.add(new Pair(FRED_ID_VALUE, element.getId()));
}
SEED_SET.clear();
SEED_SET.addAll(HANS_SET);
@@ -197,7 +197,7 @@
JPAEnvironment env = getEnvironment();
EntityManager em = env.getEntityManager();
try {
- final int removeId = PUHLEN.getId().intValue();
+ final int removeId = PUHLEN.getId();
env.beginTransaction(em);
Employee emp = em.find(Employee.class, HANS_ID);
verify(emp != null, "employee not found");
@@ -207,7 +207,7 @@
Iterator<Project> iter = projects.iterator();
while (iter.hasNext()) {
Project project = iter.next();
- if (project.getId().intValue() == removeId) {
+ if (project.getId() == removeId) {
Set<Employee> employeesOfProject = project.getEmployees();
employeesOfProject.remove(emp);
em.remove(project);
@@ -243,7 +243,7 @@
JPAEnvironment env = getEnvironment();
EntityManager em = env.getEntityManager();
try {
- final int REMOVE_ID = FALTEN.getId().intValue();
+ final int REMOVE_ID = FALTEN.getId();
env.beginTransaction(em);
Employee emp = em.find(Employee.class, HANS_ID);
verify(emp != null, "employee not found");
@@ -253,7 +253,7 @@
Iterator<Project> iter = projects.iterator();
while (iter.hasNext()) {
Project project = iter.next();
- if (project.getId().intValue() == REMOVE_ID) {
+ if (project.getId() == REMOVE_ID) {
Set<Employee> employeesOfProject = project.getEmployees();
employeesOfProject.remove(emp);
iter.remove();
@@ -288,7 +288,7 @@
Set<Project> projects = emp.getProjects();
Project p6 = new Project("Nasen bohren");
em.persist(p6);
- newId = p6.getId().intValue();
+ newId = p6.getId();
projects.add(p6);
emp.clearPostUpdate();
env.commitTransactionAndClear(em);
@@ -318,13 +318,13 @@
Set<Project> projects = emp.getProjects();
Iterator<Project> iter = projects.iterator();
Project project = iter.next();
- int removedId = project.getId().intValue();
+ int removedId = project.getId();
// there are no managed relationships -> we have to remove the projects on both sides
em.remove(project);
iter.remove();
Project p7 = new Project("Ohren wacklen");
em.persist(p7);
- newId = p7.getId().intValue();
+ newId = p7.getId();
projects.add(p7);
emp.clearPostUpdate();
env.commitTransactionAndClear(em);
@@ -348,7 +348,7 @@
}
private void verifyEmployees(EntityManager em, int id, int size) {
- Project project = em.find(Project.class, Integer.valueOf(id));
+ Project project = em.find(Project.class, id);
verify(project != null, "project not found");
Set<Employee> employees = project.getEmployees();
verify(employees.size() == size, "wrong number of employees: " + employees.size() + " expected: " + size);
@@ -360,9 +360,9 @@
EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- verifyEmployees(em, LINKEN.getId().intValue(), 0);
- verifyEmployees(em, PUHLEN.getId().intValue(), 1);
- verifyEmployees(em, FALTEN.getId().intValue(), 2);
+ verifyEmployees(em, LINKEN.getId(), 0);
+ verifyEmployees(em, PUHLEN.getId(), 1);
+ verifyEmployees(em, FALTEN.getId(), 2);
env.rollbackTransactionAndClear(em);
} finally {
closeEntityManager(em);
@@ -388,7 +388,7 @@
}
checkJoinTable(expected);
env.beginTransaction(em);
- paul = em.find(Employee.class, Integer.valueOf(newId));
+ paul = em.find(Employee.class, newId);
verify(paul.getProjects().size() == HANS_SET.size(), "Paul has wrong number of projects");
env.rollbackTransactionAndClear(em);
} finally {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java
index a9daaad..d3affaf 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java
@@ -33,10 +33,10 @@
private static final int HANS_ID_VALUE = 1;
private static final int FRED_ID_VALUE = 2;
- private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE);
- private static final Integer FRED_ID = Integer.valueOf(FRED_ID_VALUE);
- private static final CubiclePrimaryKeyClass GREEN_CUBICLE_ID = new CubiclePrimaryKeyClass(Integer.valueOf(10), Integer.valueOf(20));
- private static final CubiclePrimaryKeyClass BLUE_CUBICLE_ID = new CubiclePrimaryKeyClass(Integer.valueOf(33), Integer.valueOf(44));
+ private static final Integer HANS_ID = HANS_ID_VALUE;
+ private static final Integer FRED_ID = FRED_ID_VALUE;
+ private static final CubiclePrimaryKeyClass GREEN_CUBICLE_ID = new CubiclePrimaryKeyClass(10, 20);
+ private static final CubiclePrimaryKeyClass BLUE_CUBICLE_ID = new CubiclePrimaryKeyClass(33, 44);
@Before
public void seedDataModel() throws SQLException {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java
index 931c89a..6e445a8 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java
@@ -38,8 +38,8 @@
import org.junit.Test;
public class TestEmployeePatent extends JPA1Base {
- private static final Integer EDISON = Integer.valueOf(26);
- private static final Integer TESLA = Integer.valueOf(32);
+ private static final Integer EDISON = 26;
+ private static final Integer TESLA = 32;
@Override
public void setup() {
@@ -49,8 +49,8 @@
env.beginTransaction(em);
Department dep = new Department(25, "R&D");
em.persist(dep);
- em.persist(new Employee(EDISON.intValue(), "Thomas Alva", "Edison", dep));
- em.persist(new Employee(TESLA.intValue(), "Nikola", "Tesla", dep));
+ em.persist(new Employee(EDISON, "Thomas Alva", "Edison", dep));
+ em.persist(new Employee(TESLA, "Nikola", "Tesla", dep));
for (int i = 0; i < TEST_DATA.length; i++) {
em.persist(TEST_DATA[i]);
}
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java
index a6ad5e7..24c5c4a 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java
@@ -35,7 +35,7 @@
env.beginTransaction(em);
Department dep = new Department(9, "neun");
Employee emp = new Employee(5, "first", "last", dep);
- Cubicle cub = new Cubicle(Integer.valueOf(3), Integer.valueOf(4), "red", emp);
+ Cubicle cub = new Cubicle(3, 4, "red", emp);
emp.setCubicle(cub);
em.persist(dep);
em.persist(emp);
@@ -51,13 +51,13 @@
public void testRelationToCompositeKey() {
final EntityManager em = getEnvironment().getEntityManager();
try {
- Employee employee = em.find(Employee.class, Integer.valueOf(5));
+ Employee employee = em.find(Employee.class, 5);
verify(employee.getId() == 5, "wrong employee");
verify(employee.getCubicle() != null, "cubicle is null");
verify(employee.getCubicle().getFloor() != null, "floor is null");
- verify(employee.getCubicle().getFloor().intValue() == 3, "wrong floor");
+ verify(employee.getCubicle().getFloor() == 3, "wrong floor");
verify(employee.getCubicle().getPlace() != null, "place is null");
- verify(employee.getCubicle().getPlace().intValue() == 4, "wrong place");
+ verify(employee.getCubicle().getPlace() == 4, "wrong place");
verify(employee.getDepartment() != null, "department is null");
verify(employee.getDepartment().getId() == 9, "wrong department");
} finally {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java
index d38cba8..af9f391 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java
@@ -55,11 +55,11 @@
em.persist(_review2);
em.flush();
env.commitTransactionAndClear(em);
- Review rev = em.find(Review.class, Integer.valueOf(12));
+ Review rev = em.find(Review.class, 12);
verify(rev != null, "Review null");
verify(rev.getId() == 12, "wrong review");
env.beginTransaction(em);
- Employee employee = em.find(Employee.class, Integer.valueOf(7));
+ Employee employee = em.find(Employee.class, 7);
verify(employee != null, "employee not found");
Set reviews = employee.getReviews();
verify(reviews.size() == 2, "set has wrong size");
@@ -74,7 +74,7 @@
public void testFindIndividualReview() {
final EntityManager em = getEnvironment().getEntityManager();
try {
- Review rev = em.find(Review.class, Integer.valueOf(12));
+ Review rev = em.find(Review.class, 12);
verify(rev != null, "Review null");
verify(rev.getId() == 12, "wrong review");
} finally {
@@ -88,7 +88,7 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Employee employee = em.find(Employee.class, Integer.valueOf(7));
+ Employee employee = em.find(Employee.class, 7);
verify(employee != null, "employee not found");
Set reviews = employee.getReviews();
verify(reviews.size() == 2, "set has wrong size");
@@ -118,7 +118,7 @@
} else {
failureExpected = true;
}
- Employee employee = em.find(Employee.class, Integer.valueOf(7));
+ Employee employee = em.find(Employee.class, 7);
verify(employee != null, "employee not found");
Set reviews = employee.getReviews();
try {
@@ -142,7 +142,7 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Employee employee = em.find(Employee.class, Integer.valueOf(7));
+ Employee employee = em.find(Employee.class, 7);
verify(employee != null, "employee not found");
employee = AbstractBaseTest.serializeDeserialize(employee);
Set reviews = employee.getReviews();
@@ -167,7 +167,7 @@
final EntityManager em = env.getEntityManager();
try {
env.beginTransaction(em);
- Employee employee = em.find(Employee.class, Integer.valueOf(7));
+ Employee employee = em.find(Employee.class, 7);
verify(employee != null, "employee not found");
Set reviews = employee.getReviews();
// touch the set
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestList.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestList.java
index c86734d..a01a4f5 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestList.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestList.java
@@ -39,8 +39,8 @@
import org.junit.Test;
public class TestList extends JPA1Base {
- private static final Integer EMP_ID_DORIS = Integer.valueOf(43);
- private static final Integer EMP_ID_SABINE = Integer.valueOf(44);
+ private static final Integer EMP_ID_DORIS = 43;
+ private static final Integer EMP_ID_SABINE = 44;
@Override
protected void setup() {
@@ -51,9 +51,9 @@
env.beginTransaction(em);
final Department dep = new Department(1, "Public Relations");
em.persist(dep);
- final Employee emp1 = new Employee(EMP_ID_DORIS.intValue(), "Doris", "Schr\u00f6der-K\u00f6pf", dep);
+ final Employee emp1 = new Employee(EMP_ID_DORIS, "Doris", "Schr\u00f6der-K\u00f6pf", dep);
em.persist(emp1);
- final Employee emp2 = new Employee(EMP_ID_SABINE.intValue(), "Sabine", "Leutheusser-Schnarrenberger", dep);
+ final Employee emp2 = new Employee(EMP_ID_SABINE, "Sabine", "Leutheusser-Schnarrenberger", dep);
em.persist(emp2);
env.commitTransactionAndClear(em);
} finally {
@@ -68,7 +68,7 @@
try {
env.beginTransaction(em);
final Course course = createAndPersistCourse(em);
- final Long courseId = Long.valueOf(course.getCourseId());
+ final Long courseId = course.getCourseId();
env.commitTransactionAndClear(em);
final Course storedCourse = em.find(Course.class, courseId);
verify(storedCourse != null, "didn't find course again");
@@ -76,7 +76,7 @@
verify(storedCourse.getAttendees().size() == 2, "number of attendees in course (expected: 2, got: "
+ storedCourse.getAttendees().size() + ").");
for (final Employee attendee : storedCourse.getAttendees()) {
- verify(attendee.getId() == EMP_ID_DORIS.intValue() || attendee.getId() == EMP_ID_SABINE.intValue(),
+ verify(attendee.getId() == EMP_ID_DORIS || attendee.getId() == EMP_ID_SABINE,
"Wrong attendee: " + attendee);
}
} finally {
@@ -105,7 +105,7 @@
try {
env.beginTransaction(em);
final Course course = createAndPersistCourse(em);
- final Long courseId = Long.valueOf(course.getCourseId());
+ final Long courseId = course.getCourseId();
env.commitTransactionAndClear(em);
env.beginTransaction(em);
em.remove(em.merge(course));
@@ -124,7 +124,7 @@
try {
env.beginTransaction(em);
final Course course = createAndPersistCourse(em);
- final Long courseId = Long.valueOf(course.getCourseId());
+ final Long courseId = course.getCourseId();
env.commitTransactionAndClear(em);
env.beginTransaction(em);
// the remove of Doris takes place on the detached entity: but rather than relying on
@@ -156,7 +156,7 @@
try {
env.beginTransaction(em);
final Course course = createAndPersistCourse(em);
- final Long courseId = Long.valueOf(course.getCourseId());
+ final Long courseId = course.getCourseId();
env.commitTransactionAndClear(em);
env.beginTransaction(em);
// the remove of Doris takes place on the managed entity
@@ -183,7 +183,7 @@
try {
env.beginTransaction(em);
final Course course = createAndPersistCourse(em);
- final Long courseId = Long.valueOf(course.getCourseId());
+ final Long courseId = course.getCourseId();
final Employee employee1 = em.find(Employee.class, EMP_ID_DORIS);
attendeeMap.put(employee1.getLastName(), employee1);
final Employee employee2 = em.find(Employee.class, EMP_ID_SABINE);
@@ -214,7 +214,7 @@
try {
env.beginTransaction(em);
final Course course = createAndPersistCourse(em);
- final Long courseId = Long.valueOf(course.getCourseId());
+ final Long courseId = course.getCourseId();
env.commitTransactionAndClear(em);
env.beginTransaction(em);
final Course storedCourse = em.find(Course.class, courseId);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMap.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMap.java
index 9bde4a1..e8c204d 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMap.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -33,12 +33,12 @@
@Test
@Bugzilla(bugid=300485)
public void testEmptyOffice() {
- final Integer officeId = Integer.valueOf(1);
+ final Integer officeId = 1;
final EntityManager em = getEnvironment().getEntityManager();
try {
getEnvironment().beginTransaction(em);
final Office office = new Office();
- office.setId(officeId.intValue());
+ office.setId(officeId);
office.setCapacity(10);
em.persist(office);
getEnvironment().commitTransactionAndClear(em);
@@ -59,12 +59,12 @@
@Test
@Bugzilla(bugid=300485)
public void testOffice() {
- final Integer officeId = Integer.valueOf(2);
+ final Integer officeId = 2;
final EntityManager em = getEnvironment().getEntityManager();
try {
getEnvironment().beginTransaction(em);
final Office office = new Office();
- office.setId(officeId.intValue());
+ office.setId(officeId);
office.setCapacity(10);
em.persist(office);
final Department department = new Department(1, "R&D");
@@ -73,7 +73,7 @@
for (int place = 10; place < 13; place++) {
final Employee employee = new Employee(floor * 3 + place, "first", "last", department);
em.persist(employee);
- final Cubicle cubicle = new Cubicle(Integer.valueOf(floor), Integer.valueOf(place), "green", employee);
+ final Cubicle cubicle = new Cubicle(floor, place, "green", employee);
employee.setCubicle(cubicle);
em.persist(cubicle);
office.addCubicle(cubicle);
@@ -89,7 +89,7 @@
verify(10 <= employee.getId() && employee.getId() < 20, "Strangers in cubicles");
}
for (int place = 10; place < 13; place++) {
- final CubiclePrimaryKeyClass testKey = new CubiclePrimaryKeyClass(Integer.valueOf(2), Integer.valueOf(place));
+ final CubiclePrimaryKeyClass testKey = new CubiclePrimaryKeyClass(2, place);
final Cubicle cubicle = storedOffice.getCubicles().get(testKey);
final Employee employee = cubicle.getEmployee();
verify(employee.getId() == place + 6, "Wrong occupant of cubicle with id (floor: " + cubicle.getFloor()
@@ -104,12 +104,12 @@
@Test
public void testColorOffice() {
final String[] colors = new String[] { "red", "green", "blue" };
- final Integer officeId = Integer.valueOf(3);
+ final Integer officeId = 3;
final EntityManager em = getEnvironment().getEntityManager();
try {
getEnvironment().beginTransaction(em);
final UniqueColorOffice office = new UniqueColorOffice();
- office.setId(officeId.intValue());
+ office.setId(officeId);
office.setCapacity(5);
em.persist(office);
final Department department = new Department(2, "HR");
@@ -120,7 +120,7 @@
final int emplyoeeId = 100 + i;
final Employee employee = new Employee(emplyoeeId, "first", "last", department);
em.persist(employee);
- final Cubicle cubicle = new Cubicle(Integer.valueOf(floor), Integer.valueOf(place), colors[i], employee);
+ final Cubicle cubicle = new Cubicle(floor, place, colors[i], employee);
employee.setCubicle(cubicle);
em.persist(cubicle);
office.addCubicle(cubicle);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java
index 01258af..2948c15 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java
@@ -37,7 +37,7 @@
public class TestMultipleRelationships extends JPA1Base {
private static final int HANS_ID_VALUE = 1;
private static final int FRED_ID_VALUE = 2;
- private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE);
+ private static final Integer HANS_ID = HANS_ID_VALUE;
private static final Project PUHLEN = new Project("G\u00fcrteltiere puhlen");
private static final Project PINSELN = new Project("B\u00e4uche pinseln");
private static final Project FALTEN = new Project("Zitronen falten");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java
index 3fb868d..a2644cb 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java
@@ -41,7 +41,7 @@
em.persist(root);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- Node found = em.find(Node.class, Integer.valueOf(rootId));
+ Node found = em.find(Node.class, rootId);
verify(found != null, "no node found");
verify(found.getParent() == null, "parent not null");
verify(found.getChildren().size() == 0, "unexpected children");
@@ -67,13 +67,13 @@
em.persist(child2);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- Node found = em.find(Node.class, Integer.valueOf(rootId));
+ Node found = em.find(Node.class, rootId);
verify(found != null, "no node found");
verify(found.getParent() == null, "parent not null");
verify(found.getChildren().size() == 2, "unexpected children");
env.rollbackTransactionAndClear(em);
env.beginTransaction(em);
- found = em.find(Node.class, Integer.valueOf(child1Id));
+ found = em.find(Node.class, child1Id);
verify(found != null, "no node found");
Node parent = found.getParent();
verify(em.contains(parent), "parent not contained in em");
@@ -106,9 +106,9 @@
env.commitTransactionAndClear(em);
// change the parent
env.beginTransaction(em);
- child = em.find(Node.class, Integer.valueOf(childId));
+ child = em.find(Node.class, childId);
Node parent = child.getParent();
- root2 = em.find(Node.class, Integer.valueOf(root2Id));
+ root2 = em.find(Node.class, root2Id);
Set<Node> children = parent.getChildren();
parent.setChildren(null);
child.setParent(root2);
@@ -119,16 +119,16 @@
verify(child.postUpdateWasCalled(), "child was not updated but it is the owning side of the relationship");
// check the relationship
env.beginTransaction(em);
- child = em.find(Node.class, Integer.valueOf(childId));
+ child = em.find(Node.class, childId);
verify(child != null, "child is null");
parent = child.getParent();
verify(parent != null, "parent is null");
- root2 = em.find(Node.class, Integer.valueOf(root2Id));
+ root2 = em.find(Node.class, root2Id);
verify(root2 == parent, "root2 != parent");
verify(children != null, "children is null");
children = root2.getChildren();
verify(children.contains(child), "child not contained in set of children");
- root1 = em.find(Node.class, Integer.valueOf(root1Id));
+ root1 = em.find(Node.class, root1Id);
Set children1 = root1.getChildren();
verify(children1 == null || children1.isEmpty(), "children of root1 not null or empty");
env.rollbackTransactionAndClear(em);
@@ -153,7 +153,7 @@
em.persist(root);
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- Node found = em.find(Node.class, Integer.valueOf(rootId));
+ Node found = em.find(Node.class, rootId);
verify(found != null, "no node found");
verify(found.getParent() == found, "parent != root");
verify(found.getChildren().size() == 1, "unexpected children");
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestPatentReview.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestPatentReview.java
index c99196b..f9998d0 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestPatentReview.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestPatentReview.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015 SAP. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -47,7 +47,7 @@
em.persist(patent);
em.persist(patentReview);
env.commitTransactionAndClear(em);
- Object found = em.find(PatentReview.class, Integer.valueOf(17));
+ Object found = em.find(PatentReview.class, 17);
verify(found != null, "nothing found");
verify(found instanceof PatentReview, "wrong instance: " + found.getClass().getName());
PatentReview review = (PatentReview) found;
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java
index 3e71c34..037acbe 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java
@@ -40,7 +40,7 @@
public class TestUnidirectionalOneToMany extends JPA1Base {
private static final int EMP_ID_VALUE = 4;
- private static final Integer EMP_ID = Integer.valueOf(EMP_ID_VALUE);
+ private static final Integer EMP_ID = EMP_ID_VALUE;
private static final Set<Pair> SEED_SET = new HashSet<Pair>();
static {
SEED_SET.add(new Pair(EMP_ID_VALUE, 1));
@@ -179,7 +179,7 @@
emp = em.find(Employee.class, EMP_ID);
reviews = emp.getReviews();
verify(reviews.size() == 2, "not exactly 2 reviews but " + reviews.size());
- Object object = em.find(Review.class, Integer.valueOf(removedId));
+ Object object = em.find(Review.class, removedId);
verify(object == null, "review found");
env.rollbackTransactionAndClear(em);
} finally {
@@ -273,7 +273,7 @@
expected.add(new Pair(newId, 3));
checkJoinTable(expected);
env.beginTransaction(em);
- emp = em.find(Employee.class, Integer.valueOf(newId));
+ emp = em.find(Employee.class, newId);
reviews = emp.getReviews();
verify(reviews.size() == 3, "not exactly 3 reviews but " + reviews.size());
env.rollbackTransactionAndClear(em);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java
index 53fe519..79e82a7 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java
@@ -32,8 +32,8 @@
public class TestUnidirectionalOneToOne extends JPA1Base {
private static final int HANS_ID_VALUE = 1;
private static final int FRED_ID_VALUE = 2;
- private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE);
- private static final Integer FRED_ID = Integer.valueOf(FRED_ID_VALUE);
+ private static final Integer HANS_ID = HANS_ID_VALUE;
+ private static final Integer FRED_ID = FRED_ID_VALUE;
private static final byte[] SMOKER_GUID = new byte[16];
private static final byte[] NON_SMOKER_GUID = new byte[16];
static {
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/BufferReadTest.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/BufferReadTest.java
index a2c5b24..11f827c 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/BufferReadTest.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/BufferReadTest.java
@@ -36,8 +36,8 @@
public class BufferReadTest extends JPA1Base {
private static final long SECONDS = 0;
- private static final Integer KEY = Integer.valueOf(1);
- private static final Integer MISS = Integer.valueOf(2);
+ private static final Integer KEY = 1;
+ private static final Integer MISS = 2;
private static final boolean PRINTLN = false;
private EntityManager em;
@@ -132,7 +132,7 @@
@Override
public void prepare() {
query = em.createQuery("select d from Department d where d.id = ?1");
- query.setParameter(1, Integer.valueOf(1));
+ query.setParameter(1, 1);
query.getSingleResult();
}
@@ -165,7 +165,7 @@
public void prepare() {
getEnvironment().beginTransaction(myEm);
query = myEm.createQuery("select d from Department d where d.id = ?1");
- query.setParameter(1, Integer.valueOf(1));
+ query.setParameter(1, 1);
}
@Override
@@ -199,7 +199,7 @@
getEnvironment().beginTransaction(myEm);
query = myEm
.createQuery("select new org.eclipse.persistence.testing.models.wdf.jpa1.employee.Department(d.id, d.name) from Department d where d.id = ?1");
- query.setParameter(1, Integer.valueOf(1));
+ query.setParameter(1, 1);
}
@Override
@@ -220,7 +220,7 @@
public void run() {
em.clear();
Query query = em.createNamedQuery("getDepartmentById");
- query.setParameter(1, Integer.valueOf(1));
+ query.setParameter(1, 1);
query.getSingleResult();
}
@@ -262,7 +262,7 @@
public void prepare() {
getEnvironment().beginTransaction(myEm);
query = myEm.createNamedQuery("getDepartmentById");
- query.setParameter(1, Integer.valueOf(1));
+ query.setParameter(1, 1);
}
@Override
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java
index cd665bf..55f065e 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java
@@ -47,21 +47,21 @@
em.flush();
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- dep = em.find(Department.class, Integer.valueOf(8));
+ dep = em.find(Department.class, 8);
verify(dep != null, "department is null");
- Department dep2 = em.find(Department.class, Integer.valueOf(8));
+ Department dep2 = em.find(Department.class, 8);
verify(dep == dep2, "department is not unique");
- emp = em.find(Employee.class, Integer.valueOf(3));
+ emp = em.find(Employee.class, 3);
verify(emp != null, "employee is null");
- Employee emp2 = em.find(Employee.class, Integer.valueOf(3));
+ Employee emp2 = em.find(Employee.class, 3);
verify(emp == emp2, "employee is not unique");
emp.setLastName(HASTIG);
dep.setName("88888888");
em.flush();
env.commitTransactionAndClear(em);
env.beginTransaction(em);
- emp = em.find(Employee.class, Integer.valueOf(3));
- dep = em.find(Department.class, Integer.valueOf(8));
+ emp = em.find(Employee.class, 3);
+ dep = em.find(Department.class, 8);
verify(emp != null, "employee is null");
verify(HASTIG.equals(emp.getLastName()), "employee has wrong last name: " + emp.getLastName());
em.remove(emp);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java
index fb49e6c..5424056 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java
@@ -51,7 +51,7 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(0));
+ obj = em.find(BasicTypesFieldAccess.class, 0);
} finally {
closeEntityManager(em);
}
@@ -68,24 +68,24 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// update unchanged object
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
env.commitTransactionAndClear(em);
verify(!obj.postUpdateWasCalled(), "postUpdate was called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " is changed");
// update changed object
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.change(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isChanged(obj), fieldName + " is unchanged");
} finally {
closeEntityManager(em);
@@ -101,11 +101,11 @@
env.beginTransaction(em);
em.persist(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
// delete the object again
env.beginTransaction(em);
- em.remove(em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)));
+ em.remove(em.find(BasicTypesFieldAccess.class, id));
env.commitTransactionAndClear(em);
// insert object with non-null field
env.beginTransaction(em);
@@ -113,33 +113,33 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// update unchanged
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
env.commitTransactionAndClear(em);
verify(!obj.postUpdateWasCalled(), "postUpdate was called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " is changed");
// update changed object
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.change(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isChanged(obj), fieldName + " is unchanged");
// update to null
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
} finally {
closeEntityManager(em);
@@ -155,11 +155,11 @@
env.beginTransaction(em);
em.persist(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
// delete the object again
env.beginTransaction(em);
- em.remove(em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)));
+ em.remove(em.find(BasicTypesFieldAccess.class, id));
env.commitTransactionAndClear(em);
// insert object with non-null field
env.beginTransaction(em);
@@ -167,49 +167,49 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// update unchanged
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
env.commitTransactionAndClear(em);
verify(!obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " is changed");
// update changed
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
// update original
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
validator.set(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// mutate
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.mutate(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isChanged(obj), fieldName + " not mutated");
// update to null
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
} finally {
closeEntityManager(em);
@@ -422,12 +422,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperByte(Byte.valueOf((byte) 17));
+ obj.setWrapperByte((byte) 17);
}
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperByte(Byte.valueOf((byte) 18));
+ obj.setWrapperByte((byte) 18);
}
@Override
@@ -442,7 +442,7 @@
@Override
public boolean isChanged(BasicTypesFieldAccess obj) {
- return !obj.getWrapperByte().equals(Byte.valueOf((byte) 17));
+ return !obj.getWrapperByte().equals((byte) 17);
}
};
validateReference(12, validator, "wrapperByte");
@@ -453,12 +453,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperCharacter(Character.valueOf('A'));
+ obj.setWrapperCharacter('A');
}
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperCharacter(Character.valueOf('B'));
+ obj.setWrapperCharacter('B');
}
@Override
@@ -473,7 +473,7 @@
@Override
public boolean isChanged(BasicTypesFieldAccess obj) {
- return !obj.getWrapperCharacter().equals(Character.valueOf('A'));
+ return !obj.getWrapperCharacter().equals('A');
}
};
validateReference(13, validator, "wrapperCharacter");
@@ -484,12 +484,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperShort(Short.valueOf((short) 1));
+ obj.setWrapperShort((short) 1);
}
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperShort(Short.valueOf((short) 2));
+ obj.setWrapperShort((short) 2);
}
@Override
@@ -504,7 +504,7 @@
@Override
public boolean isChanged(BasicTypesFieldAccess obj) {
- return !obj.getWrapperShort().equals(Short.valueOf((short) 1));
+ return !obj.getWrapperShort().equals((short) 1);
}
};
validateReference(14, validator, "wrapperShort");
@@ -515,12 +515,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperInteger(Integer.valueOf(1));
+ obj.setWrapperInteger(1);
}
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperInteger(Integer.valueOf(2));
+ obj.setWrapperInteger(2);
}
@Override
@@ -535,7 +535,7 @@
@Override
public boolean isChanged(BasicTypesFieldAccess obj) {
- return !obj.getWrapperInteger().equals(Integer.valueOf(1));
+ return !obj.getWrapperInteger().equals(1);
}
};
validateReference(15, validator, "wrapperInteger");
@@ -546,12 +546,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperLong(Long.valueOf(1));
+ obj.setWrapperLong(1L);
}
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperLong(Long.valueOf(2));
+ obj.setWrapperLong(2L);
}
@Override
@@ -566,7 +566,7 @@
@Override
public boolean isChanged(BasicTypesFieldAccess obj) {
- return !obj.getWrapperLong().equals(Long.valueOf(1));
+ return !obj.getWrapperLong().equals(1L);
}
};
validateReference(16, validator, "wrapperLong");
@@ -577,12 +577,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperDouble(Double.valueOf(1));
+ obj.setWrapperDouble(1.0);
}
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperDouble(Double.valueOf(2));
+ obj.setWrapperDouble(2.0);
}
@Override
@@ -597,7 +597,7 @@
@Override
public boolean isChanged(BasicTypesFieldAccess obj) {
- return !obj.getWrapperDouble().equals(Double.valueOf(1));
+ return !obj.getWrapperDouble().equals(1.0);
}
};
validateReference(18, validator, "wrapperDouble");
@@ -608,12 +608,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
- obj.setWrapperFloat(Float.valueOf(1));
+ obj.setWrapperFloat(1F);
}
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperFloat(Float.valueOf(2));
+ obj.setWrapperFloat(2F);
}
@Override
@@ -628,7 +628,7 @@
@Override
public boolean isChanged(BasicTypesFieldAccess obj) {
- return !obj.getWrapperFloat().equals(Float.valueOf(1));
+ return !obj.getWrapperFloat().equals(1F);
}
};
validateReference(17, validator, "wrapperFloat");
@@ -1129,9 +1129,9 @@
@Test
public void testWrapperByteArray2Binary() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7) };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7};
MutableValidator validator = new MutableValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
@@ -1140,9 +1140,9 @@
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperByteArray2Binary(new Byte[] { Byte.valueOf((byte) 8), Byte.valueOf((byte) 1),
- Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5),
- Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) });
+ obj.setWrapperByteArray2Binary(new Byte[] {(byte) 8, (byte) 1,
+ (byte) 2, (byte) 3, (byte) 4, (byte) 5,
+ (byte) 6, (byte) 7});
}
@Override
@@ -1162,7 +1162,7 @@
@Override
public void mutate(BasicTypesFieldAccess obj) {
- obj.getWrapperByteArray2Binary()[0] = Byte.valueOf((byte) 8);
+ obj.getWrapperByteArray2Binary()[0] = (byte) 8;
}
};
validateMutable(46, validator, "wrapperByteArray2Binary");
@@ -1170,9 +1170,9 @@
@Test
public void testWrapperByteArray2Longvarbinary() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7) };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7};
MutableValidator validator = new MutableValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
@@ -1181,9 +1181,9 @@
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperByteArray2Longvarbinary(new Byte[] { Byte.valueOf((byte) 8), Byte.valueOf((byte) 1),
- Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5),
- Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) });
+ obj.setWrapperByteArray2Longvarbinary(new Byte[] {(byte) 8, (byte) 1,
+ (byte) 2, (byte) 3, (byte) 4, (byte) 5,
+ (byte) 6, (byte) 7});
}
@Override
@@ -1203,7 +1203,7 @@
@Override
public void mutate(BasicTypesFieldAccess obj) {
- obj.getWrapperByteArray2Longvarbinary()[0] = Byte.valueOf((byte) 8);
+ obj.getWrapperByteArray2Longvarbinary()[0] = (byte) 8;
}
};
validateMutable(47, validator, "wrapperByteArray2Longvarbinary");
@@ -1211,9 +1211,9 @@
@Test
public void testWrapperByteArray2Blob() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7) };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7};
MutableValidator validator = new MutableValidator() {
@Override
public void set(BasicTypesFieldAccess obj) {
@@ -1222,9 +1222,9 @@
@Override
public void change(BasicTypesFieldAccess obj) {
- obj.setWrapperByteArray2Blob(new Byte[] { Byte.valueOf((byte) 8), Byte.valueOf((byte) 1),
- Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5),
- Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) });
+ obj.setWrapperByteArray2Blob(new Byte[] {(byte) 8, (byte) 1,
+ (byte) 2, (byte) 3, (byte) 4, (byte) 5,
+ (byte) 6, (byte) 7});
}
@Override
@@ -1244,7 +1244,7 @@
@Override
public void mutate(BasicTypesFieldAccess obj) {
- obj.getWrapperByteArray2Blob()[0] = Byte.valueOf((byte) 8);
+ obj.getWrapperByteArray2Blob()[0] = (byte) 8;
}
};
validateMutable(48, validator, "wrapperByteArray2Blob");
@@ -1455,7 +1455,7 @@
con.close();
}
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(7777));
+ obj = em.find(BasicTypesFieldAccess.class, 7777);
flop("missing Exception");
} catch (PersistenceException iae) {
// $JL-EXC$ expected behavior
@@ -1493,7 +1493,7 @@
con.close();
}
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(7778));
+ obj = em.find(BasicTypesFieldAccess.class, 7778);
flop("missing exception");
} catch (PersistenceException iae) {
// $JL-EXC$ expected behavior
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java
index 2d4921d..938795f 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java
@@ -51,7 +51,7 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(0));
+ obj = em.find(BasicTypesPropertyAccess.class, 0);
} finally {
closeEntityManager(em);
}
@@ -68,24 +68,24 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// update unchanged object
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
env.commitTransactionAndClear(em);
verify(!obj.postUpdateWasCalled(), "postUpdate was called -> before image fails");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " is changed");
// update changed object
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
validator.change(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called -> before image fails");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isChanged(obj), fieldName + " is unchanged");
} finally {
closeEntityManager(em);
@@ -101,11 +101,11 @@
env.beginTransaction(em);
em.persist(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
// delete the object again
env.beginTransaction(em);
- em.remove(em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)));
+ em.remove(em.find(BasicTypesPropertyAccess.class, id));
env.commitTransactionAndClear(em);
// insert object with non-null field
env.beginTransaction(em);
@@ -113,33 +113,33 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// update unchanged
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
env.commitTransactionAndClear(em);
verify(!obj.postUpdateWasCalled(), "postUpdate was called");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " is changed");
// update changed object
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
validator.change(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isChanged(obj), fieldName + " is unchanged");
// update to null
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
} finally {
closeEntityManager(em);
@@ -155,11 +155,11 @@
env.beginTransaction(em);
em.persist(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
// delete the object again
env.beginTransaction(em);
- em.remove(em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)));
+ em.remove(em.find(BasicTypesPropertyAccess.class, id));
env.commitTransactionAndClear(em);
// insert object with non-null field
env.beginTransaction(em);
@@ -167,49 +167,49 @@
em.persist(obj);
env.commitTransactionAndClear(em);
verify(true, "no Exception");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// update unchanged
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
env.commitTransactionAndClear(em);
verify(!obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " is changed");
// update changed
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
// update original
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
validator.set(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(!validator.isChanged(obj), fieldName + " not persisted");
// mutate
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
validator.mutate(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isChanged(obj), fieldName + " not mutated");
// update to null
env.beginTransaction(em);
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
verify(obj.postUpdateWasCalled(), "postUpdate was not called");
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesPropertyAccess.class, id);
verify(validator.isNull(obj), fieldName + " is not null");
} finally {
closeEntityManager(em);
@@ -422,12 +422,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
- obj.setWrapperByte(Byte.valueOf((byte) 17));
+ obj.setWrapperByte((byte) 17);
}
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperByte(Byte.valueOf((byte) 18));
+ obj.setWrapperByte((byte) 18);
}
@Override
@@ -442,7 +442,7 @@
@Override
public boolean isChanged(BasicTypesPropertyAccess obj) {
- return !obj.getWrapperByte().equals(Byte.valueOf((byte) 17));
+ return !obj.getWrapperByte().equals((byte) 17);
}
};
validateReference(12, validator, "wrapperByte");
@@ -453,12 +453,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
- obj.setWrapperCharacter(Character.valueOf('A'));
+ obj.setWrapperCharacter('A');
}
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperCharacter(Character.valueOf('B'));
+ obj.setWrapperCharacter('B');
}
@Override
@@ -473,7 +473,7 @@
@Override
public boolean isChanged(BasicTypesPropertyAccess obj) {
- return !obj.getWrapperCharacter().equals(Character.valueOf('A'));
+ return !obj.getWrapperCharacter().equals('A');
}
};
validateReference(13, validator, "wrapperCharacter");
@@ -484,12 +484,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
- obj.setWrapperShort(Short.valueOf((short) 1));
+ obj.setWrapperShort((short) 1);
}
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperShort(Short.valueOf((short) 2));
+ obj.setWrapperShort((short) 2);
}
@Override
@@ -504,7 +504,7 @@
@Override
public boolean isChanged(BasicTypesPropertyAccess obj) {
- return !obj.getWrapperShort().equals(Short.valueOf((short) 1));
+ return !obj.getWrapperShort().equals((short) 1);
}
};
validateReference(14, validator, "wrapperShort");
@@ -515,12 +515,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
- obj.setWrapperInteger(Integer.valueOf(1));
+ obj.setWrapperInteger(1);
}
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperInteger(Integer.valueOf(2));
+ obj.setWrapperInteger(2);
}
@Override
@@ -535,7 +535,7 @@
@Override
public boolean isChanged(BasicTypesPropertyAccess obj) {
- return !obj.getWrapperInteger().equals(Integer.valueOf(1));
+ return !obj.getWrapperInteger().equals(1);
}
};
validateReference(15, validator, "wrapperInteger");
@@ -546,12 +546,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
- obj.setWrapperLong(Long.valueOf(1));
+ obj.setWrapperLong(1L);
}
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperLong(Long.valueOf(2));
+ obj.setWrapperLong(2L);
}
@Override
@@ -566,7 +566,7 @@
@Override
public boolean isChanged(BasicTypesPropertyAccess obj) {
- return !obj.getWrapperLong().equals(Long.valueOf(1));
+ return !obj.getWrapperLong().equals(1L);
}
};
validateReference(16, validator, "wrapperLong");
@@ -577,12 +577,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
- obj.setWrapperDouble(Double.valueOf(1));
+ obj.setWrapperDouble(1.0);
}
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperDouble(Double.valueOf(2));
+ obj.setWrapperDouble(2.0);
}
@Override
@@ -597,7 +597,7 @@
@Override
public boolean isChanged(BasicTypesPropertyAccess obj) {
- return !obj.getWrapperDouble().equals(Double.valueOf(1));
+ return !obj.getWrapperDouble().equals(1.0);
}
};
validateReference(18, validator, "wrapperDouble");
@@ -608,12 +608,12 @@
ReferenceValidator validator = new ReferenceValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
- obj.setWrapperFloat(Float.valueOf(1));
+ obj.setWrapperFloat(1F);
}
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperFloat(Float.valueOf(2));
+ obj.setWrapperFloat(2F);
}
@Override
@@ -628,7 +628,7 @@
@Override
public boolean isChanged(BasicTypesPropertyAccess obj) {
- return !obj.getWrapperFloat().equals(Float.valueOf(1));
+ return !obj.getWrapperFloat().equals(1F);
}
};
validateReference(17, validator, "wrapperFloat");
@@ -1129,9 +1129,9 @@
@Test
public void testWrapperByteArray2Binary() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7), };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7, };
MutableValidator validator = new MutableValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
@@ -1140,9 +1140,9 @@
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperByteArray2Binary(new Byte[] { Byte.valueOf((byte) 8), Byte.valueOf((byte) 1),
- Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5),
- Byte.valueOf((byte) 6), Byte.valueOf((byte) 7), });
+ obj.setWrapperByteArray2Binary(new Byte[] {(byte) 8, (byte) 1,
+ (byte) 2, (byte) 3, (byte) 4, (byte) 5,
+ (byte) 6, (byte) 7, });
}
@Override
@@ -1162,7 +1162,7 @@
@Override
public void mutate(BasicTypesPropertyAccess obj) {
- obj.getWrapperByteArray2Binary()[0] = Byte.valueOf((byte) 8);
+ obj.getWrapperByteArray2Binary()[0] = (byte) 8;
}
};
validateMutable(46, validator, "wrapperByteArray2Binary");
@@ -1170,9 +1170,9 @@
@Test
public void testWrapperByteArray2Longvarbinary() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7), };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7, };
MutableValidator validator = new MutableValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
@@ -1181,9 +1181,9 @@
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperByteArray2Longvarbinary(new Byte[] { Byte.valueOf((byte) 8), Byte.valueOf((byte) 1),
- Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5),
- Byte.valueOf((byte) 6), Byte.valueOf((byte) 7), });
+ obj.setWrapperByteArray2Longvarbinary(new Byte[] {(byte) 8, (byte) 1,
+ (byte) 2, (byte) 3, (byte) 4, (byte) 5,
+ (byte) 6, (byte) 7, });
}
@Override
@@ -1203,7 +1203,7 @@
@Override
public void mutate(BasicTypesPropertyAccess obj) {
- obj.getWrapperByteArray2Longvarbinary()[0] = Byte.valueOf((byte) 8);
+ obj.getWrapperByteArray2Longvarbinary()[0] = (byte) 8;
}
};
validateMutable(47, validator, "wrapperByteArray2Longvarbinary");
@@ -1211,9 +1211,9 @@
@Test
public void testWrapperByteArray2Blob() {
- final Byte[] UNCHANGED = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2),
- Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6),
- Byte.valueOf((byte) 7), };
+ final Byte[] UNCHANGED = new Byte[] {(byte) 0, (byte) 1, (byte) 2,
+ (byte) 3, (byte) 4, (byte) 5, (byte) 6,
+ (byte) 7, };
MutableValidator validator = new MutableValidator() {
@Override
public void set(BasicTypesPropertyAccess obj) {
@@ -1222,9 +1222,9 @@
@Override
public void change(BasicTypesPropertyAccess obj) {
- obj.setWrapperByteArray2Blob(new Byte[] { Byte.valueOf((byte) 8), Byte.valueOf((byte) 1),
- Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), Byte.valueOf((byte) 4), Byte.valueOf((byte) 5),
- Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) });
+ obj.setWrapperByteArray2Blob(new Byte[] {(byte) 8, (byte) 1,
+ (byte) 2, (byte) 3, (byte) 4, (byte) 5,
+ (byte) 6, (byte) 7});
}
@Override
@@ -1244,7 +1244,7 @@
@Override
public void mutate(BasicTypesPropertyAccess obj) {
- obj.getWrapperByteArray2Blob()[0] = Byte.valueOf((byte) 8);
+ obj.getWrapperByteArray2Blob()[0] = (byte) 8;
}
};
validateMutable(48, validator, "wrapperByteArray2Blob");
@@ -1455,7 +1455,7 @@
con.close();
}
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(8888));
+ obj = em.find(BasicTypesPropertyAccess.class, 8888);
flop("missing exception");
} catch (PersistenceException iae) {
// $JL-EXC$ expected behavior
@@ -1493,7 +1493,7 @@
con.close();
}
- obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(8889));
+ obj = em.find(BasicTypesPropertyAccess.class, 8889);
flop("missing exception");
} catch (PersistenceException iae) {
// $JL-EXC$ expected behavior
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java
index 31e51e17..b11b6ed 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java
@@ -36,9 +36,9 @@
final JPAEnvironment env = getEnvironment();
final EntityManager em = env.getEntityManager();
try {
- final Integer employeeId = Integer.valueOf(25);
+ final Integer employeeId = 25;
final Department department = new Department(9, "R&D");
- final Employee employee = new Employee(employeeId.intValue(), "Emil", "Bahr", department);
+ final Employee employee = new Employee(employeeId, "Emil", "Bahr", department);
final EmploymentPeriod period = new EmploymentPeriod();
final Date startDate = new Date((System.currentTimeMillis() / MYSQL_TIMESTAMP_PRECISION)
* MYSQL_TIMESTAMP_PRECISION);
@@ -70,9 +70,9 @@
final JPAEnvironment env = getEnvironment();
final EntityManager em = env.getEntityManager();
try {
- final Integer employeeId = Integer.valueOf(26);
+ final Integer employeeId = 26;
final Department department = new Department(10, "R&D");
- final Employee employee = new Employee(employeeId.intValue(), "Emil", "Bahr", department);
+ final Employee employee = new Employee(employeeId, "Emil", "Bahr", department);
env.beginTransaction(em);
em.persist(department);
em.persist(employee);
@@ -108,9 +108,9 @@
final JPAEnvironment env = getEnvironment();
final EntityManager em = env.getEntityManager();
try {
- final Integer employeeId = Integer.valueOf(27);
+ final Integer employeeId = 27;
final Department department = new Department(11, "R&D");
- final Employee employee = new Employee(employeeId.intValue(), "Emil", "Bahr", department);
+ final Employee employee = new Employee(employeeId, "Emil", "Bahr", department);
final EmploymentPeriod period = new EmploymentPeriod();
final Date startDate = new Date((System.currentTimeMillis() / MYSQL_TIMESTAMP_PRECISION)
* MYSQL_TIMESTAMP_PRECISION);
diff --git a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java
index 49e6e55..8e4b8cd 100644
--- a/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java
+++ b/jpa/eclipselink.jpa.wdf.test/src/it/java/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java
@@ -47,60 +47,60 @@
env.beginTransaction(em);
em.persist(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
Assert.assertTrue(fieldName + " is not null", validator.isNull(obj));
// delete the object again
env.beginTransaction(em);
- em.remove(em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)));
+ em.remove(em.find(BasicTypesFieldAccess.class, id));
env.commitTransactionAndClear(em);
// insert object with non-null field
env.beginTransaction(em);
validator.set(obj);
em.persist(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
Assert.assertTrue(fieldName + " not persisted", !validator.isChanged(obj));
// update unchanged
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
env.commitTransactionAndClear(em);
Assert.assertTrue("postUpdate was not called", !obj.postUpdateWasCalled());
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
Assert.assertTrue(fieldName + " is changed", !validator.isChanged(obj));
// update changed
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
Assert.assertTrue("postUpdate was not called", obj.postUpdateWasCalled());
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
Assert.assertTrue(fieldName + " is not null", validator.isNull(obj));
// update original
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
validator.set(obj);
env.commitTransactionAndClear(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
Assert.assertTrue(fieldName + " not persisted", !validator.isChanged(obj));
// mutate
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.mutate(obj);
env.commitTransactionAndClear(em);
Assert.assertTrue("postUpdate was not called", obj.postUpdateWasCalled());
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
Assert.assertTrue(fieldName + " not mutated", validator.isChanged(obj));
// update to null
env.beginTransaction(em);
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
obj.clearPostUpdate();
validator.setNull(obj);
env.commitTransactionAndClear(em);
Assert.assertTrue("postUpdate was not called", obj.postUpdateWasCalled());
- obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id));
+ obj = em.find(BasicTypesFieldAccess.class, id);
Assert.assertTrue(fieldName + " is not null", validator.isNull(obj));
} finally {
closeEntityManager(em);
diff --git a/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/CanonicalModelProcessor.java b/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/CanonicalModelProcessor.java
index dc21f95..1f82898 100644
--- a/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/CanonicalModelProcessor.java
+++ b/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/CanonicalModelProcessor.java
@@ -135,7 +135,7 @@
Map<String, String> options = processingEnv.getOptions();
log = new MessagerLog(processingEnv.getMessager(), options);
- if (Boolean.valueOf(options.get("verbose")) && log.getLevel() > SessionLog.FINER) {
+ if (Boolean.parseBoolean(options.get("verbose")) && log.getLevel() > SessionLog.FINER) {
log.setLevel(SessionLog.FINER);
}
AbstractSessionLog.setLog(log);
@@ -146,20 +146,20 @@
new Object[]{option.getKey(), option.getValue()});
}
- useStaticFactory = Boolean.valueOf(CanonicalModelProperties.getOption(
+ useStaticFactory = Boolean.parseBoolean(CanonicalModelProperties.getOption(
CanonicalModelProperties.CANONICAL_MODEL_USE_STATIC_FACTORY,
CanonicalModelProperties.CANONICAL_MODEL_USE_STATIC_FACTORY_DEFAULT,
options));
- generateGenerated = Boolean.valueOf(CanonicalModelProperties.getOption(
+ generateGenerated = Boolean.parseBoolean(CanonicalModelProperties.getOption(
CanonicalModelProperties.CANONICAL_MODEL_GENERATE_GENERATED,
CanonicalModelProperties.CANONICAL_MODEL_GENERATE_GENERATED_DEFAULT,
options));
if (generateGenerated) {
- generateTimestamp = Boolean.valueOf(CanonicalModelProperties.getOption(
+ generateTimestamp = Boolean.parseBoolean(CanonicalModelProperties.getOption(
CanonicalModelProperties.CANONICAL_MODEL_GENERATE_TIMESTAMP,
CanonicalModelProperties.CANONICAL_MODEL_GENERATE_TIMESTAMP_DEFAULT,
options));
- generateComments = Boolean.valueOf(CanonicalModelProperties.getOption(
+ generateComments = Boolean.parseBoolean(CanonicalModelProperties.getOption(
CanonicalModelProperties.CANONICAL_MODEL_GENERATE_COMMENTS,
CanonicalModelProperties.CANONICAL_MODEL_GENERATE_COMMENTS_DEFAULT,
options));
diff --git a/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/objects/PersistenceUnitReader.java b/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/objects/PersistenceUnitReader.java
index 9e620dc..ecb985a 100644
--- a/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/objects/PersistenceUnitReader.java
+++ b/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/objects/PersistenceUnitReader.java
@@ -152,7 +152,7 @@
public void initPersistenceUnits(final MetadataMirrorFactory factory) {
// As a performance enhancement to avoid reloading and merging XML metadata for every compile round,
// the user may choose to turn off the XML loading by setting the load XML flag to false.
- if (Boolean.valueOf(CanonicalModelProperties.getOption(CANONICAL_MODEL_LOAD_XML, CANONICAL_MODEL_LOAD_XML_DEFAULT, processingEnv.getOptions()))) {
+ if (Boolean.parseBoolean(CanonicalModelProperties.getOption(CANONICAL_MODEL_LOAD_XML, CANONICAL_MODEL_LOAD_XML_DEFAULT, processingEnv.getOptions()))) {
final String filename = CanonicalModelProperties.getOption(ECLIPSELINK_PERSISTENCE_XML, ECLIPSELINK_PERSISTENCE_XML_DEFAULT, processingEnv.getOptions());
HashSet<String> persistenceUnitList = getPersistenceUnitList(processingEnv);
diff --git a/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/visitors/AnnotationValueVisitor.java b/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/visitors/AnnotationValueVisitor.java
index 79de71e..52947d3 100644
--- a/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/visitors/AnnotationValueVisitor.java
+++ b/jpa/org.eclipse.persistence.jpa.modelgen/src/main/java/org/eclipse/persistence/internal/jpa/modelgen/visitors/AnnotationValueVisitor.java
@@ -88,7 +88,7 @@
*/
@Override
public Object visitBoolean(boolean bool, Object arg1) {
- return Boolean.valueOf(bool);
+ return bool;
}
/**
@@ -97,7 +97,7 @@
*/
@Override
public Object visitByte(byte b, Object arg1) {
- return Byte.valueOf(b);
+ return b;
}
/**
@@ -106,7 +106,7 @@
*/
@Override
public Object visitChar(char c, Object arg1) {
- return Character.valueOf(c);
+ return c;
}
/**
@@ -115,7 +115,7 @@
*/
@Override
public Object visitDouble(double d, Object arg1) {
- return Double.valueOf(d);
+ return d;
}
/**
@@ -133,7 +133,7 @@
*/
@Override
public Object visitFloat(float f, Object arg1) {
- return Float.valueOf(f);
+ return f;
}
/**
@@ -142,7 +142,7 @@
*/
@Override
public Object visitInt(int i, Object arg1) {
- return Integer.valueOf(i);
+ return i;
}
/**
@@ -151,7 +151,7 @@
*/
@Override
public Object visitLong(long l, Object arg1) {
- return Long.valueOf(l);
+ return l;
}
/**
@@ -160,7 +160,7 @@
*/
@Override
public Object visitShort(short s, Object arg1) {
- return Short.valueOf(s);
+ return s;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
index 98dd233..8511b47 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
@@ -2403,11 +2403,11 @@
SchemaPerMultitenantPolicy policy = new SchemaPerMultitenantPolicy();
String prop = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.MULTITENANT_SHARED_EMF, m, session);
if (prop != null) {
- policy.setShouldUseSharedEMF(Boolean.valueOf(prop));
+ policy.setShouldUseSharedEMF(Boolean.parseBoolean(prop));
}
prop = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.MULTITENANT_SHARED_CACHE, m, session);
if (prop != null) {
- policy.setShouldUseSharedCache(Boolean.valueOf(prop));
+ policy.setShouldUseSharedCache(Boolean.parseBoolean(prop));
}
session.getProject().setMultitenantPolicy(policy);
} else {
@@ -4699,7 +4699,7 @@
*/
protected void writeDDLToDatabase(SchemaManager mgr, TableCreationType ddlType) {
String str = getConfigPropertyAsString(PersistenceUnitProperties.JAVASE_DB_INTERACTION, null ,"true");
- boolean interactWithDB = Boolean.valueOf(str.toLowerCase()).booleanValue();
+ boolean interactWithDB = Boolean.parseBoolean(str.toLowerCase());
if (!interactWithDB){
return;
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryHintsHandler.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryHintsHandler.java
index daf95a8..5a32780 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryHintsHandler.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryHintsHandler.java
@@ -197,7 +197,7 @@
if (hint == null) {
return false;
} else {
- return Boolean.valueOf(hint.toString());
+ return Boolean.parseBoolean(hint.toString());
}
}
@@ -662,7 +662,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isObjectLevelReadQuery()) {
- int cacheUsage = ((Integer)valueToApply).intValue();
+ int cacheUsage = (Integer) valueToApply;
((ObjectLevelReadQuery)query).setCacheUsage(cacheUsage);
if (cacheUsage == ObjectLevelReadQuery.CheckCacheByExactPrimaryKey
|| cacheUsage == ObjectLevelReadQuery.CheckCacheByPrimaryKey
@@ -672,7 +672,7 @@
return newQuery;
}
} else if (query.isModifyAllQuery()) {
- int cacheUsage = ((Integer)valueToApply).intValue();
+ int cacheUsage = (Integer) valueToApply;
((ModifyAllQuery)query).setCacheUsage(cacheUsage);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
@@ -699,10 +699,10 @@
if (query.isDataReadQuery()) {
DataModifyQuery newQuery = new DataModifyQuery();
newQuery.copyFromQuery(query);
- newQuery.setIsBatchExecutionSupported(((Boolean)valueToApply).booleanValue());
+ newQuery.setIsBatchExecutionSupported((Boolean) valueToApply);
return newQuery;
} else if (query.isModifyQuery()) {
- ((ModifyQuery)query).setIsBatchExecutionSupported(((Boolean)valueToApply).booleanValue());
+ ((ModifyQuery)query).setIsBatchExecutionSupported((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -788,7 +788,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isObjectBuildingQuery()) {
- ((ObjectBuildingQuery)query).setLockMode(((Short)valueToApply).shortValue());
+ ((ObjectBuildingQuery)query).setLockMode((Short) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -868,7 +868,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isObjectBuildingQuery()) {
- ((ObjectBuildingQuery)query).setShouldRefreshIdentityMapResult(((Boolean)valueToApply).booleanValue());
+ ((ObjectBuildingQuery)query).setShouldRefreshIdentityMapResult((Boolean) valueToApply);
// Set default cascade to be by mapping.
if (!query.shouldCascadeParts()) {
query.cascadeByMapping();
@@ -1016,7 +1016,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isObjectBuildingQuery()) {
- ((ObjectBuildingQuery)query).setShouldUseExclusiveConnection(((Boolean)valueToApply).booleanValue());
+ ((ObjectBuildingQuery)query).setShouldUseExclusiveConnection((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -1036,7 +1036,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isObjectLevelReadQuery()) {
- ((ObjectLevelReadQuery)query).setShouldOuterJoinSubclasses(((Boolean)valueToApply).booleanValue());
+ ((ObjectLevelReadQuery)query).setShouldOuterJoinSubclasses((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -1056,7 +1056,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isObjectLevelReadQuery()) {
- ((ObjectLevelReadQuery)query).setShouldUseDefaultFetchGroup(((Boolean)valueToApply).booleanValue());
+ ((ObjectLevelReadQuery)query).setShouldUseDefaultFetchGroup((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -1269,7 +1269,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isReadQuery()) {
- if (((Boolean)valueToApply).booleanValue()) {
+ if ((Boolean) valueToApply) {
if (((ReadQuery)query).getQueryResultsCachePolicy() == null) {
((ReadQuery)query).cacheQueryResults();
}
@@ -1300,7 +1300,7 @@
if (((ReadQuery)query).getQueryResultsCachePolicy() == null) {
((ReadQuery)query).cacheQueryResults();
}
- ((ReadQuery)query).getQueryResultsCachePolicy().setIsNullIgnored(((Boolean)valueToApply).booleanValue());
+ ((ReadQuery)query).getQueryResultsCachePolicy().setIsNullIgnored((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -1327,7 +1327,7 @@
if (((ReadQuery)query).getQueryResultsCachePolicy() == null) {
((ReadQuery)query).cacheQueryResults();
}
- ((ReadQuery)query).getQueryResultsCachePolicy().setInvalidateOnChange(((Boolean)valueToApply).booleanValue());
+ ((ReadQuery)query).getQueryResultsCachePolicy().setInvalidateOnChange((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -1357,7 +1357,7 @@
if (((ReadQuery)query).getQueryResultsCachePolicy().getCacheInvalidationPolicy() == null) {
((ReadQuery)query).getQueryResultsCachePolicy().setCacheInvalidationPolicy(new TimeToLiveCacheInvalidationPolicy());
}
- ((ReadQuery)query).getQueryResultsCachePolicy().getCacheInvalidationPolicy().setIsInvalidationRandomized(((Boolean)valueToApply).booleanValue());
+ ((ReadQuery)query).getQueryResultsCachePolicy().getCacheInvalidationPolicy().setIsInvalidationRandomized((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -1696,7 +1696,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
if (query.isObjectLevelReadQuery()) {
- ((ObjectLevelReadQuery)query).setIsReadOnly(((Boolean)valueToApply).booleanValue());
+ ((ObjectLevelReadQuery)query).setIsReadOnly((Boolean) valueToApply);
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage("ejb30-wrong-type-for-query-hint",new Object[]{getQueryId(query), name, getPrintValue(valueToApply)}));
}
@@ -1715,7 +1715,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
- query.setIsNativeConnectionRequired(((Boolean)valueToApply).booleanValue());
+ query.setIsNativeConnectionRequired((Boolean) valueToApply);
return query;
}
}
@@ -1731,7 +1731,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
- if (!((Boolean)valueToApply).booleanValue()) {
+ if (!(Boolean) valueToApply) {
if (query.isReadAllQuery()) {
if (((ReadAllQuery) query).getContainerPolicy().isCursoredStreamPolicy()) {
((ReadAllQuery) query).setContainerPolicy(ContainerPolicy.buildDefaultPolicy());
@@ -1847,7 +1847,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
- if (!((Boolean)valueToApply).booleanValue()) {
+ if (!(Boolean) valueToApply) {
if (query.isReadAllQuery()) {
if (((ReadAllQuery) query).getContainerPolicy().isScrollableCursorPolicy()) {
((ReadAllQuery) query).setContainerPolicy(ContainerPolicy.buildDefaultPolicy());
@@ -1886,7 +1886,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
- query.setShouldMaintainCache(((Boolean)valueToApply).booleanValue());
+ query.setShouldMaintainCache((Boolean) valueToApply);
return query;
}
}
@@ -1902,7 +1902,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
- query.setShouldPrepare(((Boolean)valueToApply).booleanValue());
+ query.setShouldPrepare((Boolean) valueToApply);
return query;
}
}
@@ -1918,7 +1918,7 @@
@Override
DatabaseQuery applyToDatabaseQuery(Object valueToApply, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession) {
- query.setShouldCacheStatement(((Boolean)valueToApply).booleanValue());
+ query.setShouldCacheStatement((Boolean) valueToApply);
return query;
}
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryImpl.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryImpl.java
index 5da220d..00792c8 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryImpl.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/QueryImpl.java
@@ -300,7 +300,7 @@
performPreQueryFlush();
}
Integer changedRows = (Integer) getActiveSession().executeQuery(databaseQuery, parameterValues);
- return changedRows.intValue();
+ return changedRows;
} catch (PersistenceException exception) {
setRollbackOnly();
throw exception;
@@ -757,7 +757,7 @@
*/
protected boolean isFlushModeAUTO() {
if (getDatabaseQueryInternal().getFlushOnExecute() != null) {
- return getDatabaseQueryInternal().getFlushOnExecute().booleanValue();
+ return getDatabaseQueryInternal().getFlushOnExecute();
} else {
return entityManager.isFlushModeAUTO();
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/deployment/JavaSECMPInitializer.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/deployment/JavaSECMPInitializer.java
index 3ac7eb0..76808e7 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/deployment/JavaSECMPInitializer.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/deployment/JavaSECMPInitializer.java
@@ -191,7 +191,7 @@
}
AbstractSessionLog.getLog().log(SessionLog.FINER, SessionLog.WEAVER, "cmp_init_tempLoader_created", tempLoader);
- AbstractSessionLog.getLog().log(SessionLog.FINER, SessionLog.WEAVER, "cmp_init_shouldOverrideLoadClassForCollectionMembers", Boolean.valueOf(shouldOverrideLoadClassForCollectionMembers));
+ AbstractSessionLog.getLog().log(SessionLog.FINER, SessionLog.WEAVER, "cmp_init_shouldOverrideLoadClassForCollectionMembers", shouldOverrideLoadClassForCollectionMembers);
return tempLoader;
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/MetadataDescriptor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/MetadataDescriptor.java
index 572037e..0a4bc5b 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/MetadataDescriptor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/MetadataDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -1401,7 +1401,7 @@
*/
public boolean isCacheableTrue() {
if (m_cacheable != null) {
- return m_cacheable.booleanValue();
+ return m_cacheable;
} else if (isInheritanceSubclass()) {
return getInheritanceParentDescriptor().isCacheableTrue();
}
@@ -1416,7 +1416,7 @@
*/
public boolean isCacheableFalse() {
if (m_cacheable != null) {
- return ! m_cacheable.booleanValue();
+ return !m_cacheable;
} else if (isInheritanceSubclass()) {
return getInheritanceParentDescriptor().isCacheableFalse();
}
@@ -1912,7 +1912,7 @@
* INTERNAL:
*/
public boolean usesCascadedOptimisticLocking() {
- return m_usesCascadedOptimisticLocking != null && m_usesCascadedOptimisticLocking.booleanValue();
+ return m_usesCascadedOptimisticLocking != null && m_usesCascadedOptimisticLocking;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/EntityAccessor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/EntityAccessor.java
index cf862d0..f4cd374 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/EntityAccessor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/EntityAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -513,7 +513,7 @@
* INTERNAL:
*/
public boolean isCascadeOnDelete() {
- return (m_cascadeOnDelete == null) ? isAnnotationPresent(CascadeOnDelete.class) : m_cascadeOnDelete.booleanValue();
+ return (m_cascadeOnDelete == null) ? isAnnotationPresent(CascadeOnDelete.class) : m_cascadeOnDelete;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/MappedSuperclassAccessor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/MappedSuperclassAccessor.java
index e868cc1..4c61d85 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/MappedSuperclassAccessor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/MappedSuperclassAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -262,7 +262,7 @@
* Used for OX mapping.
*/
public boolean excludeDefaultListeners() {
- return m_excludeDefaultListeners != null && m_excludeDefaultListeners.booleanValue();
+ return m_excludeDefaultListeners != null && m_excludeDefaultListeners;
}
/**
@@ -270,7 +270,7 @@
* Used for OX mapping.
*/
public boolean excludeSuperclassListeners() {
- return m_excludeSuperclassListeners != null && m_excludeSuperclassListeners.booleanValue();
+ return m_excludeSuperclassListeners != null && m_excludeSuperclassListeners;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/BasicAccessor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/BasicAccessor.java
index c158eb1..cdcbfb3 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/BasicAccessor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/BasicAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -394,7 +394,7 @@
* USed for OX mapping
*/
public Boolean isReturnUpdate() {
- return m_returnUpdate != null && m_returnUpdate.booleanValue();
+ return m_returnUpdate != null && m_returnUpdate;
}
/**
@@ -439,7 +439,7 @@
// Process a mutable setting.
if (m_mutable != null) {
- mapping.setIsMutable(m_mutable.booleanValue());
+ mapping.setIsMutable(m_mutable);
}
// Process the @ReturnInsert and @ReturnUpdate annotations.
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectAccessor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectAccessor.java
index 0543851..fc96150 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectAccessor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -328,7 +328,7 @@
if (m_optional == null) {
return true;
} else {
- return m_optional.booleanValue();
+ return m_optional;
}
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectCollectionAccessor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectCollectionAccessor.java
index 1ebac61..3b2e6ab 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectCollectionAccessor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/DirectCollectionAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -304,7 +304,7 @@
* INTERNAL:
*/
public Boolean isCascadeOnDelete() {
- return m_cascadeOnDelete != null && m_cascadeOnDelete.booleanValue();
+ return m_cascadeOnDelete != null && m_cascadeOnDelete;
}
/**
@@ -323,7 +323,7 @@
* Used for OX mapping.
*/
public boolean isNonCacheable() {
- return m_nonCacheable != null && m_nonCacheable.booleanValue();
+ return m_nonCacheable != null && m_nonCacheable;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/RelationshipAccessor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/RelationshipAccessor.java
index e0147e8..5c6465d 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/RelationshipAccessor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/RelationshipAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -633,7 +633,7 @@
* INTERNAL:
*/
public boolean isCascadeOnDelete() {
- return m_cascadeOnDelete != null && m_cascadeOnDelete.booleanValue();
+ return m_cascadeOnDelete != null && m_cascadeOnDelete;
}
/**
@@ -655,7 +655,7 @@
* Used for OX mapping.
*/
public boolean isNonCacheable() {
- return m_nonCacheable != null && m_nonCacheable.booleanValue();
+ return m_nonCacheable != null && m_nonCacheable;
}
/**
@@ -663,7 +663,7 @@
* Return true is this relationship employs orphanRemoval.
*/
protected boolean isOrphanRemoval() {
- return m_orphanRemoval != null && m_orphanRemoval.booleanValue();
+ return m_orphanRemoval != null && m_orphanRemoval;
}
/**
@@ -671,7 +671,7 @@
* Used for OX mapping.
*/
public boolean isPrivateOwned() {
- return m_privateOwned != null && m_privateOwned.booleanValue();
+ return m_privateOwned != null && m_privateOwned;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/TransformationAccessor.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/TransformationAccessor.java
index 4058a84..0e7a7ae 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/TransformationAccessor.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/TransformationAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -174,7 +174,7 @@
mapping.setIsOptional(isOptional());
mapping.setIsLazy(usesIndirection());
if (getMutable() != null) {
- mapping.setIsMutable(getMutable().booleanValue());
+ mapping.setIsMutable(getMutable());
}
// Will check for PROPERTY access.
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/ColumnMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/ColumnMetadata.java
index f1b3b8a..c54d0c3 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/ColumnMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/ColumnMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -134,10 +134,10 @@
@Override
public DatabaseField getDatabaseField() {
DatabaseField field = super.getDatabaseField();
- field.setUnique(m_unique == null ? false : m_unique.booleanValue());
- field.setScale(m_scale == null ? 0 : m_scale.intValue());
- field.setLength(m_length == null ? 0 : m_length.intValue());
- field.setPrecision(m_precision == null ? 0 : m_precision.intValue());
+ field.setUnique(m_unique == null ? false : m_unique);
+ field.setScale(m_scale == null ? 0 : m_scale);
+ field.setLength(m_length == null ? 0 : m_length);
+ field.setPrecision(m_precision == null ? 0 : m_precision);
field.setTableName(m_table == null ? "" : m_table);
return field;
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/DirectColumnMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/DirectColumnMetadata.java
index 28c3269..23bb89b 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/DirectColumnMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/DirectColumnMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -104,9 +104,9 @@
public DatabaseField getDatabaseField() {
DatabaseField databaseField = super.getDatabaseField();
- databaseField.setNullable(m_nullable == null ? true : m_nullable.booleanValue());
- databaseField.setUpdatable(m_updatable == null ? true : m_updatable.booleanValue());
- databaseField.setInsertable(m_insertable == null ? true : m_insertable.booleanValue());
+ databaseField.setNullable(m_nullable == null ? true : m_nullable);
+ databaseField.setUpdatable(m_updatable == null ? true : m_updatable);
+ databaseField.setInsertable(m_insertable == null ? true : m_insertable);
return databaseField;
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/JoinColumnMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/JoinColumnMetadata.java
index 6598144..16e7148 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/JoinColumnMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/JoinColumnMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -130,10 +130,10 @@
DatabaseField fkField = super.getForeignKeyField();
fkField.setTableName(m_table == null ? "" : m_table);
- fkField.setUnique(m_unique == null ? false : m_unique.booleanValue());
- fkField.setNullable(m_nullable == null ? true : m_nullable.booleanValue());
- fkField.setUpdatable(m_updatable == null ? true : m_updatable.booleanValue());
- fkField.setInsertable(m_insertable == null ? true : m_insertable.booleanValue());
+ fkField.setUnique(m_unique == null ? false : m_unique);
+ fkField.setNullable(m_nullable == null ? true : m_nullable);
+ fkField.setUpdatable(m_updatable == null ? true : m_updatable);
+ fkField.setInsertable(m_insertable == null ? true : m_insertable);
return fkField;
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/TenantDiscriminatorColumnMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/TenantDiscriminatorColumnMetadata.java
index 5c860d0..e351116 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/TenantDiscriminatorColumnMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/columns/TenantDiscriminatorColumnMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -136,7 +136,7 @@
}
// Set the primary key setting
- field.setPrimaryKey(m_primaryKey == null ? false : m_primaryKey.booleanValue());
+ field.setPrimaryKey(m_primaryKey == null ? false : m_primaryKey);
return field;
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/listeners/EntityListenerMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/listeners/EntityListenerMetadata.java
index aa0cdf8..0b9ea06 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/listeners/EntityListenerMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/listeners/EntityListenerMetadata.java
@@ -402,7 +402,7 @@
m_entityListenerClass = getMetadataFactory().getMetadataClass(m_className);
}
JPAEntityListenerHolder holder = new JPAEntityListenerHolder();
- holder.setIsDefaultListener(Boolean.valueOf(isDefaultListener));
+ holder.setIsDefaultListener(isDefaultListener);
holder.listenerClassName = m_entityListenerClass.getName();
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/locking/OptimisticLockingMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/locking/OptimisticLockingMetadata.java
index 19e0b1d..ce68557 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/locking/OptimisticLockingMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/locking/OptimisticLockingMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -147,7 +147,7 @@
if (m_type == null || m_type.equals(OptimisticLockingType.VERSION_COLUMN.name())) {
// A version annotation or element should be define and discovered
// in later processing.
- descriptor.setUsesCascadedOptimisticLocking(m_cascade != null && m_cascade.booleanValue());
+ descriptor.setUsesCascadedOptimisticLocking(m_cascade != null && m_cascade);
} else if (m_type.equals(OptimisticLockingType.ALL_COLUMNS.name())) {
descriptor.setOptimisticLockingPolicy(new AllFieldsLockingPolicy());
} else if (m_type.equals(OptimisticLockingType.CHANGED_COLUMNS.name())) {
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/mappings/CascadeMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/mappings/CascadeMetadata.java
index f6bb144..ef70b36 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/mappings/CascadeMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/mappings/CascadeMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -189,7 +189,7 @@
* Used for OX mapping.
*/
public boolean isCascadeAll() {
- return m_cascadeAll != null && m_cascadeAll.booleanValue();
+ return m_cascadeAll != null && m_cascadeAll;
}
/**
@@ -197,7 +197,7 @@
* Used for OX mapping.
*/
public boolean isCascadeDetach() {
- return m_cascadeDetach != null && m_cascadeDetach.booleanValue();
+ return m_cascadeDetach != null && m_cascadeDetach;
}
/**
@@ -205,7 +205,7 @@
* Used for OX mapping.
*/
public boolean isCascadeMerge() {
- return m_cascadeMerge != null && m_cascadeMerge.booleanValue();
+ return m_cascadeMerge != null && m_cascadeMerge;
}
/**
@@ -213,7 +213,7 @@
* Used for OX mapping.
*/
public boolean isCascadePersist() {
- return m_cascadePersist != null && m_cascadePersist.booleanValue();
+ return m_cascadePersist != null && m_cascadePersist;
}
/**
@@ -221,7 +221,7 @@
* Used for OX mapping.
*/
public boolean isCascadeRefresh() {
- return m_cascadeRefresh != null && m_cascadeRefresh.booleanValue();
+ return m_cascadeRefresh != null && m_cascadeRefresh;
}
/**
@@ -229,7 +229,7 @@
* Used for OX mapping.
*/
public boolean isCascadeRemove() {
- return m_cascadeRemove != null && m_cascadeRemove.booleanValue();
+ return m_cascadeRemove != null && m_cascadeRemove;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/multitenant/MultitenantMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/multitenant/MultitenantMetadata.java
index 66265e3..ce1569f 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/multitenant/MultitenantMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/multitenant/MultitenantMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -188,7 +188,7 @@
if (m_type != null && m_type.equals(MultitenantType.VPD.name())) {
return false ;
} else {
- return m_includeCriteria == null || m_includeCriteria.booleanValue();
+ return m_includeCriteria == null || m_includeCriteria;
}
}
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/tables/IndexMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/tables/IndexMetadata.java
index 198e696..7ff9627 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/tables/IndexMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/tables/IndexMetadata.java
@@ -224,7 +224,7 @@
* Return true is there is a unique setting for this index.
*/
protected boolean isUnique() {
- return m_unique != null && m_unique.booleanValue();
+ return m_unique != null && m_unique;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitDefaults.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitDefaults.java
index 62232fb..58d7e18 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitDefaults.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitDefaults.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -228,7 +228,7 @@
* Used for OX mapping.
*/
public boolean isCascadePersist() {
- return m_cascadePersist != null && m_cascadePersist.booleanValue();
+ return m_cascadePersist != null && m_cascadePersist;
}
/**
@@ -236,7 +236,7 @@
* Used for OX mapping.
*/
public boolean isDelimitedIdentifiers(){
- return m_delimitedIdentifiers != null && m_delimitedIdentifiers.booleanValue();
+ return m_delimitedIdentifiers != null && m_delimitedIdentifiers;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitMetadata.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitMetadata.java
index b32bc8d..b6cb421 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitMetadata.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/metadata/xml/XMLPersistenceUnitMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -95,7 +95,7 @@
* Used for OX mapping.
*/
public boolean excludeDefaultMappings() {
- return m_excludeDefaultMappings != null && m_excludeDefaultMappings.booleanValue();
+ return m_excludeDefaultMappings != null && m_excludeDefaultMappings;
}
/**
@@ -155,7 +155,7 @@
* Used for OX mapping.
*/
public boolean isXMLMappingMetadataComplete() {
- return m_xmlMappingMetadataComplete != null && m_xmlMappingMetadataComplete.booleanValue();
+ return m_xmlMappingMetadataComplete != null && m_xmlMappingMetadataComplete;
}
/**
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/querydef/CriteriaBuilderImpl.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/querydef/CriteriaBuilderImpl.java
index 7f6070f..af5084b 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/querydef/CriteriaBuilderImpl.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/internal/jpa/querydef/CriteriaBuilderImpl.java
@@ -314,7 +314,7 @@
@Override
public Predicate exists(Subquery<?> subquery){
// Setting SubQuery's SubSelectExpression as a base for the expression created by operator allows setting a new ExpressionBuilder later in the SubSelectExpression (see integrateRoot method in SubQueryImpl).
- return new CompoundExpressionImpl(metamodel, ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Exists)).expressionFor(((SubQueryImpl)subquery).getCurrentNode()), buildList(subquery), "exists");
+ return new CompoundExpressionImpl(metamodel, ExpressionOperator.getOperator(ExpressionOperator.Exists).expressionFor(((SubQueryImpl)subquery).getCurrentNode()), buildList(subquery), "exists");
}
/**
@@ -504,7 +504,7 @@
if (((InternalExpression)restriction).isCompoundExpression() && ((CompoundExpressionImpl)restriction).getOperation().equals("exists")){
FunctionExpression exp = (FunctionExpression) ((InternalSelection)restriction).getCurrentNode();
SubSelectExpression sub = (SubSelectExpression) exp.getChildren().get(0);
- parentNode = ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotExists)).expressionFor(sub);
+ parentNode = ExpressionOperator.getOperator(ExpressionOperator.NotExists).expressionFor(sub);
name = "notExists";
compoundExpressions = ((CompoundExpressionImpl)restriction).getChildExpressions();
}else{
diff --git a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/jpa/PersistenceProvider.java b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/jpa/PersistenceProvider.java
index 202ddb0..701a432 100644
--- a/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/jpa/PersistenceProvider.java
+++ b/jpa/org.eclipse.persistence.jpa/src/main/java/org/eclipse/persistence/jpa/PersistenceProvider.java
@@ -469,11 +469,11 @@
if (setup.isDeployed()){
Boolean isLoaded = EntityManagerFactoryImpl.isLoaded(entity, setup.getSession());
if (isLoaded != null){
- if (isLoaded.booleanValue() && attributeName != null){
+ if (isLoaded && attributeName != null){
isLoaded = EntityManagerFactoryImpl.isLoaded(entity, attributeName, setup.getSession());
}
if (isLoaded != null){
- return isLoaded.booleanValue() ? LoadState.LOADED : LoadState.NOT_LOADED;
+ return isLoaded ? LoadState.LOADED : LoadState.NOT_LOADED;
}
}
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBBinder.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBBinder.java
index 1d3a872..4bd6e84 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBBinder.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBBinder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -264,11 +264,11 @@
return;
}
if (propName.equals(Marshaller.JAXB_FORMATTED_OUTPUT)) {
- this.xmlBinder.getMarshaller().setFormattedOutput(Boolean.valueOf(valueString).booleanValue());
+ this.xmlBinder.getMarshaller().setFormattedOutput(Boolean.parseBoolean(valueString));
return;
}
if (propName.equals(Marshaller.JAXB_FRAGMENT)) {
- this.xmlBinder.getMarshaller().setFragment(Boolean.valueOf(valueString).booleanValue());
+ this.xmlBinder.getMarshaller().setFragment(Boolean.parseBoolean(valueString));
return;
}
if (propName.equals(Marshaller.JAXB_SCHEMA_LOCATION)) {
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBMarshaller.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBMarshaller.java
index 2db1830..3eef795 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBMarshaller.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBMarshaller.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -883,13 +883,13 @@
throw new PropertyException(key, Constants.EMPTY_STRING);
}
Boolean fragment = (Boolean) value;
- xmlMarshaller.setFragment(fragment.booleanValue());
+ xmlMarshaller.setFragment(fragment);
} else if (JAXB_FORMATTED_OUTPUT.equals(key)) {
if (value == null) {
throw new PropertyException(key, Constants.EMPTY_STRING);
}
Boolean formattedOutput = (Boolean) value;
- xmlMarshaller.setFormattedOutput(formattedOutput.booleanValue());
+ xmlMarshaller.setFormattedOutput(formattedOutput);
} else if (JAXB_ENCODING.equals(key)) {
xmlMarshaller.setEncoding((String) value);
} else if (JAXB_SCHEMA_LOCATION.equals(key)) {
@@ -948,14 +948,14 @@
throw new PropertyException(key, Constants.EMPTY_STRING);
}
Boolean fragment = !(Boolean) value;
- xmlMarshaller.setFragment(fragment.booleanValue());
+ xmlMarshaller.setFragment(fragment);
} else if (XML_HEADERS.equals(key)) {
xmlMarshaller.setXmlHeader((String) value);
} else if (OBJECT_IDENTITY_CYCLE_DETECTION.equals(key)) {
if (value == null) {
throw new PropertyException(key, Constants.EMPTY_STRING);
}
- xmlMarshaller.setEqualUsingIdenity(((Boolean) value).booleanValue());
+ xmlMarshaller.setEqualUsingIdenity((Boolean) value);
} else if (MarshallerProperties.MEDIA_TYPE.equals(key)) {
MediaType mType = null;
if (value instanceof MediaType) {
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java
index 06e9c3b..974f6d7 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java
@@ -2974,7 +2974,7 @@
org.eclipse.persistence.jaxb.xmlmodel.XmlNullPolicy policy = new org.eclipse.persistence.jaxb.xmlmodel.XmlNullPolicy();
policy.setEmptyNodeRepresentsNull(nullPolicy.emptyNodeRepresentsNull());
policy.setIsSetPerformedForAbsentNode(nullPolicy.isSetPerformedForAbsentNode());
- policy.setXsiNilRepresentsNull(Boolean.valueOf(nullPolicy.xsiNilRepresentsNull()));
+ policy.setXsiNilRepresentsNull(nullPolicy.xsiNilRepresentsNull());
policy.setNullRepresentationForXml(org.eclipse.persistence.jaxb.xmlmodel.XmlMarshalNullRepresentation.valueOf(nullPolicy.nullRepresentationForXml().toString()));
property.setNullPolicy(policy);
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java
index d6e3cb0..2befbf9 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java
@@ -587,7 +587,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer);
Object objectToWrite = getWriteControlObject();
@@ -627,7 +627,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer);
Object objectToWrite = getWriteControlObject();
@@ -670,7 +670,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLEventWriter eventWriter= factory.createXMLEventWriter(writer);
Object objectToWrite = getWriteControlObject();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/annotations/xmlpath/predicate/adapter/LinkAdapter.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/annotations/xmlpath/predicate/adapter/LinkAdapter.java
index ade70c9..c149367 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/annotations/xmlpath/predicate/adapter/LinkAdapter.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/annotations/xmlpath/predicate/adapter/LinkAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -45,8 +45,8 @@
return a;
} else {
PhoneNumber p = new PhoneNumber();
- p.setAreaCode(Integer.valueOf(arg0.substring(0, 3)));
- p.setNumber(Integer.valueOf(arg0.substring(3)));
+ p.setAreaCode(Integer.parseInt(arg0.substring(0, 3)));
+ p.setNumber(Integer.parseInt(arg0.substring(3)));
return p;
}
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/cycle/Employee.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/cycle/Employee.java
index 28a0a86..28e5286 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/cycle/Employee.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/cycle/Employee.java
@@ -34,7 +34,7 @@
if (id < 1000) {
// Return an object of a built-in Java type
- return Integer.valueOf(this.id);
+ return this.id;
} else {
// Return an object of a diffenet type (one that is known to this context)
EmployeePointer p = new EmployeePointer();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromOXMTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromOXMTestCases.java
index 321347a..b82e8c8 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromOXMTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromOXMTestCases.java
@@ -516,7 +516,7 @@
company.set("name", "ACME International");
company.set("address", "165 Main St, Anytown US, 93012");
- company.set("id", Integer.valueOf(882));
+ company.set("id", 882);
person.set("name", "Bob Dobbs");
person.set("company", company);
@@ -1029,7 +1029,7 @@
// Ensure that properties were set on the Descriptor and Mapping
XMLDescriptor d = jaxbContext.getXMLContext().getDescriptor(new QName("mynamespace", "person"));
- assertEquals("Descriptor property not present.", Integer.valueOf(101), d.getProperty("identifier"));
+ assertEquals("Descriptor property not present.", 101, d.getProperty("identifier"));
assertEquals("Descriptor property not present.", Boolean.FALSE, d.getProperty("active"));
XMLDirectMapping m = (XMLDirectMapping) d.getMappingForAttributeName("name");
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java
index 435366d..e524af9 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java
@@ -183,10 +183,10 @@
collRef.add(collRef2);
root.set("collRef", collRef);
- root.set("choice", Integer.valueOf(2112));
+ root.set("choice", 2112);
Vector choiceColl = new Vector(3);
- choiceColl.add(Double.valueOf(3.14159));
+ choiceColl.add(3.14159);
choiceColl.add("Pi");
choiceColl.add(Boolean.TRUE);
root.set("choiceColl", choiceColl);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java
index 3234baf..46e62d8 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java
@@ -54,7 +54,7 @@
}
private Object getControlObjectUnmapped() {
- return new JAXBElement<Integer>(new QName("year"), Integer.class, Integer.valueOf(1942));
+ return new JAXBElement<Integer>(new QName("year"), Integer.class, 1942);
}
private Object getControlObjectMapped() {
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java
index 4e10e12..cf0107d 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java
@@ -20,12 +20,12 @@
public class JAXBMarshalListenerImpl extends Marshaller.Listener {
- static Integer EMPLOYEE_BEFORE_MARSHAL = Integer.valueOf(0);
- static Integer ADDRESS_BEFORE_MARSHAL = Integer.valueOf(1);
- static Integer PHONE_BEFORE_MARSHAL = Integer.valueOf(2);
- static Integer EMPLOYEE_AFTER_MARSHAL = Integer.valueOf(3);
- static Integer ADDRESS_AFTER_MARSHAL = Integer.valueOf(4);
- static Integer PHONE_AFTER_MARSHAL = Integer.valueOf(5);
+ static Integer EMPLOYEE_BEFORE_MARSHAL = 0;
+ static Integer ADDRESS_BEFORE_MARSHAL = 1;
+ static Integer PHONE_BEFORE_MARSHAL = 2;
+ static Integer EMPLOYEE_AFTER_MARSHAL = 3;
+ static Integer ADDRESS_AFTER_MARSHAL = 4;
+ static Integer PHONE_AFTER_MARSHAL = 5;
public ArrayList events = null;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java
index 75111c7..68d249b 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java
@@ -19,12 +19,12 @@
import jakarta.xml.bind.Unmarshaller;
public class JAXBUnmarshalListenerImpl extends Unmarshaller.Listener {
- static Integer EMPLOYEE_BEFORE_UNMARSHAL = Integer.valueOf(0);
- static Integer ADDRESS_BEFORE_UNMARSHAL = Integer.valueOf(1);
- static Integer PHONE_BEFORE_UNMARSHAL = Integer.valueOf(2);
- static Integer EMPLOYEE_AFTER_UNMARSHAL = Integer.valueOf(3);
- static Integer ADDRESS_AFTER_UNMARSHAL = Integer.valueOf(4);
- static Integer PHONE_AFTER_UNMARSHAL = Integer.valueOf(5);
+ static Integer EMPLOYEE_BEFORE_UNMARSHAL = 0;
+ static Integer ADDRESS_BEFORE_UNMARSHAL = 1;
+ static Integer PHONE_BEFORE_UNMARSHAL = 2;
+ static Integer EMPLOYEE_AFTER_UNMARSHAL = 3;
+ static Integer ADDRESS_AFTER_UNMARSHAL = 4;
+ static Integer PHONE_AFTER_UNMARSHAL = 5;
public ArrayList events = null;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java
index e7fec0d..bde387c 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java
@@ -137,7 +137,7 @@
public void testInvalidParameterTypeBadOxmXmlValue() {
Map<String, List<Integer>> properties = new HashMap<String, List<Integer>>();
ArrayList<Integer> ints = new ArrayList<Integer>();
- ints.add(Integer.valueOf(666));
+ ints.add(666);
properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY, ints);
try {
JAXBContextFactory.createContext(CONTEXT_PATH, getClass().getClassLoader(), properties);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java
index e4ce461..226b726 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java
@@ -23,7 +23,7 @@
@jakarta.xml.bind.annotation.XmlElementDecl(namespace="myns", name="integer-root")
public jakarta.xml.bind.JAXBElement<Integer> createIntegerRoot() {
- return new jakarta.xml.bind.JAXBElement<Integer>(new javax.xml.namespace.QName("myns", "integer-root"), Integer.class, Integer.valueOf(0));
+ return new jakarta.xml.bind.JAXBElement<Integer>(new javax.xml.namespace.QName("myns", "integer-root"), Integer.class, 0);
}
@jakarta.xml.bind.annotation.XmlElementDecl(name="a")
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java
index 45c767b..7c6f6b1 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java
@@ -76,8 +76,8 @@
// setup control objects
Foo foo = new Foo();
List theItems = new ArrayList();
- theItems.add(Float.valueOf(2.5f));
- theItems.add(Integer.valueOf(1));
+ theItems.add(2.5f);
+ theItems.add(1);
foo.items = theItems;
return foo;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java
index 3c2e340..c87f806 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java
@@ -91,8 +91,8 @@
// setup control objects
Foo foo = new Foo();
List theItems = new ArrayList();
- theItems.add(Float.valueOf(2.5f));
- theItems.add(Integer.valueOf(1));
+ theItems.add(2.5f);
+ theItems.add(1);
foo.items = theItems;
return foo;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java
index 6359568..334e2ae 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java
@@ -74,7 +74,7 @@
//setup control Employee
GregorianCalendar calendar = new GregorianCalendar();
- Date theDate = new Date(Long.valueOf("1262840400000"));
+ Date theDate = new Date(Long.parseLong("1262840400000"));
calendar.setTime(theDate);
emp.hireDate = calendar;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java
index 4e19e80..4e03848 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java
@@ -59,7 +59,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer);
Object objectToWrite = getWriteControlObject();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java
index 3ebf6d1..ab69ea8 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java
@@ -35,8 +35,8 @@
protected Object getControlObject() {
XmlElementsListOfElement example = new XmlElementsListOfElement();
example.items = new ArrayList();
- example.items.add(Integer.valueOf(1));
- example.items.add(Float.valueOf(2.5f));
+ example.items.add(1);
+ example.items.add(2.5f);
return example;
}
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java
index f575694..6a2f4d9 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java
@@ -38,8 +38,8 @@
protected Object getControlObject() {
XmlElementsListOfElementWrapped example = new XmlElementsListOfElementWrapped();
example.items = new ArrayList();
- example.items.add(Integer.valueOf(1));
- example.items.add(Float.valueOf(2.5f));
+ example.items.add(1);
+ example.items.add(2.5f);
return example;
}
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java
index ccfeb9b..047a578 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java
@@ -47,7 +47,7 @@
@Override
protected Object getControlObject() {
- Character character = Character.valueOf('s');
+ Character character = 's';
JAXBElement<Character> jbe = new JAXBElement<Character>(new QName("a", "b"),Character.class, character);
return jbe;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java
index 70ce66d..cde3c46 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java
@@ -35,29 +35,29 @@
holder.stringValue = "a\"a\\a/a\ba\fa\na\ra\t\b\u0003\u001Caaa\\TESThttp://this/is/my/test";
List<Character> characters = new ArrayList<Character>();
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('"'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('\\'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('/'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('\b'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('\f'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('\n'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('\r'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('\t'));
- characters.add(Character.valueOf('\b'));
- characters.add(Character.valueOf('\u0003'));
- characters.add(Character.valueOf('\u001C'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('a'));
- characters.add(Character.valueOf('\\'));
+ characters.add('a');
+ characters.add('"');
+ characters.add('a');
+ characters.add('\\');
+ characters.add('a');
+ characters.add('/');
+ characters.add('a');
+ characters.add('\b');
+ characters.add('a');
+ characters.add('\f');
+ characters.add('a');
+ characters.add('\n');
+ characters.add('a');
+ characters.add('\r');
+ characters.add('a');
+ characters.add('\t');
+ characters.add('\b');
+ characters.add('\u0003');
+ characters.add('\u001C');
+ characters.add('a');
+ characters.add('a');
+ characters.add('a');
+ characters.add('\\');
holder.characters = characters;
return holder;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java
index 5784f4b..17df0ac 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java
@@ -74,7 +74,7 @@
public Map<Object, Object> getProperties() {
HashMap m = new HashMap();
- m.put(JAXBContextProperties.JSON_INCLUDE_ROOT, Boolean.valueOf(false));
+ m.put(JAXBContextProperties.JSON_INCLUDE_ROOT, Boolean.FALSE);
return m;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBBooleanArrayTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBBooleanArrayTestCases.java
index f675180..628e92e 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBBooleanArrayTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBBooleanArrayTestCases.java
@@ -70,10 +70,10 @@
@Override
protected Object getControlObject() {
boolean[] booleans = new boolean[4];
- booleans[0] = Boolean.FALSE.booleanValue();
- booleans[1] = Boolean.TRUE.booleanValue();
- booleans[2] = Boolean.FALSE.booleanValue();
- booleans[3] = Boolean.TRUE.booleanValue();
+ booleans[0] = false;
+ booleans[1] = true;
+ booleans[2] = false;
+ booleans[3] = true;
QName qname = new QName("examplenamespace", "root");
JAXBElement jaxbElement = new JAXBElement(qname, Object.class,null);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java
index 9ae6366..052cd53 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java
@@ -122,28 +122,28 @@
listofObjects.setEmpList(empList);
boolean[] booleans = new boolean[4];
- booleans[0] = Boolean.TRUE.booleanValue();
- booleans[1] = Boolean.TRUE.booleanValue();
- booleans[2] = Boolean.FALSE.booleanValue();
- booleans[3] = Boolean.FALSE.booleanValue();
+ booleans[0] = true;
+ booleans[1] = true;
+ booleans[2] = false;
+ booleans[3] = false;
listofObjects.setBooleanArray(booleans);
HashMap<String, Integer> stringIntegerMap = new HashMap<String, Integer>();
- stringIntegerMap.put("string1", Integer.valueOf(10));
- stringIntegerMap.put("string2", Integer.valueOf(20));
- stringIntegerMap.put("string3", Integer.valueOf(30));
+ stringIntegerMap.put("string1", 10);
+ stringIntegerMap.put("string2", 20);
+ stringIntegerMap.put("string3", 30);
listofObjects.setStringIntegerHashMap(stringIntegerMap);
ConcurrentHashMap<String, Integer> stringIntegerConcurrentMap = new ConcurrentHashMap<String, Integer>();
- stringIntegerConcurrentMap.put("string1", Integer.valueOf(10));
- stringIntegerConcurrentMap.put("string2", Integer.valueOf(20));
- stringIntegerConcurrentMap.put("string3", Integer.valueOf(30));
+ stringIntegerConcurrentMap.put("string1", 10);
+ stringIntegerConcurrentMap.put("string2", 20);
+ stringIntegerConcurrentMap.put("string3", 30);
listofObjects.setStringIntegerConcurrentMap(stringIntegerConcurrentMap);
LinkedList<Integer> integersLinkedList = new LinkedList<Integer>();
- integersLinkedList.add(Integer.valueOf(5));
- integersLinkedList.add(Integer.valueOf(15));
- integersLinkedList.add(Integer.valueOf(25));
+ integersLinkedList.add(5);
+ integersLinkedList.add(15);
+ integersLinkedList.add(25);
listofObjects.setIntegerLinkedList(integersLinkedList);
Hashtable<String, Employee> stringEmployeeTable = new Hashtable<String, Employee>();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java
index 74324cd..f5e2b72 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java
@@ -66,9 +66,9 @@
@Override
protected Object getControlObject() {
HashMap<String, Integer> theMap = new HashMap<String, Integer>();
- theMap.put("thekey", Integer.valueOf(10));
- theMap.put("thekey2", Integer.valueOf(20));
- theMap.put("thekey3", Integer.valueOf(30));
+ theMap.put("thekey", 10);
+ theMap.put("thekey2", 20);
+ theMap.put("thekey3", 30);
QName qname = new QName("examplenamespace", "root");
JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java
index 32362ec..b0ff385 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java
@@ -128,8 +128,8 @@
protected Object getControlObject() {
Map<String, Integer> theMap = new HashMap<String, Integer>();
- theMap.put("aaa", Integer.valueOf(1));
- theMap.put("bbb", Integer.valueOf(2));
+ theMap.put("aaa", 1);
+ theMap.put("bbb", 2);
QName qname = new QName("root");
JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java
index fc2372c..e99e5bb 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java
@@ -126,8 +126,8 @@
protected Object getControlObject() {
Map<String, Integer> theMap = new HashMap<String, Integer>();
- theMap.put("aaa", Integer.valueOf(1));
- theMap.put("bbb", Integer.valueOf(2));
+ theMap.put("aaa", 1);
+ theMap.put("bbb", 2);
QName qname = new QName("root");
JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java
index d8f0b8f..fd7d736 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java
@@ -62,10 +62,10 @@
List choiceList = new ArrayList();
choiceList.add(new String("choice string test2"));
choiceList.add(anotherPackageSubType);
- choiceList.add(Integer.valueOf(400));
+ choiceList.add(400);
choiceList.add(subTypeLevel2);
choiceList.add(new String("choice string test"));
- choiceList.add(Integer.valueOf(500));
+ choiceList.add(500);
root.choiceList = choiceList;
return root;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java
index 54b2c95..bfd6c81 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java
@@ -69,7 +69,7 @@
List objectList = new ArrayList(baseTypes);
objectList.add(new String("string test"));
- objectList.add(Integer.valueOf(500));
+ objectList.add(500);
root.objectList = objectList;
return root;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java
index f2c25ff..4c2fbba 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java
@@ -66,7 +66,7 @@
List objectList = new ArrayList(baseTypes);
objectList.add(new String("string test"));
- objectList.add(Integer.valueOf(500));
+ objectList.add(500);
root.objectList = objectList;
return root;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java
index 54b289e..578e6e0 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java
@@ -49,7 +49,7 @@
List objectList = new ArrayList(baseTypes);
objectList.add(new String("string test"));
- objectList.add(Integer.valueOf(500));
+ objectList.add(500);
root.objectList = objectList;
return root;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java
index d7cc78c..efe41a0 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java
@@ -62,7 +62,7 @@
List objectList = new ArrayList(baseTypes);
objectList.add(new String("string test"));
- objectList.add(Integer.valueOf(500));
+ objectList.add(500);
root.objectList = objectList;
List anyObjectList = new ArrayList(baseTypes);
@@ -72,7 +72,7 @@
choiceList.add(anotherPackageSubType);
choiceList.add(subTypeLevel2);
choiceList.add(new String("choice string test"));
- choiceList.add(Integer.valueOf(500));
+ choiceList.add(500);
root.choiceList = choiceList;
return root;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java
index bd86903..4a4cae7 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java
@@ -74,7 +74,7 @@
List objectList = new ArrayList(baseTypes);
objectList.add(new String("string test"));
- objectList.add(Integer.valueOf(500));
+ objectList.add(500);
root.objectList = objectList;
List anyObjectList = new ArrayList(baseTypes);
@@ -84,7 +84,7 @@
choiceList.add(anotherPackageSubType);
choiceList.add(subTypeLevel2);
choiceList.add(new String("choice string test"));
- choiceList.add(Integer.valueOf(500));
+ choiceList.add(500);
root.choiceList = choiceList;
return root;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java
index e4abe9e..3848ca8 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java
@@ -68,7 +68,7 @@
List objectList = new ArrayList(baseTypes);
objectList.add(new String("string test"));
- objectList.add(Integer.valueOf(500));
+ objectList.add(500);
root.objectList = objectList;
List anyObjectList = new ArrayList(baseTypes);
@@ -78,7 +78,7 @@
choiceList.add(anotherPackageSubType);
choiceList.add(subTypeLevel2);
choiceList.add(new String("choice string test"));
- choiceList.add(Integer.valueOf(500));
+ choiceList.add(500);
root.choiceList = choiceList;
return root;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java
index 8cfb76c..bbc14d5 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java
@@ -51,7 +51,7 @@
List objectList = new ArrayList(baseTypes);
objectList.add(new String("string test"));
- objectList.add(Integer.valueOf(500));
+ objectList.add(500);
root.objectList = objectList;
List anyObjectList = new ArrayList(baseTypes);
@@ -61,7 +61,7 @@
choiceList.add(anotherPackageSubType);
choiceList.add(subTypeLevel2);
choiceList.add(new String("choice string test"));
- choiceList.add(Integer.valueOf(500));
+ choiceList.add(500);
root.choiceList = choiceList;
return root;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java
index 2a6af37..43ea379 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java
@@ -44,7 +44,7 @@
JAXBContext ctx = JAXBContextFactory.createContext(new Class[]{EmployeeContext.class}, null);
Marshaller m = ctx.createMarshaller();
m.setProperty(MarshallerProperties.NAMESPACE_PREFIX_MAPPER, new ContextPrefixMapper());
- m.setProperty(XMLConstants.JAXB_FRAGMENT, Boolean.valueOf(true));
+ m.setProperty(XMLConstants.JAXB_FRAGMENT, Boolean.TRUE);
EmployeeContext emp = new EmployeeContext();
emp.firstName = "Jon";
emp.lastName = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java
index 85962fb..ee6fbf5 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java
@@ -40,7 +40,7 @@
@Override
protected Object getControlObject() {
JAXBElement value = new ByteArrayObjectFactory().createBase64Root();
- value.setValue(new Byte[]{Byte.valueOf((byte)1), Byte.valueOf((byte)2), Byte.valueOf((byte)3), Byte.valueOf((byte)4), Byte.valueOf((byte)5), Byte.valueOf((byte)6), Byte.valueOf((byte)7)});
+ value.setValue(new Byte[]{(byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7});
return value;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java
index d42cdb4..ca306d2 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java
@@ -43,7 +43,7 @@
@Override
protected Object getControlObject() {
JAXBElement value = new IntegerObjectFactory().createIntegerRoot();
- value.setValue(Integer.valueOf(27));
+ value.setValue(27);
return value;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java
index e55305e..690f2a9 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java
@@ -47,7 +47,7 @@
streamWriter.writeStartElement("", "root", "someNamespace");
streamWriter.writeDefaultNamespace("someNamespace");
Marshaller marshaller = ctx.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.valueOf(true));
+ marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
marshaller.marshal(new JAXBElement(new QName("employee"), Employee.class, new Employee()), streamWriter);
streamWriter.writeEndElement();
@@ -74,7 +74,7 @@
XMLOutputFactory factory = XMLOutputFactory.newInstance();
// Set IS_REPAIRING_NAMESPACES to true.
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(true));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
XMLStreamWriter streamWriter = factory.createXMLStreamWriter(writer);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java
index 295abaf..4fd980c 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java
@@ -68,7 +68,7 @@
@Override
protected Object getControlObject() {
HashMap<String, Integer> theMap = new HashMap<String, Integer>();
- theMap.put("thekey", Integer.valueOf(10));
+ theMap.put("thekey", 10);
return theMap;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java
index 197a2c1..1523c67 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java
@@ -81,7 +81,7 @@
@Override
protected Object getControlObject() {
HashMap<String, Integer> theMap = new HashMap<String, Integer>();
- theMap.put("thekey", Integer.valueOf(10));
+ theMap.put("thekey", 10);
return theMap;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java
index 9992183..3967b56 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java
@@ -202,7 +202,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer);
Object objectToWrite = getWriteControlObject();
@@ -235,7 +235,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLEventWriter eventWriter= factory.createXMLEventWriter(writer);
Object objectToWrite = getWriteControlObject();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java
index 276e630..5102a7a 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java
@@ -53,11 +53,11 @@
protected Object getControlObject() {
EmployeeCollection employee = new EmployeeCollection();
ArrayList choices = new ArrayList();
- choices.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(21)));
+ choices.add(new JAXBElement(new QName("integer-root"), Integer.class, 21));
choices.add(new JAXBElement(new QName("root"), String.class, "Value1"));
EmployeeCollection nestedEmployee = new EmployeeCollection();
nestedEmployee.refs = new ArrayList();
- nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(29)));
+ nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, 29));
choices.add(nestedEmployee);
choices.add(new JAXBElement(new QName("root"), String.class, "Value2"));
employee.refs = choices;
@@ -70,13 +70,13 @@
//same as getReadControl Except order is different
EmployeeCollection employee = new EmployeeCollection();
ArrayList choices = new ArrayList();
- choices.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(21)));
+ choices.add(new JAXBElement(new QName("integer-root"), Integer.class, 21));
choices.add(new JAXBElement(new QName("root"), String.class, "Value1"));
choices.add(new JAXBElement(new QName("root"), String.class, "Value2"));
EmployeeCollection nestedEmployee = new EmployeeCollection();
nestedEmployee.refs = new ArrayList();
- nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(29)));
+ nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, 29));
choices.add(nestedEmployee);
employee.refs = choices;
return employee;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java
index 384e567..7ba4e1f 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java
@@ -27,7 +27,7 @@
@XmlElementDecl(name="integer-root")
public JAXBElement<Integer> createIntegerRoot() {
- return new JAXBElement<Integer>(new QName("integer-root"), Integer.class, Integer.valueOf(0));
+ return new JAXBElement<Integer>(new QName("integer-root"), Integer.class, 0);
}
public EmployeeCollection createEmployeeCollection() {
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java
index 31d88dd..923a1e3 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java
@@ -44,7 +44,7 @@
barC.a = "a";
barC.b = "b";
foo.collectionChoice.add(barC);
- foo.collectionChoice.add(Integer.valueOf(123));
+ foo.collectionChoice.add(123);
return foo;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java
index 0769922..343846e 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java
@@ -23,7 +23,7 @@
public ExampleEnum marshal(Byte v) throws Exception {
ExampleEnum[] exArray = ExampleEnum.values();
for(ExampleEnum ex : exArray) {
- if(ex.getValue() == (int)v.byteValue()) {
+ if(ex.getValue() == (int) v) {
return ex;
}
}
@@ -32,6 +32,6 @@
@Override
public Byte unmarshal(ExampleEnum v) throws Exception {
- return Byte.valueOf((byte)v.getValue());
+ return (byte) v.getValue();
}
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java
index de1e5b8..c90c0d4 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java
@@ -89,7 +89,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(true));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer);
Object objectToWrite = getWriteControlObject();
@@ -129,7 +129,7 @@
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(true));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer);
Object objectToWrite = getWriteControlObject();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java
index 3223cc7..8d41733 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java
@@ -39,13 +39,13 @@
//same as getReadControl Except order is different
EmployeeCollection employee = new EmployeeCollection();
ArrayList choices = new ArrayList();
- choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(21)));
+ choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, 21));
choices.add(new JAXBElement(new QName("root"), String.class, "Value1"));
choices.add(new JAXBElement(new QName("root"), String.class, "Value2"));
EmployeeCollection nestedEmployee = new EmployeeCollection();
nestedEmployee.refs = new ArrayList();
- nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(29)));
+ nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, 29));
choices.add(nestedEmployee);
employee.refs = choices;
return employee;
@@ -55,11 +55,11 @@
protected Object getControlObject() {
EmployeeCollection employee = new EmployeeCollection();
ArrayList choices = new ArrayList();
- choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(21)));
+ choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, 21));
choices.add(new JAXBElement(new QName("root"), String.class, "Value1"));
EmployeeCollection nestedEmployee = new EmployeeCollection();
nestedEmployee.refs = new ArrayList();
- nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(29)));
+ nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, 29));
choices.add(nestedEmployee);
choices.add(new JAXBElement(new QName("root"), String.class, "Value2"));
employee.refs = choices;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java
index 76df087..a12ce40 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java
@@ -35,7 +35,7 @@
@Override
protected Object getControlObject() {
EmployeeSingle employee = new EmployeeSingle();
- employee.intRoot = new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(21));
+ employee.intRoot = new JAXBElement(new QName("myns", "integer-root"), Integer.class, 21);
return employee;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java
index 23b5304..f6ec0c9 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java
@@ -27,7 +27,7 @@
@XmlElementDecl(namespace="myns", name="integer-root")
public JAXBElement<Integer> createIntegerRoot() {
- return new JAXBElement<Integer>(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(0));
+ return new JAXBElement<Integer>(new QName("myns", "integer-root"), Integer.class, 0);
}
public EmployeeSingle createEmployeeSingle() {
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java
index af5e56d..6d62212 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java
@@ -37,7 +37,7 @@
@XmlElementDecl(name="value", scope=BeanB.class)
public JAXBElement<Integer> createBeanBValue() {
- return new JAXBElement<Integer>(new QName("value"), Integer.class, Integer.valueOf(12));
+ return new JAXBElement<Integer>(new QName("value"), Integer.class, 12);
}
@XmlElementDecl(name="value")
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java
index c91f069..4a7b79a 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java
@@ -43,13 +43,13 @@
EmployeeArray employee = new EmployeeArray();
employee.id = CONTROL_ID;
Object[] choices =new Object[5];
- choices[0]= Integer.valueOf(12);
+ choices[0]= 12;
choices[1]="String Value";
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "123 Fake Street";
choices[2]=addr;
- choices[3]=Integer.valueOf(5);
+ choices[3]= 5;
choices[4] = "";
employee.choice = choices;
return employee;
@@ -60,8 +60,8 @@
EmployeeArray employee = new EmployeeArray();
employee.id = CONTROL_ID;
Object[] choices =new Object[5];
- choices[0]= Integer.valueOf(12);
- choices[1]=Integer.valueOf(5);
+ choices[0]= 12;
+ choices[1]= 5;
choices[2]="String Value";
choices[3] = "";
Address addr = new Address();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java
index 474df1e..d87d360 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java
@@ -40,13 +40,13 @@
EmployeeCollection employee = new EmployeeCollection();
employee.id = CONTROL_ID;
ArrayList choices = new ArrayList();
- choices.add(Integer.valueOf(12));
+ choices.add(12);
choices.add("String Value");
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "123 Fake Street";
choices.add(addr);
- choices.add(Integer.valueOf(5));
+ choices.add(5);
choices.add("");
employee.choice = choices;
return employee;
@@ -57,8 +57,8 @@
EmployeeCollection employee = new EmployeeCollection();
employee.id = CONTROL_ID;
ArrayList choices = new ArrayList();
- choices.add(Integer.valueOf(12));
- choices.add(Integer.valueOf(5));
+ choices.add(12);
+ choices.add(5);
choices.add("String Value");
choices.add("");
Address addr = new Address();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java
index 5167a1e..194a8a2 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java
@@ -46,14 +46,14 @@
EmployeeCollection employee = new EmployeeCollection();
employee.id = CONTROL_ID;
ArrayList choices = new ArrayList();
- choices.add(Integer.valueOf(12));
+ choices.add(12);
choices.add("String Value");
CanadianAddress addr = new CanadianAddress();
addr.city = "Ottawa";
addr.street = "123 Fake Street";
addr.postalCode = "A1A 1A1";
choices.add(addr);
- choices.add(Integer.valueOf(5));
+ choices.add(5);
employee.choice = choices;
return employee;
}
@@ -63,8 +63,8 @@
EmployeeCollection employee = new EmployeeCollection();
employee.id = CONTROL_ID;
ArrayList choices = new ArrayList();
- choices.add(Integer.valueOf(12));
- choices.add(Integer.valueOf(5));
+ choices.add(12);
+ choices.add(5);
choices.add("String Value");
CanadianAddress addr = new CanadianAddress();
addr.city = "Ottawa";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java
index f43958b..7a1eaae 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java
@@ -39,7 +39,7 @@
protected Object getControlObject() {
Employee employee = new Employee();
employee.id = CONTROL_ID;
- employee.choice = Integer.valueOf(12);
+ employee.choice = 12;
return employee;
}
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java
index 562f325..d355afa 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java
@@ -64,7 +64,7 @@
originalEncoding = (String)marshaller.getProperty(Marshaller.JAXB_ENCODING);
originalFormatting = (Boolean)marshaller.getProperty(Marshaller.JAXB_FORMATTED_OUTPUT);
marshaller.setProperty(Marshaller.JAXB_ENCODING, encoding);
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.valueOf(false));
+ marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE);
controlObject = setupControlObject();
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java
index 41db96f..ea1dbd3 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java
@@ -73,7 +73,7 @@
public void testInvalidFormatting() throws Exception {
try {
- Object value = Integer.valueOf(10);
+ Object value = 10;
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, value);
} catch (PropertyException e) {
assertTrue(true);
@@ -89,7 +89,7 @@
StringWriter writer = new StringWriter();
Boolean originalSetting = (Boolean) marshaller.getProperty(Marshaller.JAXB_FORMATTED_OUTPUT);
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.valueOf(isFormatted));
+ marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, isFormatted);
marshaller.marshal(controlObject, writer);
log("Expected:" + controlString);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java
index 92f9c7f..80106d3 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java
@@ -49,7 +49,7 @@
marshaller = jaxbContext.createMarshaller();
originalSetting = (Boolean)marshaller.getProperty(XMLConstants.JAXB_FRAGMENT);
- marshaller.setProperty(XMLConstants.JAXB_FRAGMENT, Boolean.valueOf(true));
+ marshaller.setProperty(XMLConstants.JAXB_FRAGMENT, Boolean.TRUE);
//set up controlObject
controlObject = new Employee();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java
index 4651bb9..d014e75 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java
@@ -25,12 +25,12 @@
*/
public class MarshalListenerImpl implements XMLMarshalListener {
- static Integer EMPLOYEE_BEFORE_MARSHAL = Integer.valueOf(0);
- static Integer ADDRESS_BEFORE_MARSHAL = Integer.valueOf(1);
- static Integer PHONE_BEFORE_MARSHAL = Integer.valueOf(2);
- static Integer EMPLOYEE_AFTER_MARSHAL = Integer.valueOf(3);
- static Integer ADDRESS_AFTER_MARSHAL = Integer.valueOf(4);
- static Integer PHONE_AFTER_MARSHAL = Integer.valueOf(5);
+ static Integer EMPLOYEE_BEFORE_MARSHAL = 0;
+ static Integer ADDRESS_BEFORE_MARSHAL = 1;
+ static Integer PHONE_BEFORE_MARSHAL = 2;
+ static Integer EMPLOYEE_AFTER_MARSHAL = 3;
+ static Integer ADDRESS_AFTER_MARSHAL = 4;
+ static Integer PHONE_AFTER_MARSHAL = 5;
public ArrayList events = null;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java
index 2864a49..a927f03 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java
@@ -25,12 +25,12 @@
*/
public class UnmarshalListenerImpl implements XMLUnmarshalListener {
- static Integer EMPLOYEE_BEFORE_UNMARSHAL = Integer.valueOf(0);
- static Integer ADDRESS_BEFORE_UNMARSHAL = Integer.valueOf(1);
- static Integer PHONE_BEFORE_UNMARSHAL = Integer.valueOf(2);
- static Integer EMPLOYEE_AFTER_UNMARSHAL = Integer.valueOf(3);
- static Integer ADDRESS_AFTER_UNMARSHAL = Integer.valueOf(4);
- static Integer PHONE_AFTER_UNMARSHAL = Integer.valueOf(5);
+ static Integer EMPLOYEE_BEFORE_UNMARSHAL = 0;
+ static Integer ADDRESS_BEFORE_UNMARSHAL = 1;
+ static Integer PHONE_BEFORE_UNMARSHAL = 2;
+ static Integer EMPLOYEE_AFTER_UNMARSHAL = 3;
+ static Integer ADDRESS_AFTER_UNMARSHAL = 4;
+ static Integer PHONE_AFTER_UNMARSHAL = 5;
public ArrayList events = null;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java
index c3ac90e..3c28f91 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java
@@ -24,8 +24,8 @@
import org.w3c.dom.Document;
public class PostBuildEventTestCases extends XMLMappingTestCases {
- static Integer EMPLOYEE_POST_BUILD = Integer.valueOf(0);
- static Integer ADDRESS_POST_BUILD = Integer.valueOf(1);
+ static Integer EMPLOYEE_POST_BUILD = 0;
+ static Integer ADDRESS_POST_BUILD = 1;
EmployeeProject project;
public PostBuildEventTestCases(String name) throws Exception {
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java
index dc4a3c1..3097a7b 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java
@@ -489,7 +489,7 @@
if(XML_OUTPUT_FACTORY != null && staxResultClass != null) {
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer);
Object objectToWrite = getWriteControlObject();
@@ -534,7 +534,7 @@
if(XML_OUTPUT_FACTORY != null && staxResultClass != null) {
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false));
+ factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
XMLEventWriter eventWriter= factory.createXMLEventWriter(writer);
Object objectToWrite = getWriteControlObject();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java
index 3b0fa22..4958f85 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java
@@ -77,7 +77,7 @@
XMLRoot xmlroot2 = new XMLRoot();
- xmlroot2.setObject(Integer.valueOf(15));
+ xmlroot2.setObject(15);
//xmlroot2.setObject("15");
xmlroot2.setLocalName("myns:theInteger");
xmlroot2.setNamespaceURI("www.example.com/some-dir/some.xsd");
@@ -151,7 +151,7 @@
XMLRoot xmlroot2 = new XMLRoot();
- xmlroot2.setObject(Integer.valueOf(15));
+ xmlroot2.setObject(15);
//xmlroot2.setObject("15");
xmlroot2.setLocalName("theInteger");
xmlroot2.setNamespaceURI("www.example.com/some-dir/some.xsd");
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java
index c0b9e64..a471e57 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java
@@ -59,7 +59,7 @@
XMLRoot xmlroot2 = new XMLRoot();
- xmlroot2.setObject(Integer.valueOf(15));
+ xmlroot2.setObject(15);
xmlroot2.setLocalName("theInteger");
xmlroot2.setSchemaType(XMLConstants.INT_QNAME);
any.addElement(xmlroot2);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java
index 274efca..8b18ccf 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java
@@ -52,7 +52,7 @@
Byte[] objectBytes = new Byte[bytes.length];
for (int index = 0; index < bytes.length; index++) {
- objectBytes[index] = Byte.valueOf(bytes[index]);
+ objectBytes[index] = bytes[index];
}
emp.setPhoto(objectBytes);
emp.setData(new DataHandler("THISISATEXTSTRINGFORTHISDATAHANDLER", "text"));
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java
index 15327a2..d8dd422 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java
@@ -47,7 +47,7 @@
byte[] bytes = MyAttachmentUnmarshaller.PHOTO_BASE64.getBytes();
Byte[] objectBytes = new Byte[bytes.length];
for (int index = 0; index < bytes.length; index++) {
- objectBytes[index] = Byte.valueOf(bytes[index]);
+ objectBytes[index] = bytes[index];
}
return new EmployeeWithByteObjectArray(DEFAULT_ID, objectBytes);
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java
index 1a6b4ef..a81ebd5 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java
@@ -47,7 +47,7 @@
byte[] bytes = MyAttachmentUnmarshaller.PHOTO_BASE64.getBytes();
Byte[] objectBytes = new Byte[bytes.length];
for (int index = 0; index < bytes.length; index++) {
- objectBytes[index] = Byte.valueOf(bytes[index]);
+ objectBytes[index] = bytes[index];
}
photos.addElement(objectBytes);
photos.addElement(objectBytes);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java
index b7b6117..a623399 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java
@@ -51,7 +51,7 @@
Byte[] objectBytes = new Byte[bytes.length];
for (int index = 0; index < bytes.length; index++) {
- objectBytes[index] = Byte.valueOf(bytes[index]);
+ objectBytes[index] = bytes[index];
}
photos.addElement(objectBytes);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java
index da9f706..03e594b 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java
@@ -35,7 +35,7 @@
Employee employee = new Employee();
employee.name = "Jane Doe";
- employee.choice = Integer.valueOf(12);
+ employee.choice = 12;
employee.phone = "123-4567";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java
index d0c9437..eb71b63 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java
@@ -46,12 +46,12 @@
employee.choice = new java.util.Vector<Object>();
employee.choice.add("123 Fake Street");
- employee.choice.add(Integer.valueOf(12));
+ employee.choice.add(12);
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "45 O'Connor";
employee.choice.add(addr);
- employee.choice.add(Integer.valueOf(14));
+ employee.choice.add(14);
employee.choice.add("addressString");
@@ -67,12 +67,12 @@
employee.choice = new java.util.Vector<Object>();
employee.choice.add("123 Fake Street");
- employee.choice.add(Integer.valueOf(12));
+ employee.choice.add(12);
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "45 O'Connor";
employee.choice.add(addr);
- employee.choice.add(Integer.valueOf(14));
+ employee.choice.add(14);
XMLRoot xmlRoot = new XMLRoot();
xmlRoot.setLocalName("simpleAddress");
@@ -91,8 +91,8 @@
employee.choice = new java.util.Vector<Object>();
employee.choice.add("123 Fake Street");
- employee.choice.add(Integer.valueOf(12));
- employee.choice.add(Integer.valueOf(14));
+ employee.choice.add(12);
+ employee.choice.add(14);
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "45 O'Connor";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java
index 6801660..8ac85e9 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java
@@ -44,12 +44,12 @@
employee.choice = new java.util.Vector<Object>();
employee.choice.add("123 Fake Street");
- employee.choice.add(Integer.valueOf(12));
+ employee.choice.add(12);
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "45 O'Connor";
employee.choice.add(addr);
- employee.choice.add(Integer.valueOf(14));
+ employee.choice.add(14);
employee.phone = "123-4567";
@@ -64,8 +64,8 @@
employee.choice = new java.util.Vector<Object>();
employee.choice.add("123 Fake Street");
- employee.choice.add(Integer.valueOf(12));
- employee.choice.add(Integer.valueOf(14));
+ employee.choice.add(12);
+ employee.choice.add(14);
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "45 O'Connor";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java
index 35946d1..88b8f7e 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java
@@ -39,12 +39,12 @@
employee.choice = new LinkedList<Object>();
employee.choice.add("123 Fake Street");
- employee.choice.add(Integer.valueOf(12));
+ employee.choice.add(12);
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "45 O'Connor";
employee.choice.add(addr);
- employee.choice.add(Integer.valueOf(14));
+ employee.choice.add(14);
employee.choice.add("addressString");
@@ -60,12 +60,12 @@
employee.choice = new LinkedList<Object>();
employee.choice.add("123 Fake Street");
- employee.choice.add(Integer.valueOf(12));
+ employee.choice.add(12);
Address addr = new Address();
addr.city = "Ottawa";
addr.street = "45 O'Connor";
employee.choice.add(addr);
- employee.choice.add(Integer.valueOf(14));
+ employee.choice.add(14);
XMLRoot xmlRoot = new XMLRoot();
xmlRoot.setLocalName("simpleAddress");
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java
index f36bc40..0aa97d1 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java
@@ -71,7 +71,7 @@
mailingAddress2.setPostalCode(CONTROL_MAILING_ADDRESS_2_POSTAL_CODE);
employee.getMailingAddresses().add(mailingAddress2);
- employee.getMailingAddresses().add(Integer.valueOf(5));
+ employee.getMailingAddresses().add(5);
return employee;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositeobject/self/plsqlcallmodel/PLSQLargument.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositeobject/self/plsqlcallmodel/PLSQLargument.java
index a02f29d..fbb9c24 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositeobject/self/plsqlcallmodel/PLSQLargument.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/compositeobject/self/plsqlcallmodel/PLSQLargument.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -19,9 +19,9 @@
public class PLSQLargument{
- public static final Integer IN = Integer.valueOf(1);
- public static final Integer OUT = Integer.valueOf(2);
- public static final Integer INOUT = Integer.valueOf(3);
+ public static final Integer IN = 1;
+ public static final Integer OUT = 2;
+ public static final Integer INOUT = 3;
public String name;
public int index = MIN_VALUE;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java
index 86be54a..b35f818 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java
@@ -24,9 +24,9 @@
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerIdentifiedByName.xml";
private final static int CONTROL_ID = 123;
- private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100);
- private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200);
- private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300);
+ private final static Integer CONTROL_RESPONSIBILITY1 = 100;
+ private final static Integer CONTROL_RESPONSIBILITY2 = 200;
+ private final static Integer CONTROL_RESPONSIBILITY3 = 300;
public DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java
index 8350116..038dc51 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java
@@ -23,9 +23,9 @@
public class DirectCollectionWithGroupingElementIntegerSingleNodeTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNode.xml";
private final static int CONTROL_ID = 123;
- private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100);
- private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200);
- private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300);
+ private final static Integer CONTROL_RESPONSIBILITY1 = 100;
+ private final static Integer CONTROL_RESPONSIBILITY2 = 200;
+ private final static Integer CONTROL_RESPONSIBILITY3 = 300;
public DirectCollectionWithGroupingElementIntegerSingleNodeTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java
index 1e59389..060d47b 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java
@@ -23,9 +23,9 @@
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerIdentifiedByName.xml";
private final static int CONTROL_ID = 123;
- private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100);
- private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200);
- private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300);
+ private final static Integer CONTROL_RESPONSIBILITY1 = 100;
+ private final static Integer CONTROL_RESPONSIBILITY2 = 200;
+ private final static Integer CONTROL_RESPONSIBILITY3 = 300;
public DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java
index 42261dc..02859bb 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java
@@ -27,9 +27,9 @@
public class DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithComment.xml";
private final static int CONTROL_ID = 123;
- private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100);
- private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200);
- private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300);
+ private final static Integer CONTROL_RESPONSIBILITY1 = 100;
+ private final static Integer CONTROL_RESPONSIBILITY2 = 200;
+ private final static Integer CONTROL_RESPONSIBILITY3 = 300;
public DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/listoflists/XMLDirectCollectionOfListsTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/listoflists/XMLDirectCollectionOfListsTestCases.java
index 6f445a4..fd251b5 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/listoflists/XMLDirectCollectionOfListsTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/listoflists/XMLDirectCollectionOfListsTestCases.java
@@ -37,14 +37,14 @@
Root root = new Root();
ArrayList<Double> values1 = new ArrayList<Double>();
- values1.add(Double.valueOf(1.2));
- values1.add(Double.valueOf(3.4));
- values1.add(Double.valueOf(5.6));
+ values1.add(1.2);
+ values1.add(3.4);
+ values1.add(5.6);
ArrayList<Double> values2 = new ArrayList<Double>();
- values2.add(Double.valueOf(-7.8));
- values2.add(Double.valueOf(-9.0));
- values2.add(Double.valueOf(-1.2));
+ values2.add(-7.8);
+ values2.add(-9.0);
+ values2.add(-1.2);
ArrayList<ArrayList<Double>> itemCollection = new ArrayList<ArrayList<Double>>();
itemCollection.add(values1);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java
index 3da24d3..a01074d 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java
@@ -24,9 +24,9 @@
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIntegerIdentifiedByName.xml";
private final static int CONTROL_ID = 123;
- private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100);
- private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200);
- private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300);
+ private final static Integer CONTROL_RESPONSIBILITY1 = 100;
+ private final static Integer CONTROL_RESPONSIBILITY2 = 200;
+ private final static Integer CONTROL_RESPONSIBILITY3 = 300;
public WithGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java
index 1c189ff..3bde200 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java
@@ -23,9 +23,9 @@
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIntegerIdentifiedByName.xml";
private final static int CONTROL_ID = 123;
- private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100);
- private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200);
- private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300);
+ private final static Integer CONTROL_RESPONSIBILITY1 = 100;
+ private final static Integer CONTROL_RESPONSIBILITY2 = 200;
+ private final static Integer CONTROL_RESPONSIBILITY3 = 300;
public WithoutGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java
index 0a0302d..4de1f50 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java
@@ -25,7 +25,7 @@
public class UnionWithTypeAttributeTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttribute.xml";
- protected final static Integer CONTROL_ITEM = Integer.valueOf(10);
+ protected final static Integer CONTROL_ITEM = 10;
protected final static String CONTROL_FIRST_NAME = "Jane";
protected final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java
index 6182efb..61c90a6 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java
@@ -37,7 +37,7 @@
idMapping.setAttributeName("id");
idMapping.getAttributeName();
idMapping.setXPath("@id");
- idMapping.setNullValue(Integer.valueOf(CONTROL_ID));
+ idMapping.setNullValue(CONTROL_ID);
xmlDescriptor.addMapping(idMapping);
//XMLDirectMapping firstNameMapping = new XMLDirectMapping();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java
index dd60419..042fafa 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java
@@ -36,7 +36,7 @@
XMLDirectMapping idMapping = new XMLDirectMapping();
idMapping.setAttributeName("id");
idMapping.setXPath("id/text()");
- idMapping.setNullValue(Integer.valueOf(CONTROL_ID));
+ idMapping.setNullValue(CONTROL_ID);
xmlDescriptor.addMapping(idMapping);
XMLDirectMapping numericNoNullValueMapping = new XMLDirectMapping();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNanTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNanTestCases.java
index e7725e5..4aea627 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNanTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNanTestCases.java
@@ -37,7 +37,7 @@
employee.setFirstName(CONTROL_FIRST_NAME);
employee.setLastName(CONTROL_LAST_NAME);
employee.setSalary(CONTROL_SALARY);
- double doubleValue = CONTROL_SALARY.doubleValue();
+ double doubleValue = CONTROL_SALARY;
return employee;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNegativeInfinityTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNegativeInfinityTestCases.java
index 624722e..02bade5 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNegativeInfinityTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleNegativeInfinityTestCases.java
@@ -37,7 +37,7 @@
employee.setFirstName(CONTROL_FIRST_NAME);
employee.setLastName(CONTROL_LAST_NAME);
employee.setSalary(CONTROL_SALARY);
- double doubleValue = CONTROL_SALARY.doubleValue();
+ double doubleValue = CONTROL_SALARY;
return employee;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoublePositiveInfinityTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoublePositiveInfinityTestCases.java
index 7b15d69..ebc5bfa 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoublePositiveInfinityTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoublePositiveInfinityTestCases.java
@@ -37,7 +37,7 @@
employee.setFirstName(CONTROL_FIRST_NAME);
employee.setLastName(CONTROL_LAST_NAME);
employee.setSalary(CONTROL_SALARY);
- double doubleValue = CONTROL_SALARY.doubleValue();
+ double doubleValue = CONTROL_SALARY;
return employee;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java
index 69103e2..143d5a9 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java
@@ -22,7 +22,7 @@
private final static int CONTROL_ID = 123;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
- private final static Double CONTROL_SALARY = Double.valueOf(100000.0);
+ private final static Double CONTROL_SALARY = 100000.0;
public DirectToFieldDoubleTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java
index 9febe22..2d63d68 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java
@@ -22,7 +22,7 @@
private final static int CONTROL_ID = 123;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
- private final static Float CONTROL_SALARY = Float.valueOf(100000.0f);
+ private final static Float CONTROL_SALARY = 100000.0f;
public DirectToFieldFloatTestCases(String name) throws Exception {
super(name);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java
index 03c8d20..cc6efd7 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java
@@ -46,7 +46,7 @@
XMLDirectMapping marriedMapping = new XMLDirectMapping();
marriedMapping.setAttributeName("married");
- marriedMapping.setNullValue(Boolean.valueOf(false));
+ marriedMapping.setNullValue(Boolean.FALSE);
marriedMapping.setXPath("married/text()");
descriptor.addMapping(marriedMapping);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java
index 1716849..d625e10 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java
@@ -46,7 +46,7 @@
// TODO: verify EMPTY_STRING behavior
//Object[] isSetParameters = {"x","y", false, (int)1, (short)1, (long)1, (double)1.0, (float)1.0, (byte)1};
- Object[] isSetParameters = {"x","y", Boolean.valueOf(true), Integer.valueOf(255), Short.valueOf((short)32767), Long.valueOf(1), Double.valueOf(1.0), Float.valueOf(-1.0f), Byte.valueOf((byte)32), Character.valueOf('C')};
+ Object[] isSetParameters = {"x","y", Boolean.TRUE, 255, (short) 32767, 1L, 1.0, -1.0f, (byte) 32, 'C'};
//Object[] isSetParameters = {"x","y"};
((IsSetNullPolicy)aNullPolicy).setIsSetMethodName("isSetFirstName");
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java
index a8ae986..334df0c 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java
@@ -50,7 +50,7 @@
Byte[] byteObjects = new Byte[bytes.length];
for (int i = 0; i < bytes.length; i++) {
- byteObjects[i] = Byte.valueOf(bytes[i]);
+ byteObjects[i] = bytes[i];
}
byteHolder.setBytes(byteObjects);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java
index de22a84..531d780 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java
@@ -48,7 +48,7 @@
Byte[] byteObjects = new Byte[bytes.length];
for (int i = 0; i < bytes.length; i++) {
- byteObjects[i] = Byte.valueOf(bytes[i]);
+ byteObjects[i] = bytes[i];
}
byteHolder.setBytes(byteObjects);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java
index 09eefdd..2f9220f 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java
@@ -23,11 +23,11 @@
}
public int getID() {
- return id.intValue();
+ return id;
}
public void setID(int newID) {
- id = Integer.valueOf(newID);
+ id = newID;
}
public Integer getIntegerId() {
return id;
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java
index 0ead7fa..5008ce1 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java
@@ -18,7 +18,7 @@
public class TypeAttributeCustomAddTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAdd.xml";
- private final static Integer CONTROL_ID = Integer.valueOf(123);
+ private final static Integer CONTROL_ID = 123;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java
index 1a05055..8d8061f 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java
@@ -18,7 +18,7 @@
public class TypeAttributeDoubleTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDouble.xml";
- private final static Double CONTROL_ID = Double.valueOf(123.0);
+ private final static Double CONTROL_ID = 123.0;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java
index 2b783af..bac38b4 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java
@@ -18,7 +18,7 @@
public class TypeAttributeFloatTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloat.xml";
- private final static Float CONTROL_ID = Float.valueOf(123.0f);
+ private final static Float CONTROL_ID = 123.0f;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java
index 24b6c71..ee7e025 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java
@@ -18,7 +18,7 @@
public class TypeAttributeIntegerTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeInteger.xml";
- private final static Integer CONTROL_ID = Integer.valueOf(123);
+ private final static Integer CONTROL_ID = 123;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java
index 8e7455e..1a43dc8 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java
@@ -18,7 +18,7 @@
public class TypeAttributeNonXsiPrefixTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefix.xml";
- private final static Integer CONTROL_ID = Integer.valueOf(123);
+ private final static Integer CONTROL_ID = 123;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java
index b21b923..46ac91c 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java
@@ -32,7 +32,7 @@
Employee employee = new Employee();
Identifier id = new Identifier();
id.setInitials("AAA");
- id.setSinNumber(Integer.valueOf(123));
+ id.setSinNumber(123);
employee.setIdentifier(id);
employee.setFirstName(CONTROL_FIRST_NAME);
employee.setLastName(CONTROL_LAST_NAME);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java
index 64c5da1..ff3810c 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java
@@ -18,7 +18,7 @@
public class TypeAttributeUserTypeNamespaceOnChildTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserType1.xml";
- private final static Integer CONTROL_ID = Integer.valueOf(123);
+ private final static Integer CONTROL_ID = 123;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java
index 8b8c699..8209ca4 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java
@@ -18,7 +18,7 @@
public class TypeAttributeUserTypeNamespaceOnParentTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserType2.xml";
- private final static Integer CONTROL_ID = Integer.valueOf(123);
+ private final static Integer CONTROL_ID = 123;
private final static String CONTROL_FIRST_NAME = "Jane";
private final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java
index 5024235..587c5b0 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java
@@ -25,7 +25,7 @@
public class UnionWithTypeAttributeTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttribute.xml";
- protected final static Integer CONTROL_AGE = Integer.valueOf(10);
+ protected final static Integer CONTROL_AGE = 10;
protected final static String CONTROL_FIRST_NAME = "Jane";
protected final static String CONTROL_LAST_NAME = "Doe";
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/Phone.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/Phone.java
index 7b40c86..a5331d2 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/Phone.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/Phone.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -32,7 +32,7 @@
}
public String toString() {
- return "Phone(number=" + ((Integer)number).intValue() + ")";
+ return "Phone(number=" + (Integer) number + ")";
}
public boolean equals(Object object) {
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java
index 38c0a08..964ce7c 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java
@@ -25,7 +25,7 @@
public class TypeTranslatorTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/TypeTranslatorTest.xml";
private final static String CONTROL_EMPLOYEE_NAME = "Jane Doh";
- private final static Integer CONTROL_EMPLOYEE_PHONE = Integer.valueOf(4441234);
+ private final static Integer CONTROL_EMPLOYEE_PHONE = 4441234;
private XMLMarshaller xmlMarshaller;
public TypeTranslatorTestCases(String name) throws Exception {
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java
index d6e8b49..2891e71 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java
@@ -42,7 +42,7 @@
Byte[] byteObjects = new Byte[bytes.length];
for(int i=0; i<bytes.length; i++){
- byteObjects[i] = Byte.valueOf(bytes[i]);
+ byteObjects[i] = bytes[i];
}
byteHolder.setBytes(byteObjects);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/Base64TestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/Base64TestCases.java
index fe8f212..ea475d1 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/Base64TestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/Base64TestCases.java
@@ -35,7 +35,7 @@
public void testIntegerToString_base64() {
try {
- Integer integer = Integer.valueOf(1);
+ Integer integer = 1;
xcm.convertObject(integer, ClassConstants.ABYTE, XMLConstants.BASE_64_BINARY_QNAME);
} catch (ConversionException e) {
assertTrue("The incorrect exception was thrown", e.getErrorCode() == ConversionException.COULD_NOT_BE_CONVERTED);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/DoubleToBigDecimalTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/DoubleToBigDecimalTestCases.java
index fa4bb9f..a6822dd 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/DoubleToBigDecimalTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/DoubleToBigDecimalTestCases.java
@@ -41,7 +41,7 @@
public void testConvertDoubleToBigDecimal2a() {
String controlString = "1";
- Double controlDouble = Double.valueOf(1);
+ Double controlDouble = 1.0;
BigDecimal testBigDecimal = (BigDecimal) xmlConversionManager.convertObject(controlDouble, BigDecimal.class);
String testString = String.valueOf(testBigDecimal);
assertEquals(controlString, testString);
@@ -49,7 +49,7 @@
public void testConvertDoubleToBigDecimal2b() {
String controlString = "1";
- Double controlDouble = Double.valueOf(1.0);
+ Double controlDouble = 1.0;
BigDecimal testBigDecimal = (BigDecimal) xmlConversionManager.convertObject(controlDouble, BigDecimal.class);
String testString = String.valueOf(testBigDecimal);
assertEquals(controlString, testString);
@@ -73,7 +73,7 @@
public void testConvertDoubleToBigDecimal4a() {
String controlString = "1000000000";
- Double controlDouble = Double.valueOf(1000000000);
+ Double controlDouble = 1000000000.0;
BigDecimal testBigDecimal = (BigDecimal) xmlConversionManager.convertObject(controlDouble, BigDecimal.class);
String testString = String.valueOf(testBigDecimal);
assertEquals("1.0E+9", testString);
@@ -81,7 +81,7 @@
public void testConvertDoubleToBigDecimal4b() {
String controlString = "1000000000";
- Double controlDouble = Double.valueOf(1000000000.0);
+ Double controlDouble = 1000000000.0;
BigDecimal testBigDecimal = (BigDecimal) xmlConversionManager.convertObject(controlDouble, BigDecimal.class);
String testString = String.valueOf(testBigDecimal);
assertEquals("1.0E+9", testString);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/NumberTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/NumberTestCases.java
index 526e73d..46293c4 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/NumberTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/NumberTestCases.java
@@ -85,7 +85,7 @@
public void testConvertEmptyStringTo_Double() {
Double test = (Double) xmlConversionManager.convertObject(XMLConstants.EMPTY_STRING, Double.class);
- assertEquals(0.0, test.doubleValue());
+ assertEquals(0.0, test);
}
public void testConvertEmptyStringTo_float() {
@@ -95,7 +95,7 @@
public void testConvertEmptyStringTo_Float() {
Float test = (Float) xmlConversionManager.convertObject(XMLConstants.EMPTY_STRING, Float.class);
- assertEquals(0.0, test.floatValue(), 0);
+ assertEquals(0.0, test, 0);
}
public void testConvertEmptyStringTo_int() {
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/QNameTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/QNameTestCases.java
index f286be1..a739265 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/QNameTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/oxm/xmlconversionmanager/QNameTestCases.java
@@ -116,7 +116,7 @@
public void testIntegerToQName_default() {
try {
- Integer integer = Integer.valueOf(1);
+ Integer integer = 1;
xcm.convertObject(integer, QName.class);
} catch (ConversionException e) {
assertTrue("The incorrect exception was thrown", e.getErrorCode() == ConversionException.COULD_NOT_BE_CONVERTED);
@@ -125,7 +125,7 @@
public void testIntegerToQName_qname() {
try {
- Integer integer = Integer.valueOf(1);
+ Integer integer = 1;
xcm.convertObject(integer, QName.class, XMLConstants.QNAME_QNAME);
} catch (ConversionException e) {
assertTrue("The incorrect exception was thrown", e.getErrorCode() == ConversionException.COULD_NOT_BE_CONVERTED);
diff --git a/sdo/eclipselink.sdo.test.server/src/it/java/org/eclipse/persistence/testing/sdo/server/DeptImpl.java b/sdo/eclipselink.sdo.test.server/src/it/java/org/eclipse/persistence/testing/sdo/server/DeptImpl.java
index f3dd83d..bef1363 100644
--- a/sdo/eclipselink.sdo.test.server/src/it/java/org/eclipse/persistence/testing/sdo/server/DeptImpl.java
+++ b/sdo/eclipselink.sdo.test.server/src/it/java/org/eclipse/persistence/testing/sdo/server/DeptImpl.java
@@ -27,7 +27,7 @@
@Override
public java.lang.Integer getDeptno() {
- return Integer.valueOf(getInt(START_PROPERTY_INDEX + 0));
+ return getInt(START_PROPERTY_INDEX + 0);
}
@Override
diff --git a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/SDODataObject.java b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/SDODataObject.java
index 21f56b8..e0d9946 100644
--- a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/SDODataObject.java
+++ b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/SDODataObject.java
@@ -146,7 +146,7 @@
if (value == null) {
return false;
}
- return value.booleanValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return false;
@@ -160,7 +160,7 @@
if (value == null) {
return 0;
}
- return value.byteValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return 0;
@@ -174,7 +174,7 @@
if (value == null) {
return '\u0000';
}
- return value.charValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return '\u0000';
@@ -188,7 +188,7 @@
if (value == null) {
return 0.0d;
}
- return value.doubleValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return 0.0d;
@@ -202,7 +202,7 @@
if (value == null) {
return 0.0f;
}
- return value.floatValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return 0.0f;
@@ -216,7 +216,7 @@
if (value == null) {
return 0;
}
- return value.intValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return 0;
@@ -230,7 +230,7 @@
if (value == null) {
return 0L;
}
- return value.longValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return 0L;
@@ -244,7 +244,7 @@
if (value == null) {
return 0;
}
- return value.shortValue();
+ return value;
} catch (Exception e) {
// Swallow exception and return null, as per SDO 2.1 spec
return 0;
@@ -981,7 +981,7 @@
if (propertyBooleanValue == null) {
return false;
}
- return propertyBooleanValue.booleanValue();
+ return propertyBooleanValue;
}
@Override
@@ -990,7 +990,7 @@
if (propertyByteValue == null) {
return 0;
}
- return propertyByteValue.byteValue();
+ return propertyByteValue;
}
@Override
@@ -999,7 +999,7 @@
if (propertyCharValue == null) {
return '\u0000';
}
- return propertyCharValue.charValue();
+ return propertyCharValue;
}
@Override
@@ -1008,7 +1008,7 @@
if (propertyDoubleValue == null) {
return 0.0d;
}
- return propertyDoubleValue.doubleValue();
+ return propertyDoubleValue;
}
@Override
@@ -1017,7 +1017,7 @@
if (propertyFloatValue == null) {
return 0.0f;
}
- return propertyFloatValue.floatValue();
+ return propertyFloatValue;
}
@Override
@@ -1026,7 +1026,7 @@
if (propertyIntegerValue == null) {
return 0;
}
- return propertyIntegerValue.intValue();
+ return propertyIntegerValue;
}
@Override
@@ -1035,7 +1035,7 @@
if (propertyLongValue == null) {
return 0L;
}
- return propertyLongValue.longValue();
+ return propertyLongValue;
}
@Override
@@ -1044,7 +1044,7 @@
if (propertyShortValue == null) {
return 0;
}
- return propertyShortValue.shortValue();
+ return propertyShortValue;
}
@Override
diff --git a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOTypesGenerator.java b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOTypesGenerator.java
index 915402a..92d5780 100644
--- a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOTypesGenerator.java
+++ b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOTypesGenerator.java
@@ -476,7 +476,7 @@
String sequencedValue = (String) complexType.getAttributesMap().get(SDOConstants.SDOXML_SEQUENCE_QNAME);
if (sequencedValue != null) {
- currentType.setSequenced(Boolean.valueOf(sequencedValue));
+ currentType.setSequenced(Boolean.parseBoolean(sequencedValue));
}
Annotation annotation = complexType.getAnnotation();
if (annotation != null) {
@@ -1219,7 +1219,7 @@
String manyValue = (String) element.getAttributesMap().get(SDOConstants.SDOXML_MANY_QNAME);
if (manyValue != null) {
- isMany = Boolean.valueOf(manyValue);
+ isMany = Boolean.parseBoolean(manyValue);
}
SDOProperty p = null;
@@ -1713,7 +1713,7 @@
//readOnly annotation
String readOnlyValue = (String) simpleComponent.getAttributesMap().get(SDOConstants.SDOXML_READONLY_QNAME);
if (readOnlyValue != null) {
- p.setReadOnly(Boolean.valueOf(readOnlyValue));
+ p.setReadOnly(Boolean.parseBoolean(readOnlyValue));
}
//dataType annotation
diff --git a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOUnmarshalListener.java b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOUnmarshalListener.java
index b5bba89..42636d1 100644
--- a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOUnmarshalListener.java
+++ b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/SDOUnmarshalListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -217,7 +217,7 @@
//after this loop, lw will have the entire list when logging was turned on
nextCS.pauseLogging();
for (int m = 0; m < indexsToDeleteSize; m++) {
- int toDeleteIndex = ((Integer)indexsToDelete.get(m)).intValue();
+ int toDeleteIndex = (Integer) indexsToDelete.get(m);
SDODataObject nextToDelete = (SDODataObject)toDelete.get(m);
lw.add(toDeleteIndex, nextToDelete);
}
@@ -226,7 +226,7 @@
nextCS.resumeLogging();
nextModifiedDO._setModified(true);
for (int m = indexsToDeleteSize - 1; m >= 0; m--) {
- int toDeleteIndex = ((Integer)indexsToDelete.get(m)).intValue();
+ int toDeleteIndex = (Integer) indexsToDelete.get(m);
SDODataObject nextToDelete = (SDODataObject)toDelete.get(m);
if(nextSeq != null){
nextSeq.addSettingWithoutModifyingDataObject(-1, nextProp, nextToDelete);
diff --git a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/delegates/SDOXSDHelperDelegate.java b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/delegates/SDOXSDHelperDelegate.java
index 7a02c4b..34f2909 100644
--- a/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/delegates/SDOXSDHelperDelegate.java
+++ b/sdo/org.eclipse.persistence.sdo/src/main/java/org/eclipse/persistence/sdo/helper/delegates/SDOXSDHelperDelegate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -152,7 +152,7 @@
SDOProperty sdoProperty = (SDOProperty) property;
Object value = sdoProperty.get(SDOConstants.XMLELEMENT_PROPERTY);
if ((value != null) && value instanceof Boolean) {
- boolean isElement = ((Boolean)value).booleanValue();
+ boolean isElement = (Boolean) value;
if (isElement) {
return false;
}
@@ -184,7 +184,7 @@
SDOProperty sdoProperty = (SDOProperty) property;
Object value = sdoProperty.get(SDOConstants.XMLELEMENT_PROPERTY);
if ((value != null) && value instanceof Boolean) {
- return ((Boolean)value).booleanValue();
+ return (Boolean) value;
}
if ((sdoProperty.getOpposite() != null) && (sdoProperty.getOpposite().isContainment())) {
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/SDOTestCase.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/SDOTestCase.java
index 9fa7b02..071acec 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/SDOTestCase.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/SDOTestCase.java
@@ -406,9 +406,9 @@
} else if (aType.equals(SDO_CHARACTER)) {
assertEquals(0, ((Character)aPropertyValue).charValue());
} else if (aType.equals(SDO_DOUBLE)) {
- assertEquals(0, ((Double)aPropertyValue).doubleValue());
+ assertEquals(0, (Double) aPropertyValue);
} else if (aType.equals(SDO_FLOAT)) {
- assertEquals(0, ((Float)aPropertyValue).floatValue());
+ assertEquals(0, (Float) aPropertyValue);
} else if (aType.equals(SDO_INT)) {
assertEquals(0, ((Integer)aPropertyValue).intValue());
} else if (aType.equals(SDO_SHORT)) {
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xmlhelper/loadandsave/withoutxsd/LoadAndSaveNestedSchemaTypeTestCases.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xmlhelper/loadandsave/withoutxsd/LoadAndSaveNestedSchemaTypeTestCases.java
index 1260c74..e04150a 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xmlhelper/loadandsave/withoutxsd/LoadAndSaveNestedSchemaTypeTestCases.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xmlhelper/loadandsave/withoutxsd/LoadAndSaveNestedSchemaTypeTestCases.java
@@ -63,7 +63,7 @@
assertNotNull(prop);
assertEquals(SDOConstants.SDO_INT, prop.getType());
assertTrue(value instanceof Integer);
- assertEquals(Integer.valueOf(10), value);
+ assertEquals(10, value);
}
}
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/attributes/XSDHelperAttributeTestCases.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/attributes/XSDHelperAttributeTestCases.java
index 2eab211..02b39f7 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/attributes/XSDHelperAttributeTestCases.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/attributes/XSDHelperAttributeTestCases.java
@@ -232,7 +232,7 @@
assertEquals(myTestType, p.getContainingType());
// check default value !! it is propbably good to also test string !!
// !! reason: getDefault() returns Obj, but actual xml default value can be int or float which is not Obj !!
- assertEquals(p.getDefault(), Integer.valueOf(3));
+ assertEquals(p.getDefault(), 3);
// check opposite Property
assertNull(p.getOpposite());
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/elements/XSDHelperElementTestCases.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/elements/XSDHelperElementTestCases.java
index 8183157..ce3b142 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/elements/XSDHelperElementTestCases.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/define/elements/XSDHelperElementTestCases.java
@@ -242,7 +242,7 @@
assertEquals(p.getContainingType().getName(), "myTestType");
// check default value !! facing same problem as attribute's test !!
- assertEquals(p.getDefault(), Integer.valueOf(3));
+ assertEquals(p.getDefault(), 3);
// check opposite Property
assertNull(p.getOpposite());
@@ -489,7 +489,7 @@
assertEquals(p.getContainingType().getName(), "myTestType");
// check default value !! may have the problem as in attriutes' test !!
- assertEquals(p.getDefault(), Integer.valueOf(3));
+ assertEquals(p.getDefault(), 3);
// check opposite Property
assertNull(p.getOpposite());
@@ -535,7 +535,7 @@
assertEquals(p.getContainingType().getName(), "myTestType");
// check default value !! may have the problem as in attriutes' test !!
- assertEquals(p.getDefault(), Integer.valueOf(3));
+ assertEquals(p.getDefault(), 3);
// check opposite Property
assertNull(p.getOpposite());
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/defineandgenerate/DefineAndGenerateNillableTestCases.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/defineandgenerate/DefineAndGenerateNillableTestCases.java
index ffd79ef..1aca809 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/defineandgenerate/DefineAndGenerateNillableTestCases.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/helper/xsdhelper/defineandgenerate/DefineAndGenerateNillableTestCases.java
@@ -59,7 +59,7 @@
//prop.setAttribute(true);
//prop.setElement(false);
prop.setXsd(true);
- prop.setDefault(Integer.valueOf(0));
+ prop.setDefault(0);
prop.setXsdLocalName("myAttr");
customerSDOType.addDeclaredProperty(prop);
@@ -70,7 +70,7 @@
//prop2.setElement(true);
prop2.setInstanceProperty(SDOConstants.XMLELEMENT_PROPERTY, Boolean.TRUE);
prop2.setXsd(true);
- prop2.setDefault(Integer.valueOf(0));
+ prop2.setDefault(0);
prop2.setXsdLocalName("myNonSpecified");
prop2.setXsdType(XMLConstants.INT_QNAME);
@@ -89,7 +89,7 @@
prop3.setXsdLocalName("myNonNillable");
prop3.setContainment(true);
- prop3.setDefault(Integer.valueOf(0));
+ prop3.setDefault(0);
customerSDOType.addDeclaredProperty(prop3);
@@ -98,7 +98,7 @@
prop4.setType(intType);
//prop4.setAttribute(false);
prop4.setXsd(true);
- prop4.setDefault(Integer.valueOf(0));
+ prop4.setDefault(0);
prop4.setContainment(true);
//prop4.setElement(true);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java
index 954d432..64f708e 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java
@@ -41,7 +41,7 @@
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setType(SDOConstants.SDO_BOOLEAN);
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setMany(true);
- Boolean bb = Boolean.valueOf(true);
+ Boolean bb = Boolean.TRUE;
List b = new ArrayList();
//b.add(bb);
@@ -59,7 +59,7 @@
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setType(SDOConstants.SDO_BOOLEAN);
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setMany(true);
- Boolean bb = Boolean.valueOf(true);
+ Boolean bb = Boolean.TRUE;
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
@@ -76,7 +76,7 @@
public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketInPathMiddle() {
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setType(SDOConstants.SDO_BOOLEAN);
- Boolean b = Boolean.valueOf(true);
+ Boolean b = Boolean.TRUE;
dataObject_a.setBoolean(property1, true);// c dataobject's a property has value boolean 'true'
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java
index 0cba900..346c95c 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java
@@ -82,9 +82,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTER);
- Character b = Character.valueOf('1');
+ Character b = '1';
- dataObject.setChar(property, b.charValue());// add it to instance list
+ dataObject.setChar(property, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(property));
@@ -104,9 +104,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_DOUBLE);
- Double b = Double.valueOf(0);
+ Double b = (double) 0;
- dataObject.setDouble(property, b.doubleValue());// add it to instance list
+ dataObject.setDouble(property, b);// add it to instance list
assertEquals(false, dataObject.getBoolean(property));
@@ -126,9 +126,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_FLOAT);
- Float b = Float.valueOf(1.20f);
+ Float b = 1.20f;
- dataObject.setFloat(property, b.floatValue());// add it to instance list
+ dataObject.setFloat(property, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(property));
@@ -148,9 +148,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_INT);
- Integer b = Integer.valueOf(0);
+ Integer b = 0;
- dataObject.setInt(property, b.intValue());// add it to instance list
+ dataObject.setInt(property, b);// add it to instance list
assertEquals(false, dataObject.getBoolean(property));
@@ -170,9 +170,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_LONG);
- Double b = Double.valueOf(0);
+ Double b = (double) 0;
- dataObject.setDouble(property, b.doubleValue());// add it to instance list
+ dataObject.setDouble(property, b);// add it to instance list
assertEquals(false, dataObject.getBoolean(property));
@@ -193,9 +193,9 @@
property.setType(SDOConstants.SDO_SHORT);
short s = 12;
- Short b = Short.valueOf(s);
+ Short b = s;
- dataObject.setShort(property, b.shortValue());// add it to instance list
+ dataObject.setShort(property, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(property));
@@ -334,9 +334,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTEROBJECT);
- Character b = Character.valueOf('1');
+ Character b = '1';
- dataObject.setChar(property, b.charValue());// add it to instance list
+ dataObject.setChar(property, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(property));
@@ -356,9 +356,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_DOUBLEOBJECT);
- Double b = Double.valueOf(0);
+ Double b = (double) 0;
- dataObject.setDouble(property, b.doubleValue());// add it to instance list
+ dataObject.setDouble(property, b);// add it to instance list
assertEquals(false, dataObject.getBoolean(property));
@@ -377,9 +377,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_FLOATOBJECT);
- Float b = Float.valueOf(1.20f);
+ Float b = 1.20f;
- dataObject.setFloat(property, b.floatValue());// add it to instance list
+ dataObject.setFloat(property, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(property));
@@ -399,9 +399,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_INTOBJECT);
- Integer b = Integer.valueOf(0);
+ Integer b = 0;
- dataObject.setInt(property, b.intValue());// add it to instance list
+ dataObject.setInt(property, b);// add it to instance list
assertEquals(false, dataObject.getBoolean(property));
@@ -421,9 +421,9 @@
property.setType(SDOConstants.SDO_SHORTOBJECT);
short s = 12;
- Short b = Short.valueOf(s);
+ Short b = s;
- dataObject.setShort(property, b.shortValue());// add it to instance list
+ dataObject.setShort(property, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(property));
@@ -443,9 +443,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTEROBJECT);
- Character b = Character.valueOf('t');
+ Character b = 't';
- dataObject.setChar(property, b.charValue());// add it to instance list
+ dataObject.setChar(property, b);// add it to instance list
try {
//this.assertEquals(true, dataObject_a.getBoolean(property));
@@ -462,9 +462,9 @@
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTEROBJECT);
- Character b = Character.valueOf('f');
+ Character b = 'f';
- dataObject.setChar(property, b.charValue());// add it to instance list
+ dataObject.setChar(property, b);// add it to instance list
try {
//this.assertEquals(true, dataObject_a.getBoolean(property));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java
index 95d3683..1c75dff 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java
@@ -179,10 +179,10 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Float s = Float.valueOf(0);
+ Float s = (float) 0;
//Short c = Short.valueOf(s);
- dataObject_a.setFloat(property, s.floatValue());// c dataobject's a property has value boolean 'true'
+ dataObject_a.setFloat(property, s);// c dataobject's a property has value boolean 'true'
assertEquals(false, dataObject_a.getBoolean(property));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java
index aa1c69f..d1c5725 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java
@@ -81,9 +81,9 @@
SDOProperty property = type.getProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTER);
- Character b = Character.valueOf('0');
+ Character b = '0';
- dataObject.setChar(PROPERTY_INDEX, b.charValue());// add it to instance list
+ dataObject.setChar(PROPERTY_INDEX, b);// add it to instance list
assertEquals(false, dataObject.getBoolean(PROPERTY_INDEX));
@@ -104,9 +104,9 @@
SDOProperty property = type.getProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_DOUBLE);
- Double b = Double.valueOf(0);
+ Double b = (double) 0;
- dataObject.setDouble(PROPERTY_INDEX, b.doubleValue());// add it to instance list
+ dataObject.setDouble(PROPERTY_INDEX, b);// add it to instance list
assertEquals(false, dataObject.getBoolean(PROPERTY_INDEX));
@@ -127,9 +127,9 @@
SDOProperty property = type.getProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_FLOAT);
- Float b = Float.valueOf(1.01f);
+ Float b = 1.01f;
- dataObject.setFloat(PROPERTY_INDEX, b.floatValue());// add it to instance list
+ dataObject.setFloat(PROPERTY_INDEX, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(PROPERTY_INDEX));
@@ -150,9 +150,9 @@
SDOProperty property = type.getProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_INT);
- Integer b = Integer.valueOf(1);
+ Integer b = 1;
- dataObject.setLong(PROPERTY_INDEX, b.intValue());// add it to instance list
+ dataObject.setLong(PROPERTY_INDEX, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(PROPERTY_INDEX));
@@ -173,9 +173,9 @@
SDOProperty property = type.getProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_LONG);
- Long b = Long.valueOf(1);
+ Long b = 1L;
- dataObject.setLong(PROPERTY_INDEX, b.longValue());// add it to instance list
+ dataObject.setLong(PROPERTY_INDEX, b);// add it to instance list
assertEquals(true, dataObject.getBoolean(PROPERTY_INDEX));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java
index 470ba8c..fa85417 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java
@@ -328,7 +328,7 @@
public void testGetByteFromCharacterObject() {
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTEROBJECT);
- Character theValue = Character.valueOf('e');
+ Character theValue = 'e';
dataObject.set(property, theValue);
try {
dataObject.getByte(property);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java
index 372a265..cb36f32 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java
@@ -232,7 +232,7 @@
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setType(SDOConstants.SDO_STRING);
char str = 'c';
- Character B_STR = Character.valueOf(str);
+ Character B_STR = str;
dataObject_a.setString(propertyPath_a_b_c, B_STR.toString());// add it to instance list
assertEquals(str, dataObject_a.getChar(property));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java
index e826594..52c1fa7 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java
@@ -170,7 +170,7 @@
property.setType(SDOConstants.SDO_STRING);
char str = 'c';
- Character B_STR = Character.valueOf(str);
+ Character B_STR = str;
dataObject.setString(property, B_STR.toString());// add it to instance list
assertEquals(str, dataObject.getChar(property));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java
index c9a65a5..0e69522 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java
@@ -203,7 +203,7 @@
dataObject_c._setType(type_c);
char str = 'c';
- Character B_STR = Character.valueOf(str);
+ Character B_STR = str;
dataObject_a.setString(propertyPath_a_b_c, B_STR.toString());// add it to instance list
assertEquals(str, dataObject_a.getChar(property));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java
index 26b8df6..bd6d127 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java
@@ -175,7 +175,7 @@
type.addDeclaredProperty(property);
char str = 'c';
- Character B_STR = Character.valueOf(str);
+ Character B_STR = str;
dataObject.setString(PROPERTY_INDEX, B_STR.toString());// add it to instance list
assertEquals(str, dataObject.getChar(PROPERTY_INDEX));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java
index d820d0b..a4be20b 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java
@@ -127,7 +127,7 @@
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setType(SDOConstants.SDO_BOOLEAN);
boolean c = true;
- Boolean C = Boolean.valueOf(c);
+ Boolean C = c;
dataObject_c.set(property_c, C);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java
index cbb696f..be95ba0 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java
@@ -63,7 +63,7 @@
dataObject_c._setType(type_c);
boolean c = true;
- Boolean C = Boolean.valueOf(c);
+ Boolean C = c;
dataObject_c.set(property_c, C);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java
index 391e7e0..ffafe0e 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java
@@ -212,7 +212,7 @@
public void testGetDateFromInteger() {
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_INTEGER);
- dataObject.set(property, Integer.valueOf(2));
+ dataObject.set(property, 2);
try {
dataObject.getDate(property);
fail("ClassCastException should be thrown.");
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java
index 7074ea9..4f3ff51 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java
@@ -253,7 +253,7 @@
property_c.setType(SDOConstants.SDO_INTEGER);
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Integer value = Integer.valueOf(3);
+ Integer value = 3;
dataObject_c.set(property_c, value);
try {
dataObject_a.getDate(propertyPath_a_b_c);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java
index f5e133c..6411664 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java
@@ -203,7 +203,7 @@
public void testGetDateFromInteger() {
SDOProperty property = type.getProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_INTEGER);
- dataObject.set(property, Integer.valueOf(2));
+ dataObject.set(property, 2);
try {
dataObject.getDate(PROPERTY_INDEX);
fail("ClassCastException should be thrown.");
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java
index 6763319..31699b0 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java
@@ -66,7 +66,7 @@
public void testGetDecimalFromCharacter() {
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTER);
- dataObject.set(property, Character.valueOf('y'));
+ dataObject.set(property, 'y');
try {
dataObject.getBigDecimal(property);
fail("ClassCastException should be thrown.");
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java
index 30706af..64f0654 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java
@@ -94,7 +94,7 @@
property.setName(PROPERTY_NAME);
property.setType(SDOConstants.SDO_FLOAT);
- Float fl = Float.valueOf(12);
+ Float fl = 12F;
BigDecimal bd = new BigDecimal(fl);
dataObject.setFloat(PROPERTY_INDEX, fl);// add it to instance list
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java
index b001c0e..52d3b7b 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java
@@ -224,7 +224,7 @@
double delta = 0.0;
dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list
- assertEquals(s_d.doubleValue(), dataObject_a.getDouble(propertyPath_a_b_c), delta);
+ assertEquals(s_d, dataObject_a.getDouble(propertyPath_a_b_c), delta);
}
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java
index 10cde1b..ddf6b5a 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java
@@ -228,7 +228,7 @@
double delta = 0.0;
dataObject.setString(property, str);// add it to instance list
- assertEquals(s_d.doubleValue(), dataObject.getDouble(property), delta);
+ assertEquals(s_d, dataObject.getDouble(property), delta);
}
//16. purpose: getDouble with Undefined string Property
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java
index 8699730..3ebc5bf 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java
@@ -266,7 +266,7 @@
double delta = 0.0;
dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list
- assertEquals(s_d.doubleValue(), dataObject_a.getDouble(propertyPath_a_b_c), delta);
+ assertEquals(s_d, dataObject_a.getDouble(propertyPath_a_b_c), delta);
}
//16. purpose: getDouble with Undefined string Property
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java
index 94b8a7d..8af8821 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java
@@ -161,7 +161,7 @@
double delta = 0.0;
dataObject.setString(PROPERTY_INDEX, str);// add it to instance list
- assertEquals(s_d.doubleValue(), dataObject.getDouble(PROPERTY_INDEX), delta);
+ assertEquals(s_d, dataObject.getDouble(PROPERTY_INDEX), delta);
}
//17. purpose: getDouble with bytes property
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java
index 98f9e05..25a5032 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java
@@ -358,7 +358,7 @@
public void testGetFloatFromCharacterObject() {
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTEROBJECT);
- dataObject.set(property, Character.valueOf('y'));
+ dataObject.set(property, 'y');
try {
dataObject.getFloat(property);
fail("ClassCastException should be thrown.");
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java
index b5bd7ae..630d15b 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java
@@ -32,7 +32,7 @@
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setType(SDOConstants.SDO_BOOLEAN);
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setMany(true);
- Boolean bb = Boolean.valueOf(true);
+ Boolean bb = Boolean.TRUE;
List b = new ArrayList();
//b.add(bb);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java
index b8799ee..5b1a5f5 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java
@@ -362,7 +362,7 @@
public void testGetLongFromCharacterObject() {
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTEROBJECT);
- dataObject.set(property, Character.valueOf('v'));
+ dataObject.set(property, 'v');
try {
dataObject.getLong(property);
fail("ClassCastException should be thrown.");
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java
index 1ee665b..c61d71c 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java
@@ -326,7 +326,7 @@
public void testGetShortFromCharacterObject() {
SDOProperty property = dataObject.getInstanceProperty(PROPERTY_NAME);
property.setType(SDOConstants.SDO_CHARACTEROBJECT);
- dataObject.set(property,Character.valueOf('a'));
+ dataObject.set(property, 'a');
try {
dataObject.getShort(property);
fail("ClassCastException should be thrown.");
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java
index 0addcf0..fffc4eb 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java
@@ -44,7 +44,7 @@
dataObject_c.getInstanceProperty(PROPERTY_NAME_C).setType(SDOConstants.SDO_BOOLEAN);
boolean str = true;
- Boolean B_STR = Boolean.valueOf(str);
+ Boolean B_STR = str;
dataObject_a.setBoolean(propertyPath_a_b_c, str);// add it to instance list
assertEquals(B_STR.toString(), dataObject_a.getString(propertyPath_a_b_c));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java
index 7b57eea..8473630 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java
@@ -45,7 +45,7 @@
property.setType(SDOConstants.SDO_BOOLEAN);
boolean str = true;
- Boolean B_STR = Boolean.valueOf(str);
+ Boolean B_STR = str;
dataObject.setBoolean(property, str);// add it to instance list
assertEquals(B_STR.toString(), dataObject.getString(property));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java
index 37a667a..62cad50 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java
@@ -45,7 +45,7 @@
dataObject_c._setType(type_c);
boolean str = true;
- Boolean B_STR = Boolean.valueOf(str);
+ Boolean B_STR = str;
dataObject_a.setBoolean(propertyPath_a_b_c, str);// add it to instance list
assertEquals(B_STR.toString(), dataObject_a.getString(propertyPath_a_b_c));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java
index ff13a08..82de1d8 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java
@@ -45,7 +45,7 @@
property.setType(SDOConstants.SDO_BOOLEAN);
boolean str = true;
- Boolean B_STR = Boolean.valueOf(str);
+ Boolean B_STR = str;
dataObject.setBoolean(PROPERTY_INDEX, str);// add it to instance list
assertEquals(B_STR.toString(), dataObject.getString(PROPERTY_INDEX));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java
index b46c710..066906e 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java
@@ -34,7 +34,7 @@
dataObject_c._setType(type_c);
boolean c = true;
- Boolean C = Boolean.valueOf(c);
+ Boolean C = c;
//dataObject_a.setBoolean("PName-a/PName-b/PName-c", c);// c dataobject's a property has value boolean 'true'
dataObject_a.set("PName-a/PName-b/PName-c", C);
@@ -51,7 +51,7 @@
dataObject_c._setType(type_c);
boolean c = true;
- Boolean C = Boolean.valueOf(c);
+ Boolean C = c;
dataObject_a.setBoolean("PName-a/PName-b/PName-c", c);// c dataobject's a property has value boolean 'true'
//dataObject_a.set("PName-a/PName-b/PName-c", C);
@@ -68,7 +68,7 @@
dataObject_c_bNotSDODataOject._setType(type_c_bNotSDODataOject);
boolean c = true;
- Boolean C = Boolean.valueOf(c);
+ Boolean C = c;
//dataObject_c_bNotSDODataOject.setBoolean(property_c_bNotSDODataOject, c);// c dataobject's a property has value boolean 'true'
try {
@@ -123,7 +123,7 @@
public void testGetBooleanConversionFromPathWithLength_1() {
property_a_pathLength_1.setType(SDOConstants.SDO_BOOLEAN);
boolean b = true;
- Boolean B = Boolean.valueOf(b);
+ Boolean B = b;
dataObject_a_pathLength_1.setBoolean("PName-a-length-1", b);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java
index d34c280..25838d7 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java
@@ -117,7 +117,7 @@
public void testSetDefineOpenContentManySimpleProperty() throws Exception {
List value = new ArrayList();
- value.add(Integer.valueOf(4));
+ value.add(4);
rootDataObject.set("addressOpenContent", value);
Property openProp = rootDataObject.getInstanceProperty("addressOpenContent");
assertNotNull(openProp);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java
index 95d2da6..ebf535f 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java
@@ -100,7 +100,7 @@
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
SDOProperty prop = (SDOProperty) myDOType.getProperty("myBoolean");
- boolean b = Boolean.valueOf("true").booleanValue();
+ boolean b = Boolean.parseBoolean("true");
myDO.setBoolean(prop, b);
boolean myboolean = myDO.getBoolean(prop);
assertTrue("Expected Boolean [" + b + "], but was [" + myboolean + "]", myboolean == b);
@@ -120,7 +120,7 @@
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
SDOProperty prop = (SDOProperty) myDOType.getProperty("myByte");
- byte b = Byte.valueOf("8").byteValue();
+ byte b = Byte.parseByte("8");
myDO.setByte(prop, b);
byte mybyte = myDO.getByte(prop);
assertTrue("Expected byte [" + b + "], but was [" + mybyte + "]", mybyte == b);
@@ -141,8 +141,8 @@
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
SDOProperty prop = (SDOProperty) myDOType.getProperty("myBytes");
- byte b1 = Byte.valueOf("16").byteValue();
- byte b2 = Byte.valueOf("8").byteValue();
+ byte b1 = Byte.parseByte("16");
+ byte b2 = Byte.parseByte("8");
byte[] bytes = new byte[] {b1, b2};
myDO.setBytes(prop, bytes);
@@ -293,7 +293,7 @@
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
SDOProperty prop = (SDOProperty) myDOType.getProperty("myShort");
- short s = Short.valueOf("66").shortValue();
+ short s = Short.parseShort("66");
myDO.setShort(prop, s);
short myshort = myDO.getShort(prop);
assertTrue("Expected short [" + s + "], but was [" + myshort + "]", myshort == s);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java
index dd3aec9..029f67e 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java
@@ -94,7 +94,7 @@
myProp.set("type", SDOConstants.SDO_BOOLEAN);
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
- boolean b = Boolean.valueOf("true").booleanValue();
+ boolean b = Boolean.parseBoolean("true");
myDO.setBoolean("myBoolean", b);
boolean myboolean = myDO.getBoolean("myBoolean");
assertTrue("Expected Boolean [" + b + "], but was [" + myboolean + "]", myboolean == b);
@@ -113,7 +113,7 @@
myProp.set("type", SDOConstants.SDO_BYTE);
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
- byte b = Byte.valueOf("8").byteValue();
+ byte b = Byte.parseByte("8");
myDO.setByte("myByte", b);
byte mybyte = myDO.getByte("myByte");
assertTrue("Expected byte [" + b + "], but was [" + mybyte + "]", mybyte == b);
@@ -133,8 +133,8 @@
myProp.set("type", SDOConstants.SDO_BYTES);
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
- byte b1 = Byte.valueOf("16").byteValue();
- byte b2 = Byte.valueOf("8").byteValue();
+ byte b1 = Byte.parseByte("16");
+ byte b2 = Byte.parseByte("8");
byte[] bytes = new byte[] {b1, b2};
myDO.setBytes("myBytes", bytes);
@@ -278,7 +278,7 @@
myProp.set("type", SDOConstants.SDO_SHORT);
myProp.set("many", Boolean.valueOf("true"));
Type myDOType = typeHelper.define(myDO);
- short s = Short.valueOf("66").shortValue();
+ short s = Short.parseShort("66");
myDO.setShort("myShort", s);
short myshort = myDO.getShort("myShort");
assertTrue("Expected short [" + s + "], but was [" + myshort + "]", myshort == s);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java
index f3c92d2..4ee55da 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java
@@ -44,7 +44,7 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Boolean bb = Boolean.valueOf(true);
+ Boolean bb = Boolean.TRUE;
List b = new ArrayList();
//b.add(bb);
@@ -65,7 +65,7 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Boolean bb = Boolean.valueOf(true);
+ Boolean bb = Boolean.TRUE;
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
@@ -83,7 +83,7 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Boolean b = Boolean.valueOf(true);
+ Boolean b = Boolean.TRUE;
dataObject_a.setBoolean(property1, true);// c dataobject's a property has value boolean 'true'
@@ -150,11 +150,11 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Character bb = Character.valueOf('1');
+ Character bb = '1';
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setChar(property + ".0", bb.charValue());
+ dataObject_a.setChar(property + ".0", bb);
assertEquals(true, dataObject_a.getBoolean(property + ".0"));
@@ -180,11 +180,11 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Double bb = Double.valueOf(1);
+ Double bb = 1.0;
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setDouble(property + ".0", bb.doubleValue());
+ dataObject_a.setDouble(property + ".0", bb);
assertEquals(true, dataObject_a.getBoolean(property + ".0"));
@@ -210,11 +210,11 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Float bb = Float.valueOf(1);
+ Float bb = 1F;
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setFloat(property + ".0", bb.floatValue());
+ dataObject_a.setFloat(property + ".0", bb);
assertEquals(true, dataObject_a.getBoolean(property + ".0"));
@@ -241,11 +241,11 @@
dataObject_c._setType(type_c);
//short s = 1;
- Integer bb = Integer.valueOf(1);
+ Integer bb = 1;
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setInt(property + ".0", bb.intValue());
+ dataObject_a.setInt(property + ".0", bb);
assertEquals(true, dataObject_a.getBoolean(property + ".0"));
@@ -272,11 +272,11 @@
dataObject_c._setType(type_c);
long s = 1;
- Long bb = Long.valueOf(s);
+ Long bb = s;
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setLong(property + ".0", bb.longValue());
+ dataObject_a.setLong(property + ".0", bb);
assertEquals(true, dataObject_a.getBoolean(property + ".0"));
@@ -303,11 +303,11 @@
dataObject_c._setType(type_c);
short s = 1;
- Short bb = Short.valueOf(s);
+ Short bb = s;
List b = new ArrayList();
dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setShort(property + ".0", bb.shortValue());
+ dataObject_a.setShort(property + ".0", bb);
assertEquals(true, dataObject_a.getBoolean(property + ".0"));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java
index 3a45f5c..9e61ebb8 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java
@@ -274,7 +274,7 @@
dataObject_c._setType(type_c);
char str = 'c';
- Character B_STR = Character.valueOf(str);
+ Character B_STR = str;
dataObject_a.setString(propertyPath_a_b_c, B_STR.toString());// add it to instance list
assertEquals(str, dataObject_a.getChar(property));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java
index 5a9d265..5e8b905 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java
@@ -137,7 +137,7 @@
dataObject_c._setType(type_c);
boolean c = true;
- Boolean C = Boolean.valueOf(c);
+ Boolean C = c;
dataObject_c.set(property_c, C);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java
index 9671cd1..b66cc84 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java
@@ -346,7 +346,7 @@
double delta = 0.0;
dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list
- assertEquals(s_d.doubleValue(), dataObject_a.getDouble(propertyPath_a_b_c), delta);
+ assertEquals(s_d, dataObject_a.getDouble(propertyPath_a_b_c), delta);
}
//16. purpose: getDouble with Undefined string Property
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java
index a25c14e..4a863c3 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java
@@ -36,7 +36,7 @@
type_c.addDeclaredProperty(property_c);
dataObject_c._setType(type_c);
- Boolean bb = Boolean.valueOf(true);
+ Boolean bb = Boolean.TRUE;
List b = new ArrayList();
//b.add(bb);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java
index 96c6ce7..a36ad6c 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java
@@ -48,7 +48,7 @@
dataObject_c._setType(type_c);
boolean str = true;
- Boolean B_STR = Boolean.valueOf(str);
+ Boolean B_STR = str;
dataObject_a.setBoolean(propertyPath_a_b_c, str);// add it to instance list
assertEquals(B_STR.toString(), dataObject_a.getString(propertyPath_a_b_c));
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java
index 1fd5844..53998de 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java
@@ -85,8 +85,8 @@
//type_c0.addDeclaredProperty(property_c1_object);
List objects = new ArrayList();
- Boolean b = Boolean.valueOf(true);
- Boolean bb = Boolean.valueOf(false);
+ Boolean b = Boolean.TRUE;
+ Boolean bb = Boolean.FALSE;
objects.add(b);
objects.add(bb);
@@ -143,7 +143,7 @@
// type_c0.addDeclaredProperty(property_c1_object);
- Boolean b = Boolean.valueOf(true);
+ Boolean b = Boolean.TRUE;
dataObject_a.setBoolean("PName-a0/PName-b0[number='1']/PName-c1.0", true);
@@ -159,7 +159,7 @@
type_c0.addDeclaredProperty(property_c1_object);
- Boolean b = Boolean.valueOf(true);
+ Boolean b = Boolean.TRUE;
dataObject_c0.setBoolean("PName-c1.0", true);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java
index 80d6e92..309f1ee 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java
@@ -50,8 +50,8 @@
List objects = new ArrayList();
byte by = 12;
byte by1 = 1;
- Byte b = Byte.valueOf(by);
- Byte bb = Byte.valueOf(by1);
+ Byte b = by;
+ Byte bb = by1;
objects.add(b);
objects.add(bb);
@@ -109,7 +109,7 @@
type_c0.addDeclaredProperty(property_c1_object);
byte by = 12;
- Byte b = Byte.valueOf(by);
+ Byte b = by;
dataObject_a.set("PName-a0/PName-b0[number='1']/PName-c1.0", b);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java
index a4a5ab1..cc2ab91 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java
@@ -48,8 +48,8 @@
List objects = new ArrayList();
char c = 'c';
char c1 = 'a';
- Character b = Character.valueOf(c);
- Character bb = Character.valueOf(c1);
+ Character b = c;
+ Character bb = c1;
objects.add(b);
objects.add(bb);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java
index ee156dd..1050d03 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java
@@ -77,7 +77,7 @@
DataObject sampleDataObject = dataFactory.create(theType);
Property prop = sampleDataObject.getInstanceProperty("testProp");
- sampleDataObject.set(prop,Boolean.valueOf(true));
+ sampleDataObject.set(prop, Boolean.TRUE);
try {
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java
index 6813d65..ce47f46 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java
@@ -44,14 +44,14 @@
SDOProperty property_c1_object = dataObject_c1.getInstanceProperty("PName-c1");
property_c1_object.setType(SDOConstants.SDO_DOUBLE);
List objects = new ArrayList();
- Double b = Double.valueOf(12);
- Double bb = Double.valueOf(11);
+ Double b = 12.0;
+ Double bb = 11.0;
objects.add(b);
objects.add(bb);
dataObject_c1.set(property_c1_object, objects);
//dataObject_c1.set("PName-a0/PName-b0[number='1']/PName-c1", objects);// add it to instance list
- assertEquals("testGetBooleanConversionFromDefinedPropertyWithPath failed", bb.doubleValue(), dataObject_a.getDouble("PName-a0/PName-b0[number='1']/PName-c1.1"), (float)0.0);
+ assertEquals("testGetBooleanConversionFromDefinedPropertyWithPath failed", bb, dataObject_a.getDouble("PName-a0/PName-b0[number='1']/PName-c1.1"), (float)0.0);
}
//2. purpose: getDataObject with property value is not dataobject
@@ -100,10 +100,10 @@
property_c1_object.setType(SDOConstants.SDO_DOUBLE);
type_c0.addDeclaredProperty(property_c1_object);*/
- Double b = Double.valueOf(12);
+ Double b = 12.0;
- dataObject_a.setDouble("PName-a0/PName-b0[number='1']/PName-c1.0", b.doubleValue());
+ dataObject_a.setDouble("PName-a0/PName-b0[number='1']/PName-c1.0", b);
- assertEquals("testSetGetDataObjectWithQueryPath failed", b.doubleValue(), dataObject_a.getDouble("PName-a0/PName-b0[number='1']/PName-c1.0"), (float)0.0);
+ assertEquals("testSetGetDataObjectWithQueryPath failed", b, dataObject_a.getDouble("PName-a0/PName-b0[number='1']/PName-c1.0"), (float)0.0);
}
}
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java
index b68827d..f868537 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java
@@ -32,13 +32,13 @@
SDOProperty prop = dataObject_c0.getType().getProperty("test");
prop.setType(SDOConstants.SDO_FLOAT);
- Float bb = Float.valueOf(1.2f);
+ Float bb = 1.2f;
//List b = new ArrayList();
//dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setFloat(propertyTest + "test", bb.floatValue());
+ dataObject_a.setFloat(propertyTest + "test", bb);
- assertEquals("testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignBracketInPathDotSet failed", bb.floatValue(), dataObject_a.getFloat(propertyTest + "test"), (float)0.0);
+ assertEquals("testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignBracketInPathDotSet failed", bb, dataObject_a.getFloat(propertyTest + "test"), (float)0.0);
}
// purpose: opencontent properties
@@ -46,14 +46,14 @@
SDOProperty property_c1_object = dataObject_c1.getInstanceProperty("PName-c1");
property_c1_object.setType(SDOConstants.SDO_FLOAT);
List objects = new ArrayList();
- Float b = Float.valueOf(2f);
- Float bb = Float.valueOf(12f);
+ Float b = 2f;
+ Float bb = 12f;
objects.add(b);
objects.add(bb);
dataObject_c1.set(property_c1_object, objects);// add it to instance list
- assertEquals("testGetBooleanConversionFromDefinedPropertyWithPath failed", bb.floatValue(), dataObject_a.getFloat("PName-a0/PName-b0[number='1']/PName-c1.1"), (float)0.0);
+ assertEquals("testGetBooleanConversionFromDefinedPropertyWithPath failed", bb, dataObject_a.getFloat("PName-a0/PName-b0[number='1']/PName-c1.1"), (float)0.0);
}
//2. purpose: getDataObject with property value is not dataobject
@@ -102,10 +102,10 @@
type_c0.addDeclaredProperty(property_c1_object);
- Float b = Float.valueOf(12);
+ Float b = 12F;
- dataObject_a.setFloat("PName-a0/PName-b0[number='1']/PName-c1.0", b.floatValue());
+ dataObject_a.setFloat("PName-a0/PName-b0[number='1']/PName-c1.0", b);
- assertEquals("testSetGetDataObjectWithQueryPath failed", b.floatValue(), dataObject_a.getFloat("PName-a0/PName-b0[number='1']/PName-c1.0"), (float)0.0);
+ assertEquals("testSetGetDataObjectWithQueryPath failed", b, dataObject_a.getFloat("PName-a0/PName-b0[number='1']/PName-c1.0"), (float)0.0);
}
}
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java
index 9481c68..ac7bb23 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java
@@ -31,11 +31,11 @@
public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignBracketInPathDotSet() {
SDOProperty prop = dataObject_c0.getType().getProperty("test");
prop.setType(SDOConstants.SDO_INT);
- Integer bb = Integer.valueOf(12);
+ Integer bb = 12;
//List b = new ArrayList();
//dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setInt(propertyTest + "test", bb.intValue());
+ dataObject_a.setInt(propertyTest + "test", bb);
assertEquals(bb.intValue(), dataObject_a.getInt(propertyTest + "test"));
}
@@ -47,8 +47,8 @@
//type_c0.addDeclaredProperty(property_c1_object);
List objects = new ArrayList();
- Integer b = Integer.valueOf(12);
- Integer bb = Integer.valueOf(2);
+ Integer b = 12;
+ Integer bb = 2;
objects.add(b);
objects.add(bb);
@@ -103,9 +103,9 @@
type_c0.addDeclaredProperty(property_c1_object);
- Integer b = Integer.valueOf(12);
+ Integer b = 12;
- dataObject_a.setInt("PName-a0/PName-b0[number='1']/PName-c1.0", b.intValue());
+ dataObject_a.setInt("PName-a0/PName-b0[number='1']/PName-c1.0", b);
assertEquals(b.intValue(), dataObject_a.getInt("PName-a0/PName-b0[number='1']/PName-c1.0"));
}
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java
index 2602b57..bab421f 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java
@@ -34,7 +34,7 @@
prop.setType(SDOConstants.SDO_BOOLEAN);
prop.setMany(true);
- Boolean bb = Boolean.valueOf(true);
+ Boolean bb = Boolean.TRUE;
List b = new ArrayList();
b.add(bb);
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java
index 241cfd7..d99bcd4 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java
@@ -30,11 +30,11 @@
SDOProperty prop = dataObject_c0.getType().getProperty("test");
prop.setType(SDOConstants.SDO_LONG);
- Long bb = Long.valueOf(12);
+ Long bb = 12L;
//List b = new ArrayList();
//dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setLong(propertyTest + "test", bb.longValue());
+ dataObject_a.setLong(propertyTest + "test", bb);
assertEquals(bb.longValue(), dataObject_a.getLong(propertyTest + "test"));
}
@@ -44,8 +44,8 @@
SDOProperty property_c1_object = dataObject_c1.getInstanceProperty("PName-c1");
property_c1_object.setType(SDOConstants.SDO_LONG);
List objects = new ArrayList();
- Long b = Long.valueOf(12);
- Long bb = Long.valueOf(2);
+ Long b = 12L;
+ Long bb = 2L;
objects.add(b);
objects.add(bb);
@@ -100,9 +100,9 @@
type_c0.addDeclaredProperty(property_c1_object);
- Long bb = Long.valueOf(12);
+ Long bb = 12L;
- dataObject_a.setLong("PName-a0/PName-b0[number='1']/PName-c1.0", bb.longValue());
+ dataObject_a.setLong("PName-a0/PName-b0[number='1']/PName-c1.0", bb);
assertEquals(bb.longValue(), dataObject_a.getLong("PName-a0/PName-b0[number='1']/PName-c1.0"));
}
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java
index 623d0b5..d97a313 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java
@@ -33,11 +33,11 @@
prop.setType(SDOConstants.SDO_SHORT);
short s = 12;
- Short bb = Short.valueOf(s);
+ Short bb = s;
//List b = new ArrayList();
//dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true'
- dataObject_a.setShort(propertyTest + "test", bb.shortValue());
+ dataObject_a.setShort(propertyTest + "test", bb);
assertEquals(bb.shortValue(), dataObject_a.getShort(propertyTest + "test"));
}
@@ -49,9 +49,9 @@
List objects = new ArrayList();
short s = 12;
- Short b = Short.valueOf(s);
+ Short b = s;
short s1 = 12;
- Short bb = Short.valueOf(s1);
+ Short bb = s1;
objects.add(b);
objects.add(bb);
@@ -102,9 +102,9 @@
property_c1_object.setType(SDOConstants.SDO_SHORT);
short s = 12;
- Short bb = Short.valueOf(s);
+ Short bb = s;
- dataObject_a.setShort("PName-a0/PName-b0[number='1']/PName-c1.0", bb.shortValue());
+ dataObject_a.setShort("PName-a0/PName-b0[number='1']/PName-c1.0", bb);
assertEquals(bb.shortValue(), dataObject_a.getShort("PName-a0/PName-b0[number='1']/PName-c1.0"));
}
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/sequence/SDOSequenceTestXSD.java b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/sequence/SDOSequenceTestXSD.java
index 9e21b49..7724faa 100644
--- a/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/sequence/SDOSequenceTestXSD.java
+++ b/sdo/org.eclipse.persistence.sdo/src/test/java/org/eclipse/persistence/testing/sdo/model/sequence/SDOSequenceTestXSD.java
@@ -772,7 +772,7 @@
assertNotNull(aPOSequence);
// get sequence id
int sequenceIndex = getNthSequenceIndexFor(aPOSequence, PO_POID_NAME);
- int poid2 = ((Integer)aPOSequence.getValue(sequenceIndex)).intValue();
+ int poid2 = (Integer) aPOSequence.getValue(sequenceIndex);
assertEquals(nextPOID, poid2);
}
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/advancedjdbcpackage/AdvancedJDBCPackageTestSuite.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/advancedjdbcpackage/AdvancedJDBCPackageTestSuite.java
index 068e3e0..ee52b18 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/advancedjdbcpackage/AdvancedJDBCPackageTestSuite.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/advancedjdbcpackage/AdvancedJDBCPackageTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -294,7 +294,7 @@
@Test
public void buildEmpArray() {
Invocation invocation = new Invocation("buildEmpArray");
- invocation.setParameter("NUM", Integer.valueOf(3));
+ invocation.setParameter("NUM", 3);
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/rowtype/RowTypeTestSuite.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/rowtype/RowTypeTestSuite.java
index 6801385..7bd47b8 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/rowtype/RowTypeTestSuite.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/rowtype/RowTypeTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -238,7 +238,7 @@
public void rowTypeTest() {
Invocation invocation = new Invocation("rowtypeTest");
Operation op = xrService.getOperation(invocation.getName());
- invocation.setParameter("PARAM1", Integer.valueOf(1));
+ invocation.setParameter("PARAM1", 1);
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
Document doc = xmlPlatform.createDocument();
@@ -251,7 +251,7 @@
public void rowTypeTest2() {
Invocation invocation = new Invocation("rowtypeTest2");
Operation op = xrService.getOperation(invocation.getName());
- invocation.setParameter("PARAM1", Integer.valueOf(1));
+ invocation.setParameter("PARAM1", 1);
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
Document doc = xmlPlatform.createDocument();
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlIndexTableType.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlIndexTableType.java
index af3e3f5..99b24da 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlIndexTableType.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlIndexTableType.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -33,7 +33,7 @@
}
else {
m_elemTypecode = OracleTypes.CHAR;
- m_maxElemLen = Integer.valueOf(getDefaultTypeLen("VARCHAR2"));
+ m_maxElemLen = Integer.parseInt(getDefaultTypeLen("VARCHAR2"));
}
}
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlRecordType.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlRecordType.java
index 6a3fbe5..96ec659 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlRecordType.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/PlsqlRecordType.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -117,7 +117,7 @@
data_level++;
iter = viewCache.getRows(ALL_ARGUMENTS, new String[0], new String[]{OWNER, PACKAGE_NAME,
OBJECT_NAME, OVERLOAD, DATA_LEVEL}, new Object[]{schema, packageName,
- methodName, methodNo, Integer.valueOf(data_level)}, new String[]{SEQUENCE});
+ methodName, methodNo, data_level}, new String[]{SEQUENCE});
viewRows = new ArrayList<ViewRow>();
while (iter.hasNext()) { // DISTINCT
UserArguments item = (UserArguments)iter.next();
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SequencedInfo.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SequencedInfo.java
index 403277b..4c88210 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SequencedInfo.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SequencedInfo.java
@@ -56,6 +56,6 @@
if (i == null) {
return 0;
}
- return i.intValue();
+ return i;
}
}
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlName.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlName.java
index 0b1dacd..8ebcfae 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlName.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlName.java
@@ -745,10 +745,10 @@
public boolean hasConversion() {
if (m_hasConversion == null) {
- m_hasConversion = Boolean.valueOf(getIntoConversion() != null
- || getOutOfConversion() != null);
+ m_hasConversion = getIntoConversion() != null
+ || getOutOfConversion() != null;
}
- return m_hasConversion.booleanValue();
+ return m_hasConversion;
}
/**
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlPackageType.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlPackageType.java
index fa7e993..de02175 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlPackageType.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlPackageType.java
@@ -123,11 +123,11 @@
if (m_methodFilter != null && m_methodFilter.isSingleMethod()) {
keys = new String[]{OWNER, PACKAGE_NAME, OBJECT_NAME, DATA_LEVEL};
values = new Object[]{schema, name, m_methodFilter.getSingleMethodName(),
- Integer.valueOf(0)};
+ 0};
}
else {
keys = new String[]{OWNER, Util.PACKAGE_NAME, Util.DATA_LEVEL};
- values = new Object[]{schema, name, Integer.valueOf(0)};
+ values = new Object[]{schema, name, 0};
}
Iterator<ViewRow> iter = m_viewCache.getRows(ALL_ARGUMENTS, new String[0], keys, values,
new String[0]);
@@ -156,11 +156,11 @@
keys = new String[]{OWNER, PACKAGE_NAME, OBJECT_NAME,
DATA_LEVEL, POSITION};
values = new Object[]{schema, name, methodFilter.getSingleMethodName(),
- Integer.valueOf(0), Integer.valueOf(0)};
+ 0, 0};
}
else {
keys = new String[]{OWNER, PACKAGE_NAME, DATA_LEVEL, POSITION};
- values = new Object[]{schema, name, Integer.valueOf(0), Integer.valueOf(0)};
+ values = new Object[]{schema, name, 0, 0};
}
Iterator<ViewRow> iter = viewCache.getRows(ALL_ARGUMENTS, new String[0], keys, values,
@@ -222,11 +222,11 @@
if (methodFilter != null && methodFilter.isSingleMethod()) {
keys = new String[]{OWNER, PACKAGE_NAME, OBJECT_NAME, DATA_LEVEL};
values = new Object[]{schema, name, methodFilter.getSingleMethodName(),
- Integer.valueOf(0)};
+ 0};
}
else {
keys = new String[]{OWNER, PACKAGE_NAME, DATA_LEVEL};
- values = new Object[]{schema, name, Integer.valueOf(0)};
+ values = new Object[]{schema, name, 0};
}
Iterator<ViewRow> iter = viewCache.getRows(ALL_ARGUMENTS, new String[0], keys, values,
new String[0]);
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlReflector.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlReflector.java
index a3ccb42..950dbb4 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlReflector.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlReflector.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -607,8 +607,8 @@
if (outParams == null) {
throw new SQLException("no data from sqljutl.get_typecode call");
}
- dbTypeCode = ((Integer)outParams[0]).intValue();
- kind = ((Integer)outParams[2]).intValue();
+ dbTypeCode = (Integer) outParams[0];
+ kind = (Integer) outParams[2];
}
catch (SQLException exn) {
String msg = exn.getMessage();
@@ -993,7 +993,7 @@
int pos;
String annotation;
boolean isPlsqlIndexTable = false;
- int maxLen = Integer.valueOf(DEFAULT_VARCHAR_LEN);
+ int maxLen = Integer.parseInt(DEFAULT_VARCHAR_LEN);
int maxElemLen = -1;
boolean isNumeric = true;
if ((pos = javaName.indexOf("[")) >= 0) {
@@ -1025,7 +1025,7 @@
}
javaName = javaName + "[]";
if (maxElemLen == -1) {
- maxElemLen = Integer.valueOf(getDefaultTypeLen("VARCHAR2"));
+ maxElemLen = Integer.parseInt(getDefaultTypeLen("VARCHAR2"));
}
}
else {
@@ -1318,7 +1318,7 @@
try {
String v = m_conn.getMetaData().getDatabaseProductVersion().toUpperCase();
if (v.startsWith("ORACLE DATABASE 10G") || v.startsWith("ORACLE DATABASE 11G")) {
- m_isPre920 = Boolean.valueOf(false);
+ m_isPre920 = Boolean.FALSE;
return false;
}
int pos = v.indexOf("ORACLE");
@@ -1331,17 +1331,17 @@
|| vp.equals("ORACLE10")
|| (vp.equals("ORACLE9I") && (v.indexOf("9.2.") > 0 || v.indexOf("9.3.") > 0 || v
.indexOf("9.4.") > 0))) {
- m_isPre920 = Boolean.valueOf(false);
+ m_isPre920 = Boolean.FALSE;
}
}
catch (Exception e) {
// Connection is pre 9.2.0
}
if (m_isPre920 == null) {
- m_isPre920 = Boolean.valueOf(true);
+ m_isPre920 = Boolean.TRUE;
}
}
- return m_isPre920.booleanValue();
+ return m_isPre920;
}
public boolean geqOracle9() {
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlStmtMethod.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlStmtMethod.java
index 35d2dd0..9558f11 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlStmtMethod.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlStmtMethod.java
@@ -123,9 +123,9 @@
// e.printStackTrace(); //D+
throw new SQLException(e.getMessage());
}
- sqlStmtParamModesV.add(Integer.valueOf(ProcedureMethod.IN));
+ sqlStmtParamModesV.add(ProcedureMethod.IN);
if (unique) {
- uniqueParamModesV.add(Integer.valueOf(ProcedureMethod.IN));
+ uniqueParamModesV.add(ProcedureMethod.IN);
}
m_sqlStmtTmp = m_sqlStmtTmp.substring(0, idx0) + "?"
+ m_sqlStmtTmp.substring(idx1 + 1);
@@ -147,7 +147,7 @@
int jj = sqlStmtParamNamesV.size() - j - 1;
m_sqlStmtParamNames[jj] = sqlStmtParamNamesV.get(j);
m_sqlStmtParamTypes[jj] = sqlStmtParamTypesV.get(j);
- m_sqlStmtParamModes[jj] = sqlStmtParamModesV.get(j).intValue();
+ m_sqlStmtParamModes[jj] = sqlStmtParamModesV.get(j);
}
m_paramNames = new String[uniqueParamNamesV.size()];
m_paramTypes = new TypeClass[uniqueParamNamesV.size()];
@@ -156,7 +156,7 @@
int jj = uniqueParamNamesV.size() - j - 1;
m_paramNames[jj] = uniqueParamNamesV.get(j);
m_paramTypes[jj] = uniqueParamTypesV.get(j);
- m_paramModes[jj] = uniqueParamModesV.get(j).intValue();
+ m_paramModes[jj] = uniqueParamModesV.get(j);
}
}
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlToplevelType.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlToplevelType.java
index 5fb2961..ab647e4 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlToplevelType.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlToplevelType.java
@@ -88,7 +88,7 @@
names.add(Util.PACKAGE_NAME);
values.add(null);
names.add(Util.DATA_LEVEL);
- values.add(Integer.valueOf(0));
+ values.add(0);
if (m_methodFilter != null) {
List<String> methodNames = m_methodFilter.getMethodNames();
if (methodNames != null) {
@@ -111,15 +111,15 @@
if (methodNo == null) {
iter = m_viewCache.getRows(ALL_ARGUMENTS, new String[0], new String[]{OWNER,
PACKAGE_NAME, PACKAGE_NAME, OBJECT_NAME, DATA_LEVEL,
- POSITION}, new Object[]{schema, method, null, method, Integer.valueOf(0),
- Integer.valueOf(0)}, new String[0]);
+ POSITION}, new Object[]{schema, method, null, method, 0,
+ 0}, new String[0]);
}
else {
iter = m_viewCache.getRows(ALL_ARGUMENTS, new String[0], new String[]{OWNER,
PACKAGE_NAME, PACKAGE_NAME, OBJECT_NAME, OVERLOAD,
DATA_LEVEL, POSITION}, new Object[]{schema, method, null, method,
- methodNo, Integer.valueOf(0), Integer.valueOf(0)}, new String[0]);
+ methodNo, 0, 0}, new String[0]);
}
return ResultInfo.getResultInfo(iter);
}
@@ -131,7 +131,7 @@
if (methodNo == null) {
iter = m_viewCache.getRows(ALL_ARGUMENTS, new String[0], new String[]{OWNER,
PACKAGE_NAME, PACKAGE_NAME, OBJECT_NAME, DATA_LEVEL,
- ARGUMENT_NAME}, new Object[]{schema, method, null, method, Integer.valueOf(0),
+ ARGUMENT_NAME}, new Object[]{schema, method, null, method, 0,
NOT_NULL}, new String[]{POSITION});
}
@@ -139,7 +139,7 @@
iter = m_viewCache.getRows(ALL_ARGUMENTS, new String[0], new String[]{OWNER,
PACKAGE_NAME, PACKAGE_NAME, OBJECT_NAME, OVERLOAD,
DATA_LEVEL, ARGUMENT_NAME}, new Object[]{schema, method, null, method,
- methodNo, Integer.valueOf(0), NOT_NULL}, new String[]{POSITION});
+ methodNo, 0, NOT_NULL}, new String[]{POSITION});
}
return ParamInfo.getParamInfo(iter);
}
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlTypeWithMethods.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlTypeWithMethods.java
index 15055de..ae19ec4 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlTypeWithMethods.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/SqlTypeWithMethods.java
@@ -172,14 +172,14 @@
try {
paramNames_v.add(paramName[i]);
String mode = paramMode[i];
- paramModes_v.add(Integer.valueOf((mode == null) ? ProcedureMethod.INOUT : (mode
- .equals("IN") ? ProcedureMethod.IN : (mode.equals("OUT") ? ProcedureMethod.OUT
- : ProcedureMethod.INOUT))));
+ paramModes_v.add((mode == null) ? ProcedureMethod.INOUT : (mode
+ .equals("IN") ? ProcedureMethod.IN : (mode.equals("OUT") ? ProcedureMethod.OUT
+ : ProcedureMethod.INOUT)));
paramTypes_v.add(m_reflector.addPlsqlDBType(paramTypeOwner[i],
paramTypeName[i], paramTypeSubname[i], paramTypeMod[i],
mcharFormOfUse[i], type, paramMethodName[i], paramMethodNo[i],
sequence[i], this));
- paramNCharFormOfUse_v.add(Boolean.valueOf(mcharFormOfUse[i]));
+ paramNCharFormOfUse_v.add(mcharFormOfUse[i]);
}
catch (SQLException e) {
e.printStackTrace();
@@ -201,8 +201,8 @@
for (int i = 0; i < len; i++) {
paramTypes[i] = (paramTypes_v.get(i));
paramNames[i] = paramNames_v.get(i);
- paramModes[i] = paramModes_v.get(i).intValue();
- paramNCharFormOfUse[i] = paramNCharFormOfUse_v.get(i).booleanValue();
+ paramModes[i] = paramModes_v.get(i);
+ paramNCharFormOfUse[i] = paramNCharFormOfUse_v.get(i);
}
paramTypes = generateDefaultArgsHolderParamTypes(paramTypes, paramDefaults,
@@ -289,13 +289,13 @@
if (overload == null || overload.equals("")) {
rowIter = m_viewCache.getRows(Util.ALL_ARGUMENTS, new String[]{"DEFAULTED"},
new String[]{"OBJECT_ID", "OBJECT_NAME", "SEQUENCE", "OVERLOAD"}, new Object[]{
- Integer.valueOf(object_id), methodName, Integer.valueOf(sequence), null},
+ object_id, methodName, sequence, null},
new String[0]);
}
else {
rowIter = m_viewCache.getRows(Util.ALL_ARGUMENTS, new String[]{"DEFAULTED"},
new String[]{"OBJECT_ID", "OBJECT_NAME", "SEQUENCE", "OVERLOAD"}, new Object[]{
- Integer.valueOf(object_id), methodName, Integer.valueOf(sequence), overload},
+ object_id, methodName, sequence, overload},
new String[0]);
}
if (rowIter.hasNext()) {
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/ViewCache.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/ViewCache.java
index bceccf1..50b3adc 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/ViewCache.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/shadowddlgeneration/oldjpub/ViewCache.java
@@ -217,7 +217,7 @@
for (i = inParams.length; i < inParams.length + types.length; i++) {
int index = i - inParams.length;
if (types[index] == OracleTypes.INTEGER) {
- outParamList.add(Integer.valueOf(stmt.getInt(i + 1)));
+ outParamList.add(stmt.getInt(i + 1));
}
else if (types[index] == OracleTypes.VARCHAR) {
outParamList.add(stmt.getString(i + 1));
@@ -239,7 +239,7 @@
private Object[] toObject(int[] types) {
Object[] obj = new Object[types.length];
for (int i = 0; i < types.length; i++) {
- obj[i] = Integer.valueOf(types[i]);
+ obj[i] = types[i];
}
return obj;
}
@@ -458,11 +458,11 @@
}
// summary
m_user = (String)in.readObject();
- m_hits = ((Integer)in.readObject()).intValue();
- m_visits = ((Integer)in.readObject()).intValue();
+ m_hits = (Integer) in.readObject();
+ m_visits = (Integer) in.readObject();
// m_rowsCache
- int rowsCacheSize = ((Integer)in.readObject()).intValue();
+ int rowsCacheSize = (Integer) in.readObject();
m_rowsCache = new ArrayList(rowsCacheSize);
for (int i = 0; i < rowsCacheSize; i++) {
RowsCacheEntry rce = (RowsCacheEntry)in.readObject();
@@ -470,11 +470,11 @@
}
// m_rowsCacheIndex (String, ArrayList<ViewRow>)
- int rowsCacheIndexSize = ((Integer)in.readObject()).intValue();
+ int rowsCacheIndexSize = (Integer) in.readObject();
m_rowsCacheIndex = new HashMap(rowsCacheIndexSize);
for (int i = 0; i < rowsCacheIndexSize; i++) {
String key = (String)in.readObject();
- int rowsSize = ((Integer)in.readObject()).intValue();
+ int rowsSize = (Integer) in.readObject();
ArrayList rows = new ArrayList(rowsSize);
for (int j = 0; j < rowsSize; j++) {
ViewRow row = (ViewRow)in.readObject();
@@ -491,24 +491,24 @@
}
// summary
out.writeObject(m_user);
- out.writeObject(Integer.valueOf(m_hits));
- out.writeObject(Integer.valueOf(m_visits));
+ out.writeObject(m_hits);
+ out.writeObject(m_visits);
// m_rowsCache
- out.writeObject(Integer.valueOf(m_rowsCache.size()));
+ out.writeObject(m_rowsCache.size());
for (int i = 0; i < m_rowsCache.size(); i++) {
RowsCacheEntry rce = (RowsCacheEntry)m_rowsCache.get(i);
out.writeObject(rce);
}
// m_rowsCacheIndex (String, ArrayList<ViewRow>)
- out.writeObject(Integer.valueOf(m_rowsCacheIndex.size()));
+ out.writeObject(m_rowsCacheIndex.size());
Iterator keys = m_rowsCacheIndex.keySet().iterator();
Iterator values = m_rowsCacheIndex.values().iterator();
while (keys.hasNext()) {
out.writeObject(keys.next());
ArrayList rows = (ArrayList)values.next();
- out.writeObject(Integer.valueOf(rows.size()));
+ out.writeObject(rows.size());
for (int i = 0; i < rows.size(); i++) {
out.writeObject(rows.get(i));
}
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/tabletype/TableTypeTestSuite.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/tabletype/TableTypeTestSuite.java
index 0a6c3b2..8d3ecca 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/tabletype/TableTypeTestSuite.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/tabletype/TableTypeTestSuite.java
@@ -441,7 +441,7 @@
// verify that 'sal' and 'c' fields were updated successfully
XRDynamicEntity tableTypeEntity = (XRDynamicEntity) result;
- assertTrue("Expected [sal] '112000.99' but was '" + tableTypeEntity.get("sal") + "'", Float.compare(tableTypeEntity.get("sal"), Float.valueOf(112000.99f)) == 0);
+ assertTrue("Expected [sal] '112000.99' but was '" + tableTypeEntity.get("sal") + "'", Float.compare(tableTypeEntity.get("sal"), 112000.99f) == 0);
Character[] chars = tableTypeEntity.get("c");
StringBuilder sb = new StringBuilder(chars.length);
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/toplevelsimpleplsqlsp/TopLevelSimplePLSQLSPTestSuite.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/toplevelsimpleplsqlsp/TopLevelSimplePLSQLSPTestSuite.java
index b2ecc08..ae46006 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/toplevelsimpleplsqlsp/TopLevelSimplePLSQLSPTestSuite.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/toplevelsimpleplsqlsp/TopLevelSimplePLSQLSPTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -234,7 +234,7 @@
@Test
public void testBoolean() {
Invocation invocation = new Invocation("testBoolean");
- invocation.setParameter("X", Integer.valueOf(0));
+ invocation.setParameter("X", 0);
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
@@ -255,7 +255,7 @@
@Test
public void testBooleanIn() {
Invocation invocation = new Invocation("testBooleanIn");
- invocation.setParameter("X", Integer.valueOf(0));
+ invocation.setParameter("X", 0);
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/types/TypesTestSuite.java b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/types/TypesTestSuite.java
index 32d79c6..4f48c43 100644
--- a/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/types/TypesTestSuite.java
+++ b/utils/eclipselink.dbws.builder.test.oracle/src/it/java/dbws/testing/types/TypesTestSuite.java
@@ -450,7 +450,7 @@
@Test
public void echoInteger() {
Invocation invocation = new Invocation("echoInteger");
- invocation.setParameter("PINTEGER", Integer.valueOf(128));
+ invocation.setParameter("PINTEGER", 128);
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
@@ -471,7 +471,7 @@
@Test
public void echoSmallint() {
Invocation invocation = new Invocation("echoSmallint");
- invocation.setParameter("PSMALLINT", Integer.valueOf(7));
+ invocation.setParameter("PSMALLINT", 7);
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
diff --git a/utils/eclipselink.utils.sigcompare/src/main/java/eclipselink/utils/sigcompare/Main.java b/utils/eclipselink.utils.sigcompare/src/main/java/eclipselink/utils/sigcompare/Main.java
index 015b508..e52203a 100644
--- a/utils/eclipselink.utils.sigcompare/src/main/java/eclipselink/utils/sigcompare/Main.java
+++ b/utils/eclipselink.utils.sigcompare/src/main/java/eclipselink/utils/sigcompare/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -46,7 +46,7 @@
SignatureReportGenerator gen = new SignatureReportGenerator();
gen.generateReport(properties, "baseline", "latest", false);
} else {
- boolean printAlternatives = printAlternativesValue == null ? false : Boolean.valueOf(printAlternativesValue);
+ boolean printAlternatives = printAlternativesValue == null ? false : Boolean.parseBoolean(printAlternativesValue);
SignatureReportGenerator gen = new SignatureReportGenerator();
gen.generateReport(properties, "2.1.2", "2.2.0", printAlternatives);
diff --git a/utils/org.eclipse.persistence.dbws.builder/src/main/java/org/eclipse/persistence/tools/dbws/oracle/ShadowDDLGenerator.java b/utils/org.eclipse.persistence.dbws.builder/src/main/java/org/eclipse/persistence/tools/dbws/oracle/ShadowDDLGenerator.java
index 82c69d5..f07a6eb 100644
--- a/utils/org.eclipse.persistence.dbws.builder/src/main/java/org/eclipse/persistence/tools/dbws/oracle/ShadowDDLGenerator.java
+++ b/utils/org.eclipse.persistence.dbws.builder/src/main/java/org/eclipse/persistence/tools/dbws/oracle/ShadowDDLGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -110,7 +110,7 @@
public void beginVisit(ROWTYPEType rowTYPEType) {
Integer rowTYPETypeCount = rowTYPETypeCounts.get(rowTYPEType.getTypeName());
if (rowTYPETypeCount == null) {
- rowTYPETypeCounts.put(rowTYPEType.getTypeName(), Integer.valueOf(initialRowTYPETypeCount++));
+ rowTYPETypeCounts.put(rowTYPEType.getTypeName(), initialRowTYPETypeCount++);
}
}
public Map<String, Integer> getRowTYPETypeCounts() {