abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r433386 - in /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax: FOMElement.java FOMFeed.java
Date Mon, 21 Aug 2006 22:00:59 GMT
Author: jmsnell
Date: Mon Aug 21 15:00:59 2006
New Revision: 433386

URL: http://svn.apache.org/viewvc?rev=433386&view=rev
Log:
Changing the redundant add check into an assert.  It will only be active if assertions are

enabled on the runtime (e.g. calling java with the "-ea" param)

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?rev=433386&r1=433385&r2=433386&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Mon Aug 21 15:00:59 2006
@@ -581,7 +581,7 @@
   }
   
   public void addChild(OMNode node) {
-    if (node.getParent() == this) return;
+    assert node.getParent() != this;
     super.addChild(node);
   }    
 }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java?rev=433386&r1=433385&r2=433386&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
Mon Aug 21 15:00:59 2006
@@ -133,7 +133,7 @@
 
   @Override
   public void addChild(OMNode node) {
-    if (node.getParent() == this) return;
+    assert node.getParent() != this;
     if (isComplete() && node instanceof OMElement && !(node instanceof Entry))
{
       OMElement el = this.getFirstChildWithName(ENTRY);
       if (el != null) {



Mime
View raw message