Skip to content

[IOTDB-1166] Remove redundant toString() calls#2704

Merged
jixuan1989 merged 2 commits intoapache:masterfrom
sunjincheng121:rmtoString
Feb 21, 2021
Merged

[IOTDB-1166] Remove redundant toString() calls#2704
jixuan1989 merged 2 commits intoapache:masterfrom
sunjincheng121:rmtoString

Conversation

@sunjincheng121
Copy link
Member

Remove redundant toString() calls,e.g,:

"Unknown operator: " + operatorType.toString()-> Unknown operator: " + operatorType

Any calls to toString() used in string concatenations and as arguments to the print() and println() methods of java.io.PrintWriter and java.io.PrintStream, the append() method of java.lang.StringBuilder and java.lang.StringBuffer or the trace(), debug(), info(), warn() and error() methods of org.slf4j.Logger. In these cases the conversion to string will be handled by the underlying library methods and an explicit call to toString() is no needed.

And using mvn spotless:check and mvn spotless:apply format code.

@jixuan1989 jixuan1989 merged commit 5a14711 into apache:master Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants