[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-develop
Subject:    [HtmlUnit] SF.net SVN: htmlunit:[5016]
From:       asashour () users ! sourceforge ! net
Date:       2009-09-27 14:43:46
Message-ID: E1MruyY-0007XQ-Hv () d5vjzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 5016
          http://htmlunit.svn.sourceforge.net/htmlunit/?rev=5016&view=rev
Author:   asashour
Date:     2009-09-27 14:43:46 +0000 (Sun, 27 Sep 2009)

Log Message:
-----------
JDK 5 :(

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Attr.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Document.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/EventListenersContainer.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Range.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/RowContainer.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XSLTProcessor.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java
  trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java


Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -129,7 +129,7 @@
     }
 
     private boolean useRecursiveAttributeForIE() {
-        return getBrowserVersion().isIE() && getDomNodeOrDie() instanceof \
HtmlElement; +        return getBrowserVersion().isIE() && \
this.<DomNode>getDomNodeOrDie() instanceof HtmlElement;  }
 
     /**
@@ -157,7 +157,8 @@
     }
 
     private boolean isRecursiveAttribute(final String name) {
-        for (Scriptable object = getDomNodeOrDie().getScriptObject(); object != \
null; object = object.getPrototype()) { +        for (Scriptable object = \
this.<DomNode>getDomNodeOrDie().getScriptObject(); object != null; +            \
object = object.getPrototype()) {  for (final Object id : object.getIds()) {
                 if (name.equals(Context.toString(id))) {
                     return true;
@@ -177,7 +178,8 @@
 
     private String getRecusiveAttributeNameAt(final int index) {
         int i = 0;
-        for (Scriptable object = getDomNodeOrDie().getScriptObject(); object != \
null; object = object.getPrototype()) { +        for (Scriptable object = \
this.<DomNode>getDomNodeOrDie().getScriptObject(); object != null; +            \
object = object.getPrototype()) {  for (final Object id : object.getIds()) {
                 if (i == index) {
                     return Context.toString(id);

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -114,6 +114,7 @@
     /**
      * Returns the DOM node that corresponds to this JavaScript object or throw
      * an exception if one cannot be found.
+     * @param <N> the node type
      * @return the DOM node
      * @exception IllegalStateException If the DOM node could not be found.
      */
@@ -129,6 +130,7 @@
     /**
      * Returns the DOM node that corresponds to this JavaScript object
      * or null if a node hasn't been set.
+     * @param <N> the node type
      * @return the DOM node or null
      */
     @SuppressWarnings("unchecked")

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Attr.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Attr.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Attr.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -207,7 +207,7 @@
     @Override
     public Node jsxGet_lastChild() {
         if (getBrowserVersion().isFirefox()) {
-            final DomText text = new DomText(getDomNodeOrDie().getPage(), \
jsxGet_nodeValue()); +            final DomText text = new \
DomText(this.<DomNode>getDomNodeOrDie().getPage(), jsxGet_nodeValue());  return \
(Node) text.getScriptObject();  }
         return null;

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Document.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Document.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Document.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -214,7 +214,7 @@
      * @return a newly created document fragment
      */
     public Object jsxFunction_createDocumentFragment() {
-        final DomDocumentFragment fragment = \
getDomNodeOrDie().getPage().createDomDocumentFragment(); +        final \
DomDocumentFragment fragment = \
this.<DomNode>getDomNodeOrDie().getPage().createDomDocumentFragment();  final \
DocumentFragment node = new DocumentFragment();  \
node.setParentScope(getParentScope());  \
node.setPrototype(getPrototype(node.getClass())); @@ -253,7 +253,7 @@
      * @return the imported node that belongs to this Document
      */
     public Object jsxFunction_importNode(final Node importedNode, final boolean \
                deep) {
-        return importedNode.getDomNodeOrDie().cloneNode(deep).getScriptObject();
+        return importedNode.<DomNode>getDomNodeOrDie().cloneNode(deep).getScriptObject();
  }
 
     /**
@@ -302,7 +302,7 @@
     public Object jsxFunction_createTextNode(final String newData) {
         Object result = NOT_FOUND;
         try {
-            final DomNode domNode = new DomText(getDomNodeOrDie().getPage(), \
newData); +            final DomNode domNode = new \
DomText(this.<DomNode>getDomNodeOrDie().getPage(), newData);  final Object jsElement \
= getScriptableFor(domNode);  
             if (jsElement == NOT_FOUND) {
@@ -326,7 +326,7 @@
      * @return the new Comment
      */
     public Object jsxFunction_createComment(final String comment) {
-        final DomNode domNode = new DomComment(getDomNodeOrDie().getPage(), \
comment); +        final DomNode domNode = new \
DomComment(this.<DomNode>getDomNodeOrDie().getPage(), comment);  return \
getScriptableFor(domNode);  }
 
@@ -348,7 +348,7 @@
             xPathResult.setParentScope(getParentScope());
             xPathResult.setPrototype(getPrototype(xPathResult.getClass()));
         }
-        xPathResult.init(contextNode.getDomNodeOrDie().getByXPath(expression), \
type); +        xPathResult.init(contextNode.<DomNode>getDomNodeOrDie().getByXPath(expression), \
type);  return xPathResult;
     }
 

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/EventListenersContainer.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/EventListenersContainer.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/EventListenersContainer.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -196,7 +196,7 @@
         ScriptResult result = null;
 
         // the handler declared as property if any (not on body, as handler declared \
                on body goes to the window)
