aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service
diff options
context:
space:
mode:
authorMatthieu Casanova <kpouer@java.net>2010-06-03 12:34:16 +0000
committerMatthieu Casanova <kpouer@java.net>2010-06-03 12:34:16 +0000
commit7eba009eb2264cc2801f2d3b05a4b76472763e94 (patch)
tree80c147b5fffcde7dce9f4c84b821ba20fdf62a49 /src/net/java/sip/communicator/service
parent8408110b8b1dc938ea21defc9024897baf8ff1ff (diff)
downloadjitsi-7eba009eb2264cc2801f2d3b05a4b76472763e94.zip
jitsi-7eba009eb2264cc2801f2d3b05a4b76472763e94.tar.gz
jitsi-7eba009eb2264cc2801f2d3b05a4b76472763e94.tar.bz2
use of StringBuilder instead of StringBuffer
fixed some brace placement made fields final when possible
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r--src/net/java/sip/communicator/service/history/HistoryID.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/net/java/sip/communicator/service/history/HistoryID.java b/src/net/java/sip/communicator/service/history/HistoryID.java
index 05eff3c..305a33c 100644
--- a/src/net/java/sip/communicator/service/history/HistoryID.java
+++ b/src/net/java/sip/communicator/service/history/HistoryID.java
@@ -13,17 +13,17 @@ package net.java.sip.communicator.service.history;
*/
public class HistoryID
{
- private String[] id;
+ private final String[] id;
- private String stringRepresentation;
+ private final String stringRepresentation;
- private int hashCode;
+ private final int hashCode;
private HistoryID(String[] id)
{
this.id = id;
- StringBuffer buff = new StringBuffer();
+ StringBuilder buff = new StringBuilder();
for (int i = 0; i < id.length; i++)
{
if (i > 0)
@@ -142,7 +142,7 @@ public class HistoryID
*/
public static String readableHash(String rawString)
{
- StringBuffer encodedString = new StringBuffer(rawString);
+ StringBuilder encodedString = new StringBuilder(rawString);
boolean addHash = false;
for (int i = 0; i < encodedString.length(); i++)
@@ -191,11 +191,13 @@ public class HistoryID
if (isValid)
{
// OK; Check Y..Y
- try {
+ try
+ {
Integer.parseInt(end, 16);
// OK
isValid = true;
- } catch (Exception e)
+ }
+ catch (Exception e)
{
// Not OK
isValid = false;