Simplify link title extraction.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 9 Mar 2009 20:31:58 +0000 (21:31 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 9 Mar 2009 20:31:58 +0000 (21:31 +0100)
src/net/pterodactylus/arachne/parser/HtmlEditorKitParser.java

index 47e2d52..888e2df 100644 (file)
@@ -89,11 +89,7 @@ public class HtmlEditorKitParser extends HTMLEditorKit.ParserCallback implements
                                linkTarget = href;
                                inLink = true;
                                linkText = new StringBuilder();
-                               linkTitle = null;
-                               String title = (String) attributeSet.getAttribute(HTML.Attribute.TITLE);
-                               if (title != null) {
-                                       linkTitle = title;
-                               }
+                               linkTitle = (String) attributeSet.getAttribute(HTML.Attribute.TITLE);
                        }
                }
                if (inLink) {