Remove some unnecessary local variables.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 25 Jun 2014 17:56:36 +0000 (19:56 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 25 Jun 2014 17:56:36 +0000 (19:56 +0200)
src/main/java/net/pterodactylus/sone/data/SoneImpl.java
src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java
src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java

index 880eb95..f57bac9 100644 (file)
@@ -371,8 +371,7 @@ public class SoneImpl implements Sone {
         * @return The friend Sones of this Sone
         */
        public List<String> getFriends() {
         * @return The friend Sones of this Sone
         */
        public List<String> getFriends() {
-               List<String> friends = new ArrayList<String>(friendSones);
-               return friends;
+               return new ArrayList<String>(friendSones);
        }
 
        /**
        }
 
        /**
index 07628e3..6278459 100644 (file)
@@ -566,8 +566,7 @@ public class WebOfTrustConnector {
                 * @return The created simple field set constructor
                 */
                public static SimpleFieldSetConstructor create(boolean shortLived) {
                 * @return The created simple field set constructor
                 */
                public static SimpleFieldSetConstructor create(boolean shortLived) {
-                       SimpleFieldSetConstructor simpleFieldSetConstructor = new SimpleFieldSetConstructor(shortLived);
-                       return simpleFieldSetConstructor;
+                       return new SimpleFieldSetConstructor(shortLived);
                }
 
        }
                }
 
        }
index 0d4f556..a5a4edf 100644 (file)
@@ -68,8 +68,7 @@ public class RequestChangeFilter implements Filter {
                        if (questionMark == -1) {
                                questionMark = oldUri.length();
                        }
                        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) {
                } catch (UnsupportedEncodingException uee1) {
                        /* UTF-8 not supported? I don’t think so. */
                } catch (URISyntaxException use1) {