[libpostgresql-jdbc-java] 09/93: Use StringBuffer to construct a string.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:18:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to annotated tag REL9_3_1102
in repository libpostgresql-jdbc-java.
commit 4baac5d95f927d20baac61fab03450f4cab6e051
Author: Heikki Linnakangas <heikki.linnakangas at iki.fi>
Date: Wed Nov 13 22:41:37 2013 +0200
Use StringBuffer to construct a string.
This piece of code isn't performance-critical at all, but silences a
Coverity complaint.
---
org/postgresql/core/v3/ConnectionFactoryImpl.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/org/postgresql/core/v3/ConnectionFactoryImpl.java b/org/postgresql/core/v3/ConnectionFactoryImpl.java
index 10a2e3d..3c7d332 100644
--- a/org/postgresql/core/v3/ConnectionFactoryImpl.java
+++ b/org/postgresql/core/v3/ConnectionFactoryImpl.java
@@ -324,12 +324,14 @@ public class ConnectionFactoryImpl extends ConnectionFactory {
private void sendStartupPacket(PGStream pgStream, String[][] params, Logger logger) throws IOException {
if (logger.logDebug())
{
- String details = "";
+ StringBuffer details = new StringBuffer();
for (int i = 0; i < params.length; ++i)
{
if (i != 0)
- details += ", ";
- details += params[i][0] + "=" + params[i][1];
+ details.append(", ");
+ details.append(params[i][0]);
+ details.append("=");
+ details.append(params[i][1]);
}
logger.debug(" FE=> StartupPacket(" + details + ")");
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list