HHH-13496 Declare single char strings as chars
This commit is contained in:
parent
3d69df1ebf
commit
96129e58de
|
@ -37,7 +37,7 @@ public class JarProtocolArchiveDescriptor implements ArchiveDescriptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
final String urlFile = url.getFile();
|
final String urlFile = url.getFile();
|
||||||
final int subEntryIndex = urlFile.lastIndexOf( "!" );
|
final int subEntryIndex = urlFile.lastIndexOf( '!' );
|
||||||
if ( subEntryIndex == -1 ) {
|
if ( subEntryIndex == -1 ) {
|
||||||
throw new AssertionFailure( "JAR URL does not contain '!/' :" + url );
|
throw new AssertionFailure( "JAR URL does not contain '!/' :" + url );
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class SQLServer2012Dialect extends SQLServer2008Dialect {
|
||||||
sql.length()
|
sql.length()
|
||||||
+ hints.length() + 12
|
+ hints.length() + 12
|
||||||
);
|
);
|
||||||
final int pos = sql.indexOf( ";" );
|
final int pos = sql.indexOf( ';' );
|
||||||
if ( pos > -1 ) {
|
if ( pos > -1 ) {
|
||||||
buffer.append( sql.substring( 0, pos ) );
|
buffer.append( sql.substring( 0, pos ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class DataSourceBasedMultiTenantConnectionProviderImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( DataSource.class.isInstance( namedObject ) ) {
|
if ( DataSource.class.isInstance( namedObject ) ) {
|
||||||
final int loc = jndiName.lastIndexOf( "/" );
|
final int loc = jndiName.lastIndexOf( '/' );
|
||||||
this.baseJndiNamespace = jndiName.substring( 0, loc );
|
this.baseJndiNamespace = jndiName.substring( 0, loc );
|
||||||
this.tenantIdentifierForAny = jndiName.substring( loc + 1 );
|
this.tenantIdentifierForAny = jndiName.substring( loc + 1 );
|
||||||
dataSourceMap().put( tenantIdentifierForAny, (DataSource) namedObject );
|
dataSourceMap().put( tenantIdentifierForAny, (DataSource) namedObject );
|
||||||
|
|
|
@ -378,12 +378,12 @@ public final class StringHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String root(String qualifiedName) {
|
public static String root(String qualifiedName) {
|
||||||
int loc = qualifiedName.indexOf( "." );
|
int loc = qualifiedName.indexOf( '.' );
|
||||||
return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( 0, loc );
|
return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( 0, loc );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String unroot(String qualifiedName) {
|
public static String unroot(String qualifiedName) {
|
||||||
int loc = qualifiedName.indexOf( "." );
|
int loc = qualifiedName.indexOf( '.' );
|
||||||
return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( loc + 1, qualifiedName.length() );
|
return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( loc + 1, qualifiedName.length() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue