JAVA-19726: Changes made for cleaning code (#13763)
* JAVA-19726: Changes made for cleaning code * JAVA-19726: Changes made for cleaning code * JAVA-19726: Changes made for cleaning code
This commit is contained in:
parent
7e318cbd44
commit
8e4f8366d2
|
@ -7,6 +7,7 @@ import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Types;
|
import java.sql.Types;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||||
|
@ -58,8 +59,8 @@ public class CustomIntegerArrayType implements UserType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object deepCopy(Object value) throws HibernateException {
|
public Object deepCopy(Object value) throws HibernateException {
|
||||||
Integer[] a = (Integer[])value;
|
Integer[] arr = (Integer[]) value;
|
||||||
return a != null ? Arrays.copyOf(a, a.length) : null;
|
return arr != null ? Arrays.copyOf(arr, arr.length) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Types;
|
import java.sql.Types;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||||
|
@ -58,8 +59,8 @@ public class CustomStringArrayType implements UserType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object deepCopy(Object value) throws HibernateException {
|
public Object deepCopy(Object value) throws HibernateException {
|
||||||
String[] a = (String[])value;
|
String[] arr = (String[]) value;
|
||||||
return a != null ? Arrays.copyOf(a, a.length) : null;
|
return arr != null ? Arrays.copyOf(arr, arr.length) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue