Skip to content

Commit

Permalink
remove Boolean constructor usages
Browse files Browse the repository at this point in the history
Signed-off-by: NicolaIsotta <nicola.isotta@gmail.com>
  • Loading branch information
NicolaIsotta authored and ThePrez committed Jun 9, 2023
1 parent 5648764 commit 295cc3c
Show file tree
Hide file tree
Showing 64 changed files with 291 additions and 291 deletions.
16 changes: 8 additions & 8 deletions src/main/java/com/ibm/as400/access/AS400.java
Original file line number Diff line number Diff line change
Expand Up @@ -4018,8 +4018,8 @@ public void setGuiAvailable(boolean guiAvailable) throws PropertyVetoException
}
else
{
Boolean oldValue = new Boolean(guiAvailable_);
Boolean newValue = new Boolean(guiAvailable);
Boolean oldValue = Boolean.valueOf(guiAvailable_);
Boolean newValue = Boolean.valueOf(guiAvailable);

if (vetoableChangeListeners_ != null)
{
Expand Down Expand Up @@ -4465,8 +4465,8 @@ public void setThreadUsed(boolean useThreads) throws PropertyVetoException
}
else
{
Boolean oldValue = new Boolean(threadUsed_);
Boolean newValue = new Boolean(useThreads);
Boolean oldValue = Boolean.valueOf(threadUsed_);
Boolean newValue = Boolean.valueOf(useThreads);

if (vetoableChangeListeners_ != null)
{
Expand Down Expand Up @@ -4495,8 +4495,8 @@ public void setUseDefaultUser(boolean useDefaultUser) throws PropertyVetoExcepti
}
else
{
Boolean oldValue = new Boolean(useDefaultUser_);
Boolean newValue = new Boolean(useDefaultUser);
Boolean oldValue = Boolean.valueOf(useDefaultUser_);
Boolean newValue = Boolean.valueOf(useDefaultUser);

if (vetoableChangeListeners_ != null)
{
Expand Down Expand Up @@ -4526,8 +4526,8 @@ public void setUsePasswordCache(boolean usePasswordCache) throws PropertyVetoExc
}
else
{
Boolean oldValue = new Boolean(usePasswordCache_);
Boolean newValue = new Boolean(usePasswordCache);
Boolean oldValue = Boolean.valueOf(usePasswordCache_);
Boolean newValue = Boolean.valueOf(usePasswordCache);

if (vetoableChangeListeners_ != null)
{
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/ibm/as400/access/AS400File.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,17 +437,17 @@ synchronized void chooseImpl() throws AS400SecurityException, IOException
new Object[] { system_.getImpl(), //@B5C
name_,
recordFormat_,
new Boolean(readNoUpdate_), //@B5A
new Boolean(this instanceof KeyedFile),
new Boolean(ssp_) });
Boolean.valueOf(readNoUpdate_), //@B5A
Boolean.valueOf(this instanceof KeyedFile),
Boolean.valueOf(ssp_) });

// impl_.doItNoExceptions("setSystem", new Class[] { AS400.class }, new Object[] { system_ }); //@B0A
// impl_.doItNoExceptions("setPath", new Class[] { String.class }, new Object[] { name_ }); //@B0A
// impl_.doItNoExceptions("setRecordFormat", new Class[] { RecordFormat.class }, new Object[] { recordFormat_ }); //@B0A

// The following line is provided so the remote class knows
// if it is a keyed file or a sequential file.
// impl_.doItNoExceptions("setIsKeyed", new Class[] { Boolean.TYPE }, new Object[] { new Boolean(this instanceof KeyedFile) }); //@B0A
// impl_.doItNoExceptions("setIsKeyed", new Class[] { Boolean.TYPE }, new Object[] { Boolean.valueOf(this instanceof KeyedFile) }); //@B0A
}
}

