incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r801086 - /incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/parse/html/LinkExtractor.java
Date Wed, 05 Aug 2009 08:39:46 GMT
Author: thorsten
Date: Wed Aug  5 08:39:46 2009
New Revision: 801086

URL: http://svn.apache.org/viewvc?rev=801086&view=rev
Log:
DROIDS-59
Link extraction problem
Reporter/due-to: Bertil Chapuis
Thanks Bertli.

Modified:
    incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/parse/html/LinkExtractor.java

Modified: incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/parse/html/LinkExtractor.java
URL: http://svn.apache.org/viewvc/incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/parse/html/LinkExtractor.java?rev=801086&r1=801085&r2=801086&view=diff
==============================================================================
--- incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/parse/html/LinkExtractor.java
(original)
+++ incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/parse/html/LinkExtractor.java
Wed Aug  5 08:39:46 2009
@@ -84,20 +84,15 @@
       if (elem.equalsIgnoreCase(loc) && att.getValue(linkAtt) != null) {
         link = getURI(att.getValue(linkAtt));
         log.debug("Found element: " + elem + " with link: " + link);
+        if (link != null) {
+        	addOutlinkURI(link.toString());
+        	link = null;
+        }
       }
     }
   }
 
   @Override
-  public void characters(char[] chars, int start, int length) throws SAXException 
-  {
-    if (link != null) {
-      addOutlinkURI(new StringBuilder().append(chars, start, length).toString());
-      link = null;
-    }
-  }
-
-  @Override
   public void endDocument() throws SAXException 
   {
     history = null;



Mime
View raw message