SANTUARIO-535 - Preserved processEvent instead of processNextEvent. Thanks to Peter De Maeyer for the patch. This closes #27.


git-svn-id: https://svn.apache.org/repos/asf/santuario/xml-security-java/trunk@1876818 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/xml/security/stax/ext/AbstractBufferingOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/ext/AbstractBufferingOutputProcessor.java
index 5f0fff0..21e446e 100644
--- a/src/main/java/org/apache/xml/security/stax/ext/AbstractBufferingOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/ext/AbstractBufferingOutputProcessor.java
@@ -41,7 +41,7 @@
     }
 
     @Override
-    public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
+    public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
         xmlSecEventBuffer.offer(xmlSecEvent);
     }
diff --git a/src/main/java/org/apache/xml/security/stax/ext/OutputProcessor.java b/src/main/java/org/apache/xml/security/stax/ext/OutputProcessor.java
index 15a9ec5..d8572d2 100644
--- a/src/main/java/org/apache/xml/security/stax/ext/OutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/ext/OutputProcessor.java
@@ -92,7 +92,7 @@
      * @throws XMLStreamException   thrown when a streaming error occurs
      * @throws XMLSecurityException thrown when a Security failure occurs
      */
-    void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException;
+    void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException;
 
     /**
      * Will be called when the whole document is processed.
diff --git a/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java b/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java
index 275c350..e6b45e9 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java
@@ -214,7 +214,7 @@
                     break;
             }
         }
-        outputProcessors.get(this.curPos++).processNextEvent(xmlSecEvent, this);
+        outputProcessors.get(this.curPos++).processEvent(xmlSecEvent, this);
         if (reparent && parentXmlSecStartElement != null) {
             parentXmlSecStartElement = parentXmlSecStartElement.getParentXMLSecStartElement();
         }
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java
index 9d7e2d4..ad822a6 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java
@@ -80,7 +80,7 @@
     }
 
     @Override
-    public abstract void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
+    public abstract void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
             throws XMLStreamException, XMLSecurityException;
 
     @Override
@@ -215,7 +215,7 @@
         }
 
         @Override
-        public void processNextEvent(final XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
+        public void processEvent(final XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
 
             switch (xmlSecEvent.getEventType()) {
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java
index b420fbf..0607f45 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java
@@ -357,7 +357,7 @@
         }
 
         @Override
-        public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
+        public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             transformer.transform(xmlSecEvent);
             outputProcessorChain.processEvent(xmlSecEvent);
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java
index 4825f90..fe2e657 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java
@@ -74,7 +74,7 @@
     }
 
     @Override
-    public abstract void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
+    public abstract void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
             throws XMLStreamException, XMLSecurityException;
 
     @Override
@@ -282,7 +282,7 @@
         }
 
         @Override
-        public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
+        public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
 
             transformer.transform(xmlSecEvent);
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/output/FinalOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/output/FinalOutputProcessor.java
index a6e0f2a..98a610e 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/output/FinalOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/output/FinalOutputProcessor.java
@@ -56,7 +56,7 @@
     }
 
     @Override
-    public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
+    public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
         xmlEventWriter.add(xmlSecEvent);
     }
 
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLEncryptOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLEncryptOutputProcessor.java
index 3a8093a..1264d24 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLEncryptOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLEncryptOutputProcessor.java
@@ -68,7 +68,7 @@
     }
 
     @Override
-    public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
+    public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
         if (xmlSecEvent.getEventType() == XMLStreamConstants.START_ELEMENT) {
             XMLSecStartElement xmlSecStartElement = xmlSecEvent.asStartElement();
 
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLSignatureOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLSignatureOutputProcessor.java
index d4a79eb..e98d3b7 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLSignatureOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/output/XMLSignatureOutputProcessor.java
@@ -58,7 +58,7 @@
     }
 
     @Override
-    public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
+    public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
         if (xmlSecEvent.getEventType() == XMLStreamConstants.START_ELEMENT) {
             XMLSecStartElement xmlSecStartElement = xmlSecEvent.asStartElement();
 
diff --git a/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java b/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java
index 50df2d4..d6d49c8 100644
--- a/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java
+++ b/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java
@@ -96,7 +96,7 @@
         }
 
         @Override
-        public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
+        public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
         }
 
         @Override
diff --git a/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java b/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java
index ed74d39..b2f3957 100644
--- a/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java
+++ b/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java
@@ -251,7 +251,7 @@
         }
 
         @Override
-        public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
+        public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
             outputProcessorChain.reset();
             xmlEventWriter.add(xmlSecEvent);
         }