Automated cleanup: inefficient branching (thanks IntelliJ)
This commit is contained in:
parent
0fb5895d08
commit
e9f879d9d6
|
@ -987,12 +987,7 @@ public abstract class AbstractPostgreSQLStructJdbcType implements AggregateJdbcT
|
|||
}
|
||||
else if ( value instanceof TemporalAccessor ) {
|
||||
final TemporalAccessor temporalAccessor = (TemporalAccessor) value;
|
||||
if ( temporalAccessor.isSupported( ChronoField.OFFSET_SECONDS ) ) {
|
||||
appendAsTimestampWithMicros( appender, temporalAccessor, true, jdbcTimeZone );
|
||||
}
|
||||
else {
|
||||
appendAsTimestampWithMicros( appender, temporalAccessor, false, jdbcTimeZone );
|
||||
}
|
||||
appendAsTimestampWithMicros( appender, temporalAccessor, temporalAccessor.isSupported( ChronoField.OFFSET_SECONDS ), jdbcTimeZone );
|
||||
}
|
||||
else {
|
||||
appendAsTimestampWithMicros(
|
||||
|
|
|
@ -44,9 +44,6 @@ public final class CharSequenceHelper {
|
|||
}
|
||||
else if ( charSequence instanceof SubSequence ) {
|
||||
int idx = ( (SubSequence) charSequence ).lastIndexOf( c, fromIndex, endIndex );
|
||||
if ( idx == -1 ) {
|
||||
return -1;
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
else {
|
||||
|
@ -72,9 +69,6 @@ public final class CharSequenceHelper {
|
|||
}
|
||||
else if ( charSequence instanceof SubSequence ) {
|
||||
int idx = ( (SubSequence) charSequence ).indexOf( c, fromIndex, endIndex );
|
||||
if ( idx == -1 ) {
|
||||
return -1;
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
else {
|
||||
|
@ -96,9 +90,6 @@ public final class CharSequenceHelper {
|
|||
}
|
||||
else if ( charSequence instanceof SubSequence ) {
|
||||
int idx = ( (SubSequence) charSequence ).indexOf( target, fromIndex, endIndex );
|
||||
if ( idx == -1 ) {
|
||||
return -1;
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -51,14 +51,9 @@ public enum JpaStaticMetaModelPopulationSetting {
|
|||
}
|
||||
|
||||
private static String determineSetting(Map configurationValues) {
|
||||
final String setting = ConfigurationHelper.getString(
|
||||
return ConfigurationHelper.getString(
|
||||
AvailableSettings.STATIC_METAMODEL_POPULATION,
|
||||
configurationValues
|
||||
);
|
||||
if ( setting != null ) {
|
||||
return setting;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,10 +33,7 @@ public class FromClauseAccessImpl implements FromClauseAccess {
|
|||
|
||||
public TableGroup findByAlias(String alias) {
|
||||
if ( tableGroupBySqlAlias != null ) {
|
||||
final TableGroup tableGroup = tableGroupBySqlAlias.get( alias );
|
||||
if ( tableGroup != null ) {
|
||||
return tableGroup;
|
||||
}
|
||||
return tableGroupBySqlAlias.get( alias );
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -51,10 +48,8 @@ public class FromClauseAccessImpl implements FromClauseAccess {
|
|||
public TableGroup findTableGroup(NavigablePath navigablePath) {
|
||||
if ( tableGroupByPath != null ) {
|
||||
final TableGroup tableGroup = tableGroupByPath.get( navigablePath );
|
||||
if ( tableGroup != null ) {
|
||||
return tableGroup;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -172,10 +172,8 @@ public class SqmExpressionHelper {
|
|||
return lhs;
|
||||
}
|
||||
final SqmPath<?> rhs = findPath( binaryArithmetic.getRightHandOperand(), nodeType );
|
||||
if ( rhs != null ) {
|
||||
return rhs;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,10 +107,8 @@ public class CollectionTableGroup extends StandardTableGroup implements PluralTa
|
|||
tableExpression,
|
||||
resolve
|
||||
);
|
||||
if ( elementTableReference != null ) {
|
||||
return elementTableReference;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,10 +93,8 @@ public class CorrelatedPluralTableGroup extends CorrelatedTableGroup implements
|
|||
tableExpression,
|
||||
resolve
|
||||
);
|
||||
if ( elementTableReference != null ) {
|
||||
return elementTableReference;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -129,10 +127,8 @@ public class CorrelatedPluralTableGroup extends CorrelatedTableGroup implements
|
|||
tableExpression,
|
||||
resolve
|
||||
);
|
||||
if ( elementTableReference != null ) {
|
||||
return elementTableReference;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -286,10 +286,7 @@ public abstract class AbstractEmbeddableInitializer extends AbstractFetchParentA
|
|||
}
|
||||
|
||||
final EntityInitializer entityInitializer = parentAccess.asEntityInitializer();
|
||||
if ( entityInitializer != null && entityInitializer.getParentKey() == null ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return entityInitializer != null && entityInitializer.getParentKey() == null;
|
||||
}
|
||||
|
||||
private void extractRowState(RowProcessingState processingState) {
|
||||
|
|
|
@ -84,12 +84,7 @@ public class ImportContextImpl implements ImportContext {
|
|||
String simpleName = unqualify( fqcn );
|
||||
if ( simpleNames.containsKey( simpleName ) ) {
|
||||
String existingFqcn = simpleNames.get( simpleName );
|
||||
if ( existingFqcn.equals( pureFqcn ) ) {
|
||||
canBeSimple = true;
|
||||
}
|
||||
else {
|
||||
canBeSimple = false;
|
||||
}
|
||||
canBeSimple = existingFqcn.equals( pureFqcn );
|
||||
}
|
||||
else {
|
||||
canBeSimple = true;
|
||||
|
|
Loading…
Reference in New Issue