Skip to content

Commit

Permalink
Replace deprecated constructors by valueOf
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Aug 30, 2021
1 parent 1843df4 commit 71285ee
Show file tree
Hide file tree
Showing 552 changed files with 2,707 additions and 2,707 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -29,7 +29,7 @@ public House() {
super();
sellingPoints = new Vector();
insuranceId = new Oid();
insuranceId.setOid(new Integer(0));
insuranceId.setOid(Integer.valueOf(0));
}

public java.lang.String getDescriptions() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -31,7 +31,7 @@ public static SingleHouse example1() {
SingleHouse example1 = new SingleHouse();

Oid insurancePolicyId = new Oid();
insurancePolicyId.setOid(new Integer(15));
insurancePolicyId.setOid(Integer.valueOf(15));
example1.setInsuranceId(insurancePolicyId);
example1.setDescriptions("beautiful 4 bedroom single house");
example1.setLocation("435 Carling Ave.");
Expand All @@ -48,7 +48,7 @@ public static SingleHouse example2() {
SingleHouse example2 = new SingleHouse();

Oid insurancePolicyId = new Oid();
insurancePolicyId.setOid(new Integer(27));
insurancePolicyId.setOid(Integer.valueOf(27));
example2.setInsuranceId(insurancePolicyId);
example2.setDescriptions("spacious 5 bedroom banglow");
example2.setLocation("33D King Edward Street");
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,7 +23,7 @@ public static TownHouse example3() {
TownHouse example3 = new TownHouse();

Oid insurancePolicyId = new Oid();
insurancePolicyId.setOid(new Integer(333));
insurancePolicyId.setOid(Integer.valueOf(333));
example3.setInsuranceId(insurancePolicyId);
example3.setDescriptions("renovated 3-bedroom gardon house");
example3.setLocation("2236 Baseline Rd");
Expand All @@ -34,7 +34,7 @@ public static TownHouse example4() {
TownHouse example4 = new TownHouse();

Oid insurancePolicyId = new Oid();
insurancePolicyId.setOid(new Integer(4444));
insurancePolicyId.setOid(Integer.valueOf(4444));
example4.setInsuranceId(insurancePolicyId);
example4.setDescriptions("two bedroom luxury townhouse");
example4.setLocation("790C Bank Street");
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -244,7 +244,7 @@ public void setName(String newValue) {
}

public void setPrice(float newValue) {
propertyChange("price", new Float(this.price), new Float(newValue));
propertyChange("price", Float.valueOf(this.price), Float.valueOf(newValue));
this.price = newValue;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -114,9 +114,9 @@ public AggregateAggregateMapHolder getAggregateAggregateMapHolder(){
public AggregateDirectMapHolder getAggregateDirectMapHolder(){
AggregateDirectMapHolder holder = new AggregateDirectMapHolder();
AggregateMapKey mapKey = getAggregateMapKey1();
holder.addAggregateToDirectMapItem(mapKey, new Integer(1));
holder.addAggregateToDirectMapItem(mapKey, Integer.valueOf(1));
AggregateMapKey mapKey2 = getAggregateMapKey2();
holder.addAggregateToDirectMapItem(mapKey2, new Integer(2));
holder.addAggregateToDirectMapItem(mapKey2, Integer.valueOf(2));
return holder;
}

Expand Down Expand Up @@ -161,48 +161,48 @@ public AggregateEntityU1MMapHolder getAggregateEntityU1MMapHolder(){
public DirectAggregateMapHolder getDirectAggregateMapHolder(){
DirectAggregateMapHolder holder = new DirectAggregateMapHolder();
AggregateMapValue value = getAggregateMapValue1();
holder.addDirectToAggregateMapItem(new Integer(1), value);
holder.addDirectToAggregateMapItem(Integer.valueOf(1), value);
value = getAggregateMapValue2();
holder.addDirectToAggregateMapItem(new Integer(2), value);
holder.addDirectToAggregateMapItem(Integer.valueOf(2), value);
return holder;
}

public DirectDirectMapHolder getDirectDirectMapHolder(){
DirectDirectMapHolder holder = new DirectDirectMapHolder();
holder.addDirectToDirectMapItem(new Integer(1), new Integer(1));
holder.addDirectToDirectMapItem(new Integer(2), new Integer(2));
holder.addDirectToDirectMapItem(Integer.valueOf(1), Integer.valueOf(1));
holder.addDirectToDirectMapItem(Integer.valueOf(2), Integer.valueOf(2));
return holder;
}

public DirectEntity1MMapHolder getDirectEntity1MMapHolder(){
DirectEntity1MMapHolder initialHolder = new DirectEntity1MMapHolder();
DEOTMMapValue value = getDEOTMMapValue1();
value.getHolder().setValue(initialHolder);
initialHolder.addDirectToEntityMapItem(new Integer(11), value);
initialHolder.addDirectToEntityMapItem(Integer.valueOf(11), value);

DEOTMMapValue value2 = getDEOTMMapValue2();
value2.getHolder().setValue(initialHolder);
initialHolder.addDirectToEntityMapItem(new Integer(22), value2);
initialHolder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
return initialHolder;
}

public DirectEntityMapHolder getDirectEntityMapHolder(){
DirectEntityMapHolder holder = new DirectEntityMapHolder();
EntityMapValue value = getEntityMapValue1();
holder.addDirectToEntityMapItem(new Integer(11), value);
holder.addDirectToEntityMapItem(Integer.valueOf(11), value);

EntityMapValue value2 = getEntityMapValue2();
holder.addDirectToEntityMapItem(new Integer(22), value2);
holder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
return holder;
}

public DirectEntityU1MMapHolder getDirectEntityU1MMapHolder(){
DirectEntityU1MMapHolder holder = new DirectEntityU1MMapHolder();
EntityMapValue value = getEntityMapValue3();
holder.addDirectToEntityMapItem(new Integer(11), value);
holder.addDirectToEntityMapItem(Integer.valueOf(11), value);

EntityMapValue value2 = getEntityMapValue4();
holder.addDirectToEntityMapItem(new Integer(22), value2);
holder.addDirectToEntityMapItem(Integer.valueOf(22), value2);
return holder;
}

Expand All @@ -220,9 +220,9 @@ public EntityAggregateMapHolder getEntityAggregateMapHolder(){
public EntityDirectMapHolder getEntityDirectMapHolder(){
EntityDirectMapHolder holder = new EntityDirectMapHolder();
EntityMapKey mapKey = getEntityMapKey3();
holder.addEntityDirectMapItem(mapKey, new Integer(1));
holder.addEntityDirectMapItem(mapKey, Integer.valueOf(1));
EntityMapKey mapKey2 = getEntityMapKey4();
holder.addEntityDirectMapItem(mapKey2, new Integer(2));
holder.addEntityDirectMapItem(mapKey2, Integer.valueOf(2));
return holder;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -96,14 +96,14 @@ public static ConversionDataObject example1() {
example.aPByte = 1;
example.setAPByteArray(new byte[] { 1, 2, 3 });
example.aPShort = 1;
example.aCharacter = new Character('a');
example.anInteger = new Integer(1);
example.aFloat = new Float(1.0);
example.aBoolean = new Boolean(false);
example.aLong = new Long(1L);
example.aDouble = new Double(1.0);
example.aByte = new Byte((byte)1);
example.aShort = new Short((short)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.aBigDecimal = new java.math.BigDecimal(1.0);
example.aBigInteger = new java.math.BigInteger("1");
example.aNumber = example.aBigDecimal;
Expand Down Expand Up @@ -155,14 +155,14 @@ public static ConversionDataObject example2() {
example.aPByte = 2;
example.setAPByteArray(new byte[] { 4, 5, 6 });
example.aPShort = 2;
example.aCharacter = new Character('b');
example.anInteger = new Integer(2);
example.aFloat = new Float(2.0);
example.aBoolean = new Boolean(true);
example.aLong = new Long(2L);
example.aDouble = new Double(2.0);
example.aByte = new Byte((byte)2);
example.aShort = new Short((short)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.aBigDecimal = new java.math.BigDecimal(2.0);
example.aBigInteger = new java.math.BigInteger("2");
example.aNumber = example.aBigDecimal;
Expand Down Expand Up @@ -213,14 +213,14 @@ public static ConversionDataObject example3() {
example.aPByte = 3;
example.setAPByteArray(new byte[] { 7, 8, 9 });
example.aPShort = 3;
example.aCharacter = new Character('c');
example.anInteger = new Integer(3);
example.aFloat = new Float(3.0);
example.aBoolean = new Boolean(true);
example.aLong = new Long(3L);
example.aDouble = new Double(3.0);
example.aByte = new Byte((byte)3);
example.aShort = new Short((short)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.aBigDecimal = new java.math.BigDecimal(3.0);
example.aBigInteger = new java.math.BigInteger("3");
example.aNumber = example.aBigDecimal;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -28,14 +28,14 @@ public static ConversionDataObjectForSupportedTypes example() {

example.setAPCharArray(new char[] { 'a', 'b', 'c' });
example.setAPByteArray(new byte[] { 1, 2, 3 });
example.aCharacter = new Character('t');
example.anInteger = new Integer(1);
example.aFloat = new Float(1.0);
example.aBoolean = new Boolean(false);
example.aLong = new Long(1L);
example.aDouble = new Double(1.0);
example.aByte = new Byte((byte)1);
example.aShort = new Short((short)1);
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.aBigDecimal = new java.math.BigDecimal(1.0);
example.aBigInteger = new java.math.BigInteger("1");
example.aNumber = example.aBigDecimal;
Expand All @@ -52,8 +52,8 @@ public static ConversionDataObjectForSupportedTypes example() {
example.aString = new String("Conversion Managaer Test Example 1");
example.stringToInt = new String("111");
example.stringToTimestamp = new String("2003/11/23 23:45:56");
example.aByteArray = new Byte[] { new Byte("4"), new Byte("5"), new Byte("6") };
example.aCharacterArray = new Character[] { new Character('C'), new Character('H'), new Character('A') };
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') };

return example;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -468,7 +468,7 @@ public void setResponsibilitiesList(Vector responsibilitiesList) {
}

public void setSalary(int salary) {
propertyChange("salary", new Integer(this.salary), new Integer(salary));
propertyChange("salary", Integer.valueOf(this.salary), Integer.valueOf(salary));
this.salary = salary;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -41,7 +41,7 @@ public Timestamp getMilestoneVersion() {
}

public void setBudget(double budget) {
propertyChange("budget", new Double(this.budget), new Double(budget));
propertyChange("budget", Double.valueOf(this.budget), Double.valueOf(budget));
this.budget = budget;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,7 +18,7 @@ public class Bicycle extends NonFueledVehicle {
public String description;

public void change() {
this.setPassengerCapacity(new Integer(100));
this.setPassengerCapacity(Integer.valueOf(100));
this.addPartNumber("NEWBIKEPART 1");
this.setDescription("This Bike is easy to handle");

Expand All @@ -27,7 +27,7 @@ public void change() {
public static Bicycle example1(Company company) {
Bicycle example = new Bicycle();

example.setPassengerCapacity(new Integer(1));
example.setPassengerCapacity(Integer.valueOf(1));
example.getOwner().setValue(company);
example.setDescription("Hercules");
example.addPartNumber("1288H8HH-f");
Expand All @@ -38,7 +38,7 @@ public static Bicycle example1(Company company) {
public static Bicycle example2(Company company) {
Bicycle example = new Bicycle();

example.setPassengerCapacity(new Integer(2));
example.setPassengerCapacity(Integer.valueOf(2));
example.getOwner().setValue(company);
example.setDescription("Atlas");
example.addPartNumber("176339GT-a");
Expand All @@ -50,7 +50,7 @@ public static Bicycle example2(Company company) {
public static Bicycle example3(Company company) {
Bicycle example = new Bicycle();

example.setPassengerCapacity(new Integer(3));
example.setPassengerCapacity(Integer.valueOf(3));
example.getOwner().setValue(company);
example.setDescription("Aone");
example.addPartNumber("188181TT-a");
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,23 +18,23 @@ public class Boat extends NonFueledVehicle {
public static Boat example1(Company company) {
Boat example = new Boat();

example.setPassengerCapacity(new Integer(10));
example.setPassengerCapacity(Integer.valueOf(10));
example.getOwner().setValue(company);
return example;
}

public static Boat example2(Company company) {
Boat example = new Boat();

example.setPassengerCapacity(new Integer(20));
example.setPassengerCapacity(Integer.valueOf(20));
example.getOwner().setValue(company);
return example;
}

public static Boat example3(Company company) {
Boat example = new Boat();

example.setPassengerCapacity(new Integer(30));
example.setPassengerCapacity(Integer.valueOf(30));
example.getOwner().setValue(company);
return example;
}
Expand Down

0 comments on commit 71285ee

Please sign in to comment.