ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1697785 - /webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Date Tue, 25 Aug 2015 23:06:16 GMT
Author: veithen
Date: Tue Aug 25 23:06:16 2015
New Revision: 1697785

URL: http://svn.apache.org/r1697785
Log:
Eliminate unnecessary casts.

Modified:
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?rev=1697785&r1=1697784&r2=1697785&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
(original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Tue Aug 25 23:06:16 2015
@@ -265,7 +265,7 @@ public class FOMFactory extends OMLinked
 
     public <T extends Element> T newExtensionElement(QName qname, Base parent) {
         String ns = qname.getNamespaceURI();
-        Element el = (Element)createElement(qname, (OMContainer)parent);
+        Element el = createElement(qname, (OMContainer)parent);
         return (T)((ATOM_NS.equals(ns) || APP_NS.equals(ns)) ? el : factoriesMap.getElementWrapper(el));
     }
 
@@ -429,8 +429,8 @@ public class FOMFactory extends OMLinked
         return new FOMDiv(DIV, (OMContainer)parent, this);
     }
 
-    protected OMElement createElement(QName qname, OMContainer parent) {
-        OMElement element = null;
+    protected FOMElement createElement(QName qname, OMContainer parent) {
+        FOMElement element = null;
         if (FEED.equals(qname)) {
             element = new FOMFeed(qname, parent, this);
         } else if (SERVICE.equals(qname) || PRE_RFC_SERVICE.equals(qname)) {
@@ -488,9 +488,9 @@ public class FOMFactory extends OMLinked
         } else if (EDITED.equals(qname) || PRE_RFC_EDITED.equals(qname)) {
             element = new FOMDateTime(qname, parent, this);
         } else if (parent instanceof ExtensibleElement || parent instanceof Document) {
-            element = (OMElement)new FOMExtensibleElement(qname, parent, this);
+            element = new FOMExtensibleElement(qname, parent, this);
         } else {
-            element = (OMElement)new FOMExtensibleElement(qname, null, this);
+            element = new FOMExtensibleElement(qname, null, this);
         }
         return element;
     }



Mime
View raw message