Internal refactor / tidy - Suggestions from intellij code analysis. (#1209)

This commit is contained in:
Koen De Groote authored and Rob Bygrave committed 2017-11-14 18:19:38 +13:00
1 parent 0056568bc7
commit f1ebe7929b
29 files changed
+66 -59

No files matched your search

@@ -8,8 +8,8 @@ import java.sql.SQLException;
*/
public class BatchedSqlException extends Exception {
private static final long serialVersionUID = -4374631080253580648L;
private SQLException cause;
private final SQLException cause;
BatchedSqlException(String message, SQLException cause) {
super(message, cause);
@@ -858,7 +858,7 @@ public final class DefaultPersister implements Persister {
}
private boolean isModifyListenMode() {
return ModifyListenMode.REMOVALS.equals(many.getModifyListenMode());
return ModifyListenMode.REMOVALS == many.getModifyListenMode();
}
private boolean isDeleteMissingChildren() {
@@ -988,7 +988,7 @@ public final class DefaultPersister implements Persister {
}
SpiTransaction t = saveMany.getTransaction();
boolean isMap = ManyType.MAP.equals(prop.getManyType());
boolean isMap = ManyType.MAP == prop.getManyType();
EntityBean parentBean = saveMany.getParentBean();
if (deleteMissingChildren) {
@@ -1229,7 +1229,7 @@ public final class DefaultPersister implements Persister {
}
} else {
if (ModifyListenMode.REMOVALS.equals(many.getModifyListenMode())) {
if (ModifyListenMode.REMOVALS == many.getModifyListenMode()) {
// PrivateOwned ...
// if soft delete then check target also supports soft delete
if (!softDelete || many.getTargetDescriptor().isSoftDelete()) {
@@ -116,7 +116,7 @@ public final class DeleteMeta {
tenantId.dmlAppend(request);
}
if (ConcurrencyMode.VERSION.equals(conMode)) {
if (ConcurrencyMode.VERSION == conMode) {
if (version != null) {
version.dmlAppend(request);
}
@@ -157,7 +157,7 @@ public final class UpdateMeta {
if (tenantId != null) {
tenantId.dmlAppend(request);
}
if (ConcurrencyMode.VERSION.equals(conMode)) {
if (ConcurrencyMode.VERSION == conMode) {
if (version != null) {
version.dmlAppend(request);
}
@@ -23,10 +23,10 @@ public class FactoryProperty {
*/
public Bindable create(BeanProperty prop, DmlMode mode, boolean withLobs) {
if (DmlMode.INSERT.equals(mode) && !prop.isDbInsertable()) {
if (DmlMode.INSERT == mode && !prop.isDbInsertable()) {
return null;
}
if (DmlMode.UPDATE.equals(mode) && !prop.isDbUpdatable()) {
if (DmlMode.UPDATE == mode && !prop.isDbUpdatable()) {
return null;
}