From b507727abe8d1262fc9885ed6be0d036e63cd7e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 25 Jun 2014 19:56:36 +0200 Subject: [PATCH] Remove some unnecessary local variables. --- src/main/java/net/pterodactylus/sone/data/SoneImpl.java | 3 +-- .../java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java | 3 +-- src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/data/SoneImpl.java b/src/main/java/net/pterodactylus/sone/data/SoneImpl.java index 880eb95..f57bac9 100644 --- a/src/main/java/net/pterodactylus/sone/data/SoneImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/SoneImpl.java @@ -371,8 +371,7 @@ public class SoneImpl implements Sone { * @return The friend Sones of this Sone */ public List getFriends() { - List friends = new ArrayList(friendSones); - return friends; + return new ArrayList(friendSones); } /** diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java b/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java index 07628e3..6278459 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java @@ -566,8 +566,7 @@ public class WebOfTrustConnector { * @return The created simple field set constructor */ public static SimpleFieldSetConstructor create(boolean shortLived) { - SimpleFieldSetConstructor simpleFieldSetConstructor = new SimpleFieldSetConstructor(shortLived); - return simpleFieldSetConstructor; + return new SimpleFieldSetConstructor(shortLived); } } diff --git a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java index 0d4f556..a5a4edf 100644 --- a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java @@ -68,8 +68,7 @@ public class RequestChangeFilter implements Filter { if (questionMark == -1) { questionMark = oldUri.length(); } - URI u = new URI(oldUri.substring(0, questionMark) + query.toString()); - return u; + return new URI(oldUri.substring(0, questionMark) + query.toString()); } catch (UnsupportedEncodingException uee1) { /* UTF-8 not supported? I don’t think so. */ } catch (URISyntaxException use1) { -- 2.7.4