mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
Simple fixes (#976)
* Should be only the really simple stuff. * Final cleanups.
This commit is contained in:
1 parent
8bb884374b
commit
6120a465e1
59 files changed
+111
-125
No files matched your search
@@ -81,7 +81,7 @@ public class BindValues {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "" + value;
|
||||
return String.valueOf(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public class Binder {
|
||||
|
||||
if (bindBuf != null) {
|
||||
bindBuf.append(logPrefix);
|
||||
if (logPrefix.equals("")) {
|
||||
if (logPrefix.isEmpty()) {
|
||||
logPrefix = ", ";
|
||||
}
|
||||
bindBuf.append(bindValue.getName());
|
||||
@@ -163,7 +163,7 @@ public class Binder {
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.warn(Message.msg("fetch.bind.error", "" + (dataBind.currentPos() - 1), value));
|
||||
logger.warn(Message.msg("fetch.bind.error", String.valueOf(dataBind.currentPos() - 1), value));
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
@@ -333,7 +333,7 @@ public class Binder {
|
||||
break;
|
||||
|
||||
default:
|
||||
String msg = Message.msg("persist.bind.datatype", "" + dataType, "" + b.currentPos());
|
||||
String msg = Message.msg("persist.bind.datatype", String.valueOf(dataType), String.valueOf(b.currentPos()));
|
||||
throw new SQLException(msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ public final class DefaultPersister implements Persister {
|
||||
* Helper method to return the list of Id values for the list of beans.
|
||||
*/
|
||||
private <T> List<Object> getBeanIds(BeanDescriptor<T> desc, List<T> beans) {
|
||||
List<Object> idList = new ArrayList<>();
|
||||
List<Object> idList = new ArrayList<>(beans.size());
|
||||
for (T liveBean : beans) {
|
||||
idList.add(desc.getBeanId(liveBean));
|
||||
}
|
||||
|
||||
@@ -160,8 +160,7 @@ public class ExeUpdateSql {
|
||||
|
||||
private int leadingTrim(String s) {
|
||||
int len = s.length();
|
||||
int i;
|
||||
for (i = 0; i < len; i++) {
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (!Character.isWhitespace(s.charAt(i))) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public final class DmlBeanPersister implements BeanPersister {
|
||||
throw new PersistenceException(msg, e);
|
||||
|
||||
} finally {
|
||||
if (!batched && handler != null) {
|
||||
if (!batched) {
|
||||
handler.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user