HHH-13496 Declare single char strings as chars

This commit is contained in:
Sanne Grinovero 2019-07-05 21:14:40 +01:00
parent 3d69df1ebf
commit 96129e58de
4 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ public class JarProtocolArchiveDescriptor implements ArchiveDescriptor {
}
final String urlFile = url.getFile();
final int subEntryIndex = urlFile.lastIndexOf( "!" );
final int subEntryIndex = urlFile.lastIndexOf( '!' );
if ( subEntryIndex == -1 ) {
throw new AssertionFailure( "JAR URL does not contain '!/' :" + url );
}

View File

@ -58,7 +58,7 @@ public class SQLServer2012Dialect extends SQLServer2008Dialect {
sql.length()
+ hints.length() + 12
);
final int pos = sql.indexOf( ";" );
final int pos = sql.indexOf( ';' );
if ( pos > -1 ) {
buffer.append( sql.substring( 0, pos ) );
}

View File

@ -92,7 +92,7 @@ public class DataSourceBasedMultiTenantConnectionProviderImpl
}
if ( DataSource.class.isInstance( namedObject ) ) {
final int loc = jndiName.lastIndexOf( "/" );
final int loc = jndiName.lastIndexOf( '/' );
this.baseJndiNamespace = jndiName.substring( 0, loc );
this.tenantIdentifierForAny = jndiName.substring( loc + 1 );
dataSourceMap().put( tenantIdentifierForAny, (DataSource) namedObject );

View File

@ -378,12 +378,12 @@ public final class StringHelper {
}
public static String root(String qualifiedName) {
int loc = qualifiedName.indexOf( "." );
int loc = qualifiedName.indexOf( '.' );
return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( 0, loc );
}
public static String unroot(String qualifiedName) {
int loc = qualifiedName.indexOf( "." );
int loc = qualifiedName.indexOf( '.' );
return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( loc + 1, qualifiedName.length() );
}