Expand Down Expand Up @@ -867,7 +867,7 @@ public void create(RecordFormat recordFormat,
RecordFormat.class, String.class, String.class,
String.class, String.class, Boolean.TYPE,
String.class, String.class },
new Object[] { recordFormat, altSeq, ccsid, order, ref, new Boolean(unique), //@B0C
new Object[] { recordFormat, altSeq, ccsid, order, ref, Boolean.valueOf(unique), //@B0C
format, text });

// Create the file based on the newly create DDS source file
Expand Down Expand Up @@ -2256,7 +2256,7 @@ public void setReadNoUpdate(boolean readNoUpdate)
if (impl_ != null) //@B5A
{
impl_.doItNoExceptions("setReadNoUpdate", new Class[] { Boolean.TYPE },
new Object[] { new Boolean(readNoUpdate) }); //@B0C
new Object[] { Boolean.valueOf(readNoUpdate) }); //@B0C
}
}

Expand Down Expand Up @@ -2397,7 +2397,7 @@ public void setSSPFile(boolean treatAsSSP)
if (impl_ != null)
{
impl_.doItNoExceptions("setSSPFile", new Class[] { Boolean.TYPE },
new Object[] { new Boolean(treatAsSSP) });
new Object[] { Boolean.valueOf(treatAsSSP) });
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/ibm/as400/access/AS400FileImplProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public String[] openFile2(int openType, int bf, int level, boolean access)
{
return (String[])connection_.callMethod(pxId_, "openFile2",
new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE, Boolean.TYPE },
new Object[] { new Integer(openType), new Integer(bf), new Integer(level), new Boolean(access) }).getReturnValue();
new Object[] { new Integer(openType), new Integer(bf), new Integer(level), Boolean.valueOf(access) }).getReturnValue();
}
catch(InvocationTargetException e)
{
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/ibm/as400/access/AS400ImplProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public SignonInfo changePassword(String systemName, boolean systemNameLocal, Str
{
try
{
return (SignonInfo)connection_.callMethod(pxId_, "changePassword", new Class[] { String.class, Boolean.TYPE, String.class, byte[].class, byte[].class }, new Object[] { systemName, new Boolean(systemNameLocal), userId, oldBytes, newBytes }).getReturnValue();
return (SignonInfo)connection_.callMethod(pxId_, "changePassword", new Class[] { String.class, Boolean.TYPE, String.class, byte[].class, byte[].class }, new Object[] { systemName, Boolean.valueOf(systemNameLocal), userId, oldBytes, newBytes }).getReturnValue();
}
catch (InvocationTargetException e)
{
Expand All @@ -81,7 +81,7 @@ public void connect(int service, int overridePort, boolean skipSignonServer) thr
{
connection_.callMethod(pxId_, "connect",
new Class[] { Integer.TYPE, Integer.TYPE, Boolean.TYPE },
new Object[] { new Integer(service), new Integer(overridePort), new Boolean(skipSignonServer) });
new Object[] { new Integer(service), new Integer(overridePort), Boolean.valueOf(skipSignonServer) });
}
catch (InvocationTargetException e)
{
Expand Down Expand Up @@ -109,7 +109,7 @@ public Socket connectToPort(int port,boolean forceNonLocalhost) throws AS400Secu
return (Socket)connection_.callMethod(pxId_,
"connectToPort",
new Class[] { Integer.TYPE, Boolean.TYPE },
new Object[] { new Integer(port), new Boolean(forceNonLocalhost) }).getReturnValue();
new Object[] { new Integer(port), Boolean.valueOf(forceNonLocalhost) }).getReturnValue();
}
catch (InvocationTargetException e)
{
Expand Down Expand Up @@ -320,7 +320,7 @@ public void setState(SSLOptions useSSLConnection, boolean canUseNativeOptimizati
{
try
{
connection_.callMethod(pxId_, "setState", new Class[] { SSLOptions.class, Boolean.TYPE, Boolean.TYPE, Integer.TYPE, String.class, SocketProperties.class, String.class, Boolean.TYPE, Boolean.TYPE, Boolean.TYPE }, new Object[] { useSSLConnection, new Boolean(canUseNativeOptimization), new Boolean(threadUsed), new Integer(ccsid), nlv, socketProperties, ddmRDB, new Boolean(mustUseNetSockets), new Boolean(mustUseSuppliedProfile), new Boolean(mustAddLanguageLibrary) } );
connection_.callMethod(pxId_, "setState", new Class[] { SSLOptions.class, Boolean.TYPE, Boolean.TYPE, Integer.TYPE, String.class, SocketProperties.class, String.class, Boolean.TYPE, Boolean.TYPE, Boolean.TYPE }, new Object[] { useSSLConnection, Boolean.valueOf(canUseNativeOptimization), Boolean.valueOf(threadUsed), new Integer(ccsid), nlv, socketProperties, ddmRDB, Boolean.valueOf(mustUseNetSockets), Boolean.valueOf(mustUseSuppliedProfile), Boolean.valueOf(mustAddLanguageLibrary) } );
}
catch (InvocationTargetException e)
{
Expand All @@ -333,7 +333,7 @@ public SignonInfo signon(String systemName, boolean systemNameLocal, String user
{
try
{
return (SignonInfo)connection_.callMethod(pxId_, "signon", new Class[] { String.class, Boolean.TYPE, String.class, CredentialVault.class, String.class }, new Object[] { systemName, new Boolean(systemNameLocal), userId, vault, gssName }).getReturnValue();
return (SignonInfo)connection_.callMethod(pxId_, "signon", new Class[] { String.class, Boolean.TYPE, String.class, CredentialVault.class, String.class }, new Object[] { systemName, Boolean.valueOf(systemNameLocal), userId, vault, gssName }).getReturnValue();
}
catch (InvocationTargetException e)
{
Expand All @@ -346,7 +346,7 @@ public SignonInfo skipSignon(String systemName, boolean systemNameLocal, String
{
try
{
return (SignonInfo)connection_.callMethod(pxId_, "skipSignon", new Class[] { String.class, Boolean.TYPE, String.class, CredentialVault.class, String.class }, new Object[] { systemName, new Boolean(systemNameLocal), userId, vault, gssName }).getReturnValue();
return (SignonInfo)connection_.callMethod(pxId_, "skipSignon", new Class[] { String.class, Boolean.TYPE, String.class, CredentialVault.class, String.class }, new Object[] { systemName, Boolean.valueOf(systemNameLocal), userId, vault, gssName }).getReturnValue();
}
catch (InvocationTargetException e)
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/ibm/as400/access/AS400JDBCArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ private void setArray(Object inArray) throws SQLException {
boolean[] inBooleanArray = (boolean[]) inArray;
Boolean[] booleanArray = new Boolean[inBooleanArray.length];
for (int i = 0; i < inBooleanArray.length; i++) {
booleanArray[i] = new Boolean(inBooleanArray[i]);
booleanArray[i] = Boolean.valueOf(inBooleanArray[i]);
}
data_ = booleanArray;

Expand All @@ -2097,7 +2097,7 @@ private void setArray(Object inArray) throws SQLException {
int[] inIntegerArray = (int[]) inArray;
Boolean[] booleanArray = new Boolean[inIntegerArray.length];
for (int i = 0; i < inIntegerArray.length; i++) {
booleanArray[i] = new Boolean(SQLBoolean.getBoolean(this, inIntegerArray[i]));
booleanArray[i] = Boolean.valueOf(SQLBoolean.getBoolean(this, inIntegerArray[i]));
}
data_ = booleanArray;
} else if ("java.math.BigDecimal".equals(arrayType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4272,7 +4272,7 @@ public Object getObject(int columnIndex, Class type) throws SQLException {
if (b == false && wasNull()) {
return null;
} else {
return new Boolean (b);
return Boolean.valueOf(b);
}

} else if (type == java.sql.Date.class){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4496,7 +4496,7 @@ public Object getObject(int parameterIndex, Class type)
if (b == false && wasNull()) {
return null;
} else {
return new Boolean (b);
return Boolean.valueOf(b);
}

} else if (type == java.sql.Date.class){
Expand Down
Loading

0 comments on commit 295cc3c

Please sign in to comment.