From: David ‘Bombe’ Roden Date: Wed, 25 Jun 2014 18:20:48 +0000 (+0200) Subject: Skip redundant initialization. X-Git-Tag: 0.9-rc1^2~3^2~230 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9b043f1f3d5a622ed2d8f1012dbb2eea676fdce5;p=Sone.git Skip redundant initialization. --- 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) {