From a5df6d419d16e8642842c9420e91973415462d83 Mon Sep 17 00:00:00 2001
From: zab2 <zab2@mail.i2p>
Date: Thu, 27 Jun 2013 19:04:28 +0000
Subject: [PATCH] use String.intern() instead of a homebrew equivalent

---
 core/java/src/net/i2p/data/RouterAddress.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/core/java/src/net/i2p/data/RouterAddress.java b/core/java/src/net/i2p/data/RouterAddress.java
index c21f0f5bf1..27c529c491 100644
--- a/core/java/src/net/i2p/data/RouterAddress.java
+++ b/core/java/src/net/i2p/data/RouterAddress.java
@@ -215,12 +215,8 @@ public class RouterAddress extends DataStructureImpl {
         _cost = (int) DataHelper.readLong(in, 1);
         //_expiration = DataHelper.readDate(in);
         DataHelper.readDate(in);
-        _transportStyle = DataHelper.readString(in);
         // reduce Object proliferation
-        if (_transportStyle.equals("SSU"))
-            _transportStyle = "SSU";
-        else if (_transportStyle.equals("NTCP"))
-            _transportStyle = "NTCP";
+        _transportStyle = DataHelper.readString(in).intern();
         DataHelper.readProperties(in, _options);
     }
     
-- 
GitLab