提交 39c678ba authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Replace String.valueOf(long) with Long.toString(long)

上级 9cd01f57
...@@ -83,9 +83,9 @@ public class Sequence extends SchemaObjectBase { ...@@ -83,9 +83,9 @@ public class Sequence extends SchemaObjectBase {
this.belongsToTable = belongsToTable; this.belongsToTable = belongsToTable;
if (!isValid(this.value, this.minValue, this.maxValue, this.increment)) { if (!isValid(this.value, this.minValue, this.maxValue, this.increment)) {
throw DbException.get(ErrorCode.SEQUENCE_ATTRIBUTES_INVALID, name, throw DbException.get(ErrorCode.SEQUENCE_ATTRIBUTES_INVALID, name,
String.valueOf(this.value), String.valueOf(this.minValue), Long.toString(this.value), Long.toString(this.minValue),
String.valueOf(this.maxValue), Long.toString(this.maxValue),
String.valueOf(this.increment)); Long.toString(this.increment));
} }
} }
......
...@@ -1173,19 +1173,19 @@ public class MetaTable extends Table { ...@@ -1173,19 +1173,19 @@ public class MetaTable extends Table {
// SEQUENCE_NAME // SEQUENCE_NAME
identifier(s.getName()), identifier(s.getName()),
// CURRENT_VALUE // CURRENT_VALUE
String.valueOf(s.getCurrentValue()), Long.toString(s.getCurrentValue()),
// INCREMENT // INCREMENT
String.valueOf(s.getIncrement()), Long.toString(s.getIncrement()),
// IS_GENERATED // IS_GENERATED
s.getBelongsToTable() ? "TRUE" : "FALSE", s.getBelongsToTable() ? "TRUE" : "FALSE",
// REMARKS // REMARKS
replaceNullWithEmpty(s.getComment()), replaceNullWithEmpty(s.getComment()),
// CACHE // CACHE
String.valueOf(s.getCacheSize()), Long.toString(s.getCacheSize()),
// MIN_VALUE // MIN_VALUE
String.valueOf(s.getMinValue()), Long.toString(s.getMinValue()),
// MAX_VALUE // MAX_VALUE
String.valueOf(s.getMaxValue()), Long.toString(s.getMaxValue()),
// IS_CYCLE // IS_CYCLE
s.getCycle() ? "TRUE" : "FALSE", s.getCycle() ? "TRUE" : "FALSE",
// ID // ID
......
...@@ -207,7 +207,7 @@ public class ConvertTraceFile extends Tool { ...@@ -207,7 +207,7 @@ public class ConvertTraceFile extends Tool {
} }
private static String padNumberLeft(long number, int digits) { private static String padNumberLeft(long number, int digits) {
return StringUtils.pad(String.valueOf(number), digits, " ", false); return StringUtils.pad(Long.toString(number), digits, " ", false);
} }
private void addToStats(String sql, int resultCount, long time) { private void addToStats(String sql, int resultCount, long time) {
......
...@@ -170,7 +170,7 @@ public class ValueLong extends Value { ...@@ -170,7 +170,7 @@ public class ValueLong extends Value {
@Override @Override
public String getString() { public String getString() {
return String.valueOf(value); return Long.toString(value);
} }
@Override @Override
......
...@@ -304,7 +304,7 @@ public class FtpControl extends Thread { ...@@ -304,7 +304,7 @@ public class FtpControl extends Thread {
} else if ("SIZE".equals(command)) { } else if ("SIZE".equals(command)) {
param = getFileName(param); param = getFileName(param);
if (FileUtils.exists(param) && !FileUtils.isDirectory(param)) { if (FileUtils.exists(param) && !FileUtils.isDirectory(param)) {
reply(250, String.valueOf(FileUtils.size(param))); reply(250, Long.toString(FileUtils.size(param)));
} else { } else {
reply(500, "Failed"); reply(500, "Failed");
} }
......
...@@ -230,7 +230,7 @@ public class FtpServer extends Tool implements Service { ...@@ -230,7 +230,7 @@ public class FtpServer extends Tool implements Service {
buff.append('r'); buff.append('r');
buff.append(FileUtils.canWrite(fileName) ? 'w' : '-'); buff.append(FileUtils.canWrite(fileName) ? 'w' : '-');
buff.append("------- 1 owner group "); buff.append("------- 1 owner group ");
String size = String.valueOf(FileUtils.size(fileName)); String size = Long.toString(FileUtils.size(fileName));
for (int i = size.length(); i < 15; i++) { for (int i = size.length(); i < 15; i++) {
buff.append(' '); buff.append(' ');
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论