summaryrefslogtreecommitdiffstats
path: root/base/console/src/com/netscape/certsrv/common/NameValuePairs.java
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-07-10 14:21:45 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-07-18 19:52:51 -0500
commit2b95e5231debe5fb6bd97e06c61dc65f7942e38c (patch)
treef4f3b14a77ba114c31151e8a6f641df3be725a54 /base/console/src/com/netscape/certsrv/common/NameValuePairs.java
parent6cd64781a7cda192bc2b0a555974037fd16cc2c5 (diff)
downloadpki-2b95e5231debe5fb6bd97e06c61dc65f7942e38c.tar.gz
pki-2b95e5231debe5fb6bd97e06c61dc65f7942e38c.tar.xz
pki-2b95e5231debe5fb6bd97e06c61dc65f7942e38c.zip
Merged changes in com.netscape.certsrv.common.
Due to packaging issue the source code in com.netscape.certsrv.common were duplicated into common and console packages and over time they have become out-of-sync. This patch merges the changes such that they are now identical. When the packaging issue is fixed later the duplicate copy can be removed. Ticket #113
Diffstat (limited to 'base/console/src/com/netscape/certsrv/common/NameValuePairs.java')
-rw-r--r--base/console/src/com/netscape/certsrv/common/NameValuePairs.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/base/console/src/com/netscape/certsrv/common/NameValuePairs.java b/base/console/src/com/netscape/certsrv/common/NameValuePairs.java
index 5e7d79cde..30491cdd0 100644
--- a/base/console/src/com/netscape/certsrv/common/NameValuePairs.java
+++ b/base/console/src/com/netscape/certsrv/common/NameValuePairs.java
@@ -18,6 +18,7 @@
package com.netscape.certsrv.common;
import java.util.LinkedHashMap;
+import java.util.Map;
import java.util.StringTokenizer;
/**
@@ -28,6 +29,8 @@ import java.util.StringTokenizer;
*/
public class NameValuePairs extends LinkedHashMap<String, String> {
+ private static final long serialVersionUID = 1494507857048437440L;
+
/**
* Constructs name value pairs.
*/
@@ -41,12 +44,11 @@ public class NameValuePairs extends LinkedHashMap<String, String> {
* @return string representation
*/
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
- for (String name : keySet()) {
- String value = get(name);
+ for (Map.Entry<String, String> entry : entrySet()) {
- buf.append(name + "=" + value);
+ buf.append(String.format("%s=%s", entry.getKey(), entry.getValue()));
buf.append("\n");
}