-        if (!(jsNode_.getDomNodeOrDie() instanceof HtmlBody)) {
+        if (!(jsNode_.<DomNode>getDomNodeOrDie() instanceof HtmlBody)) {
             result = executeEventHandler(event, propHandlerArgs);
             if (event.isPropagationStopped()) {
                 return result;

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -126,7 +126,7 @@
      * @return the node type
      */
     public short jsxGet_nodeType() {
-        return getDomNodeOrDie().getNodeType();
+        return this.<DomNode>getDomNodeOrDie().getNodeType();
     }
 
     /**
@@ -134,7 +134,7 @@
      * @return the node name
      */
     public String jsxGet_nodeName() {
-        return getDomNodeOrDie().getNodeName();
+        return this.<DomNode>getDomNodeOrDie().getNodeName();
     }
 
     /**
@@ -142,7 +142,7 @@
      * @return the node value
      */
     public String jsxGet_nodeValue() {
-        return getDomNodeOrDie().getNodeValue();
+        return this.<DomNode>getDomNodeOrDie().getNodeValue();
     }
 
     /**
@@ -150,7 +150,7 @@
      * @param newValue the new node value
      */
     public void jsxSet_nodeValue(final String newValue) {
-        getDomNodeOrDie().setNodeValue(newValue);
+        this.<DomNode>getDomNodeOrDie().setNodeValue(newValue);
     }
 
     /**
@@ -370,7 +370,7 @@
      * @return boolean true if this node has any children, false otherwise
      */
     public boolean jsxFunction_hasChildNodes() {
-        return getDomNodeOrDie().getChildren().iterator().hasNext();
+        return this.<DomNode>getDomNodeOrDie().getChildren().iterator().hasNext();
     }
 
     /**
@@ -398,7 +398,7 @@
             final DocumentFragment fragment = (DocumentFragment) newChildObject;
             Node firstNode = null;
             final Node refChildObject = ((Node) \
                oldChildObject).jsxGet_nextSibling();
-            for (final DomNode node : fragment.getDomNodeOrDie().getChildren()) {
+            for (final DomNode node : \
fragment.<DomNode>getDomNodeOrDie().getChildren()) {  if (firstNode == null) {
                     jsxFunction_replaceChild(node.getScriptObject(), \
oldChildObject);  firstNode = (Node) node.getScriptObject();
@@ -438,7 +438,7 @@
      * @return the parent node
      */
     public Node jsxGet_parentNode() {
-        return getJavaScriptNode(getDomNodeOrDie().getParentNode());
+        return getJavaScriptNode(this.<DomNode>getDomNodeOrDie().getParentNode());
     }
 
     /**
@@ -448,7 +448,7 @@
      * no next sibling.
      */
     public Node jsxGet_nextSibling() {
-        return getJavaScriptNode(getDomNodeOrDie().getNextSibling());
+        return getJavaScriptNode(this.<DomNode>getDomNodeOrDie().getNextSibling());
     }
 
     /**
@@ -458,7 +458,7 @@
      * no previous sibling.
      */
     public Node jsxGet_previousSibling() {
-        return getJavaScriptNode(getDomNodeOrDie().getPreviousSibling());
+        return getJavaScriptNode(this.<DomNode>getDomNodeOrDie().getPreviousSibling());
  }
 
     /**
@@ -468,7 +468,7 @@
      * no children.
      */
     public Node jsxGet_firstChild() {
-        return getJavaScriptNode(getDomNodeOrDie().getFirstChild());
+        return getJavaScriptNode(this.<DomNode>getDomNodeOrDie().getFirstChild());
     }
 
     /**
@@ -478,7 +478,7 @@
      * no children.
      */
     public Node jsxGet_lastChild() {
-        return getJavaScriptNode(getDomNodeOrDie().getLastChild());
+        return getJavaScriptNode(this.<DomNode>getDomNodeOrDie().getLastChild());
     }
 
     /**
@@ -555,7 +555,7 @@
     public ScriptResult executeEvent(final Event event) {
         if (eventListenersContainer_ != null) {
 
-            final HtmlPage page = (HtmlPage) getDomNodeOrDie().getPage();
+            final HtmlPage page = (HtmlPage) \
this.<DomNode>getDomNodeOrDie().getPage();  final boolean isIE = \
                getBrowserVersion().isIE();
             final Window window = (Window) \
page.getEnclosingWindow().getScriptObject();  final Object[] args = new Object[] \
{event}; @@ -587,7 +587,7 @@
      * @return the result
      */
     public ScriptResult fireEvent(final Event event) {
-        final HtmlPage page = (HtmlPage) getDomNodeOrDie().getPage();
+        final HtmlPage page = (HtmlPage) this.<DomNode>getDomNodeOrDie().getPage();
         final boolean ie = getBrowserVersion().isIE();
         final Window window = (Window) page.getEnclosingWindow().getScriptObject();
         final Object[] args = new Object[] {event};
@@ -710,7 +710,7 @@
      * @return the document
      */
     public Object jsxGet_ownerDocument() {
-        final Object document = getDomNodeOrDie().getOwnerDocument();
+        final Object document = this.<DomNode>getDomNodeOrDie().getOwnerDocument();
         if (document == null) {
             return null;
         }
@@ -722,8 +722,9 @@
      * @return the Namespace prefix
      */
     public String jsxGet_prefix() {
-        final String prefix = getDomNodeOrDie().getPrefix();
-        if (getBrowserVersion().isIE() && (prefix == null || \
getDomNodeOrDie().getPage() instanceof HtmlPage)) { +        final DomNode domNode = \
getDomNodeOrDie(); +        final String prefix = domNode.getPrefix();
+        if (getBrowserVersion().isIE() && (prefix == null || domNode.getPage() \
instanceof HtmlPage)) {  return "";
         }
         return prefix;
@@ -734,7 +735,7 @@
      * @return the local name of this element
      */
     public String jsxGet_localName() {
-        return getDomNodeOrDie().getLocalName();
+        return this.<DomNode>getDomNodeOrDie().getLocalName();
     }
 
     /**
@@ -745,7 +746,7 @@
         if (getBrowserVersion().isIE()) {
             return "";
         }
-        return getDomNodeOrDie().getNamespaceURI();
+        return this.<DomNode>getDomNodeOrDie().getNamespaceURI();
     }
 
     /**
@@ -754,7 +755,7 @@
     @Override
     public void setDomNode(final DomNode domNode) {
         super.setDomNode(domNode);
-        if (getBrowserVersion().isIE() && !(getDomNodeOrDie().getPage() instanceof \
HtmlPage)) { +        if (getBrowserVersion().isIE() && \
!(this.<DomNode>getDomNodeOrDie().getPage() instanceof HtmlPage)) {  \
ActiveXObject.addProperty(this, "namespaceURI", true, false);  \
ActiveXObject.addProperty(this, "prefix", true, false);  }
@@ -768,14 +769,14 @@
      * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)
      */
     public short jsxFunction_compareDocumentPosition(final Node node) {
-        return getDomNodeOrDie().compareDocumentPosition(node.getDomNodeOrDie());
+        return this.<DomNode>getDomNodeOrDie().compareDocumentPosition(node.getDomNodeOrDie());
  }
 
     /**
      * Merges adjacent TextNode objects to produce a normalized document object \
                model.
      */
     public void jsxFunction_normalize() {
-        getDomNodeOrDie().normalize();
+        this.<DomNode>getDomNodeOrDie().normalize();
     }
 
     /**

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Range.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Range.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Range.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -17,11 +17,13 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.collections.ListUtils;
 import net.sourceforge.htmlunit.corejs.javascript.Context;
 
+import org.apache.commons.collections.ListUtils;
+
 import com.gargoylesoftware.htmlunit.SgmlPage;
 import com.gargoylesoftware.htmlunit.html.DomDocumentFragment;
+import com.gargoylesoftware.htmlunit.html.DomNode;
 import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable;
 import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement;
 
@@ -232,7 +234,7 @@
      * @see <a href="http://developer.mozilla.org/en/docs/DOM:range.createContextualFragment">Mozilla \
                documentation</a>
      */
     public Object jsxFunction_createContextualFragment(final String valueAsString) {
-        final SgmlPage page = startContainer_.getDomNodeOrDie().getPage();
+        final SgmlPage page = startContainer_.<DomNode>getDomNodeOrDie().getPage();
         final DomDocumentFragment fragment = new DomDocumentFragment(page);
         HTMLElement.parseHtmlSnippet(fragment, true, valueAsString);
         return fragment.getScriptObject();

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/RowContainer.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/RowContainer.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/RowContainer.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -17,6 +17,7 @@
 import net.sourceforge.htmlunit.corejs.javascript.Context;
 import net.sourceforge.htmlunit.corejs.javascript.Undefined;
 
+import com.gargoylesoftware.htmlunit.html.DomNode;
 import com.gargoylesoftware.htmlunit.html.HtmlElement;
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable;
@@ -79,7 +80,7 @@
         final boolean rowIndexValid = (rowIndex >= 0 && rowIndex < rowCount);
         if (rowIndexValid) {
             final SimpleScriptable row = (SimpleScriptable) \
                rows.jsxFunction_item(new Integer(rowIndex));
-            row.getDomNodeOrDie().remove();
+            row.<DomNode>getDomNodeOrDie().remove();
         }
     }
 
@@ -131,10 +132,10 @@
             final SimpleScriptable row = (SimpleScriptable) \
                rows.jsxFunction_item(new Integer(index));
             // if at the end, then in the same "sub-container" as the last existing \
row  if (index >= rowCount - 1) {
-                row.getDomNodeOrDie().getParentNode().appendChild(newRow);
+                row.<DomNode>getDomNodeOrDie().getParentNode().appendChild(newRow);
             }
             else {
-                row.getDomNodeOrDie().insertBefore(newRow);
+                row.<DomNode>getDomNodeOrDie().insertBefore(newRow);
             }
         }
         return getScriptableFor(newRow);
@@ -155,7 +156,7 @@
         if (sourceIndexValid && targetIndexValid) {
             final SimpleScriptable sourceRow = (SimpleScriptable) \
                rows.jsxFunction_item(new Integer(sourceIndex));
             final SimpleScriptable targetRow = (SimpleScriptable) \
                rows.jsxFunction_item(new Integer(targetIndex));
-            targetRow.getDomNodeOrDie().insertBefore(sourceRow.getDomNodeOrDie());
+            targetRow.<DomNode>getDomNodeOrDie().insertBefore(sourceRow.<DomNode>getDomNodeOrDie());
  return sourceRow;
         }
         return null;

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XSLTProcessor.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XSLTProcessor.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XSLTProcessor.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -262,7 +262,7 @@
      */
     public void jsxFunction_transform() {
         final Node input = input_;
-        final SgmlPage page = input.getDomNodeOrDie().getPage();
+        final SgmlPage page = input.<DomNode>getDomNodeOrDie().getPage();
 
         if (output_ == null || !(output_ instanceof Node)) {
             final DomDocumentFragment fragment = page.createDomDocumentFragment();
@@ -277,7 +277,7 @@
         final XMLSerializer serializer = new XMLSerializer();
         serializer.setParentScope(getParentScope());
         String output = "";
-        for (final DomNode child : ((Node) output_).getDomNodeOrDie().getChildren()) \
{ +        for (final DomNode child : ((Node) \
output_).<DomNode>getDomNodeOrDie().getChildren()) {  if (child instanceof DomText) {
                 //IE: XmlPage ignores all empty text nodes (if 'xml:space' is \
'default')  //Maybe this should be changed for 'xml:space' = preserve

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -40,6 +40,7 @@
 import org.w3c.css.sac.InputSource;
 
 import com.gargoylesoftware.htmlunit.WebAssert;
+import com.gargoylesoftware.htmlunit.html.DomNode;
 import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable;
 import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement;
 import com.steadystate.css.dom.CSSValueImpl;
@@ -4241,7 +4242,7 @@
         // following is a hack, just to have basic support for getPropertyCSSValue
         // TODO: rework the whole CSS processing here! we should *always* parse the \
style!  if (styleDeclaration_ == null) {
-            final String uri = \
getDomNodeOrDie().getPage().getWebResponse().getRequestSettings() +            final \
String uri = this.<DomNode>getDomNodeOrDie().getPage().getWebResponse().getRequestSettings()
                
             .getUrl().toExternalForm();
             final String styleAttribute = \
                jsElement_.getDomNodeOrDie().getAttribute("style");
             final InputSource source = new InputSource(new \
StringReader(styleAttribute));

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -22,9 +22,10 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
-import org.apache.commons.lang.StringUtils;
 import net.sourceforge.htmlunit.corejs.javascript.Context;
 
+import org.apache.commons.lang.StringUtils;
+
 import com.gargoylesoftware.htmlunit.html.DomNode;
 import com.gargoylesoftware.htmlunit.html.HtmlElement;
 import com.gargoylesoftware.htmlunit.html.HtmlHead;
@@ -1182,7 +1183,7 @@
             final String cssFloat = jsxGet_cssFloat();
             if ("right".equals(cssFloat) || "left".equals(cssFloat)) {
                 // simplistic approximation: text content * 10 pixels per character
-                width = getDomNodeOrDie().getTextContent().length() * 10;
+                width = this.<DomNode>getDomNodeOrDie().getTextContent().length() * \
10;  }
             else {
                 final HTMLElement parentJS = (HTMLElement) parent.getScriptObject();

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -210,7 +210,7 @@
     @SuppressWarnings("unchecked")
     public <N extends DomNode> N getDomNodeOrDie() throws IllegalStateException {
         try {
-            return super.getDomNodeOrDie();
+            return (N) super.getDomNodeOrDie();
         }
         catch (final IllegalStateException e) {
             final DomNode node = getDomNodeOrNullFromRealDocument();

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -272,7 +272,7 @@
     @Override
     public HTMLCollection jsxFunction_getElementsByTagName(final String tagName) {
         final HTMLCollection collection = new HTMLCollection(this);
-        collection.init(getDomNodeOrDie().getFirstChild(), "//*[local-name()='" + \
tagName + "']"); +        \
collection.init(this.<DomNode>getDomNodeOrDie().getFirstChild(), "//*[local-name()='" \
+ tagName + "']");  return collection;
     }
 

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java	2009-09-27 \
                12:10:26 UTC (rev 5015)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java	2009-09-27 \
14:43:46 UTC (rev 5016) @@ -67,7 +67,7 @@
         if (root == null) {
             return "";
         }
-        return root.getDomNodeOrDie().asXml();
+        return root.<DomNode>getDomNodeOrDie().asXml();
     }
 
     private void toXml(final int indent, final DomNode node, final StringBuilder \
buffer, final boolean isIE) {


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic