From: David ‘Bombe’ Roden Date: Wed, 25 Jun 2014 17:56:36 +0000 (+0200) Subject: Remove some unnecessary local variables. X-Git-Tag: 0.9-rc1^2~3^2~232 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b507727abe8d1262fc9885ed6be0d036e63cd7e2;p=Sone.git Remove some unnecessary local variables. --- 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) {