HHH-5907 change to use autobox instead of create new object everytime to get minor improvement
This commit is contained in:
parent
82adfaa16e
commit
7b9d7f2c25
|
@ -233,4 +233,8 @@ public String getForUpdateString() {
|
|||
public boolean supportsLobValueChangePropogation() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean supportsUnboundedLobLocatorMaterialization() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class TypeNames {
|
|||
* @return the default type name associated with specified key
|
||||
*/
|
||||
public String get(int typecode) throws MappingException {
|
||||
String result = defaults.get( new Integer(typecode) );
|
||||
String result = defaults.get( typecode );
|
||||
if (result==null) throw new MappingException("No Dialect mapping for JDBC type: " + typecode);
|
||||
return result;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public class TypeNames {
|
|||
* if available and the default type name otherwise
|
||||
*/
|
||||
public String get(int typecode, int size, int precision, int scale) throws MappingException {
|
||||
Map<Integer, String> map = weighted.get( new Integer(typecode) );
|
||||
Map<Integer, String> map = weighted.get( typecode );
|
||||
if ( map!=null && map.size()>0 ) {
|
||||
// iterate entries ordered by capacity to find first fit
|
||||
for (Map.Entry<Integer, String> entry: map.entrySet()) {
|
||||
|
@ -109,10 +109,10 @@ public class TypeNames {
|
|||
* @param typecode the type key
|
||||
*/
|
||||
public void put(int typecode, int capacity, String value) {
|
||||
Map<Integer, String> map = weighted.get( new Integer(typecode) );
|
||||
Map<Integer, String> map = weighted.get( typecode );
|
||||
if (map == null) {// add new ordered map
|
||||
map = new TreeMap<Integer, String>();
|
||||
weighted.put( new Integer(typecode), map );
|
||||
weighted.put( typecode, map );
|
||||
}
|
||||
map.put(new Integer(capacity), value);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ public class TypeNames {
|
|||
* @param typecode the type key
|
||||
*/
|
||||
public void put(int typecode, String value) {
|
||||
defaults.put( new Integer(typecode), value );
|
||||
defaults.put( typecode, value );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue