From: David ‘Bombe’ Roden Date: Fri, 8 Nov 2013 21:44:43 +0000 (+0100) Subject: Remove unnecessary cast. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f46c8ccae4ed1e4185affaad04d08d1b80af4718;p=Sone.git Remove unnecessary cast. --- diff --git a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java index 3085517..396c660 100644 --- a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java +++ b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java @@ -328,7 +328,7 @@ public class SoneTextParser implements Parser { } for (int partIndex = parts.size() - 1; partIndex >= 0; --partIndex) { Part part = parts.getPart(partIndex); - if (!(part instanceof PlainTextPart) || !"\n".equals(((PlainTextPart) part).getText())) { + if (!(part instanceof PlainTextPart) || !"\n".equals(part.getText())) { break; } parts.removePart(partIndex);