You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by zh...@gmail.com on 2010/04/07 03:10:24 UTC

Allow overloading of GadgetHtmlParser (issue896042)

Reviewers: shindig.remailer_gmail.com, johnfargo,

Description:

Remove final from parseDom and parseFragment functions to allow creating
different parser.
For example a router between multiple parser.

Please review this at http://codereview.appspot.com/896042/show

Affected files:
    
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java


### Eclipse Workspace Patch 1.0
#P shindig-project
Index:  
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java
===================================================================
---  
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java	 
(revision 931314)
+++  
java/gadgets/src/main/java/org/apache/shindig/gadgets/parse/GadgetHtmlParser.java	 
(working copy)
@@ -89,7 +89,7 @@
      return normalized.contains("<!DOCTYPE") ||  
normalized.contains("<HTML");
    }

-  public final Document parseDom(String source) throws GadgetException {
+  public Document parseDom(String source) throws GadgetException {
      Document document = null;
      String key = null;
      // Avoid checksum overhead if we arent caching
@@ -233,7 +233,7 @@
     * @param result Node to append results to
     * @throws GadgetException
     */
-  public final void parseFragment(String source, Node result) throws  
GadgetException {
+  public void parseFragment(String source, Node result) throws  
GadgetException {
      boolean shouldCache = shouldCache();
      String key = null;
      if (shouldCache) {