From 9b043f1f3d5a622ed2d8f1012dbb2eea676fdce5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 25 Jun 2014 20:20:48 +0200 Subject: [PATCH] Skip redundant initialization. --- src/main/java/net/pterodactylus/sone/template/IdentityAccessor.java | 5 ++--- src/main/java/net/pterodactylus/sone/web/SearchPage.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/template/IdentityAccessor.java b/src/main/java/net/pterodactylus/sone/template/IdentityAccessor.java index c08a0a2..efb4d16 100644 --- a/src/main/java/net/pterodactylus/sone/template/IdentityAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/IdentityAccessor.java @@ -55,9 +55,8 @@ public class IdentityAccessor extends ReflectionAccessor { Identity identity = (Identity) object; if ("uniqueNickname".equals(member)) { int minLength = -1; - boolean found = false; - Set ownIdentities = null; - ownIdentities = core.getIdentityManager().getAllOwnIdentities(); + boolean found; + Set ownIdentities = core.getIdentityManager().getAllOwnIdentities(); do { boolean unique = true; String abbreviatedWantedNickname = getAbbreviatedNickname(identity, ++minLength); diff --git a/src/main/java/net/pterodactylus/sone/web/SearchPage.java b/src/main/java/net/pterodactylus/sone/web/SearchPage.java index 45773ca..3f6d065 100644 --- a/src/main/java/net/pterodactylus/sone/web/SearchPage.java +++ b/src/main/java/net/pterodactylus/sone/web/SearchPage.java @@ -201,7 +201,7 @@ public class SearchPage extends SoneTemplatePage { * @return The parsed phrases */ private static List parseSearchPhrases(String query) { - List parsedPhrases = null; + List parsedPhrases; try { parsedPhrases = StringEscaper.parseLine(query); } catch (TextException te1) { -- 2.7.4