SANTUARIO-539 - Renamed processNext(Header)Event -> process(Header)Event. Thanks to Peter De Maeyer for the patch. This closes #28.


git-svn-id: https://svn.apache.org/repos/asf/santuario/xml-security-java/trunk@1876861 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java b/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java
index 5ba18bb..0283025 100644
--- a/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java
@@ -19,7 +19,6 @@
 package org.apache.xml.security.stax.ext;
 
 import org.apache.xml.security.exceptions.XMLSecurityException;
-import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
 import org.apache.xml.security.stax.ext.stax.XMLSecStartElement;
 
 import javax.xml.stream.XMLStreamException;
@@ -82,12 +81,6 @@
     }
 
     @Override
-    public abstract XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
-
-    @Override
-    public abstract XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
-
-    @Override
     public void doFinal(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
         inputProcessorChain.doFinal();
     }
diff --git a/src/main/java/org/apache/xml/security/stax/ext/InputProcessor.java b/src/main/java/org/apache/xml/security/stax/ext/InputProcessor.java
index 3dbd603..7539e7f 100644
--- a/src/main/java/org/apache/xml/security/stax/ext/InputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/ext/InputProcessor.java
@@ -73,7 +73,7 @@
      * @throws XMLStreamException   thrown when a streaming error occurs
      * @throws XMLSecurityException thrown when a Security failure occurs
      */
-    XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
+    XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
 
     /**
      * Will be called from the framework when the next XMLEvent is requested
@@ -83,7 +83,7 @@
      * @throws XMLStreamException   thrown when a streaming error occurs
      * @throws XMLSecurityException thrown when a Security failure occurs
      */
-    XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
+    XMLSecEvent processEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
 
     /**
      * Will be called when the whole document is processed.
diff --git a/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java b/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java
index 9f5b8a7..7c63465 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java
@@ -185,12 +185,12 @@
 
     @Override
     public XMLSecEvent processHeaderEvent() throws XMLStreamException, XMLSecurityException {
-        return inputProcessors.get(this.curPos++).processNextHeaderEvent(this);
+        return inputProcessors.get(this.curPos++).processHeaderEvent(this);
     }
 
     @Override
     public XMLSecEvent processEvent() throws XMLStreamException, XMLSecurityException {
-        return inputProcessors.get(this.curPos++).processNextEvent(this);
+        return inputProcessors.get(this.curPos++).processEvent(this);
     }
 
     @Override
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
index d74608e..794f867 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
@@ -164,13 +164,13 @@
     */
 
     @Override
-    public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
         return processEvent(inputProcessorChain, true);
     }
 
     @Override
-    public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
         return processEvent(inputProcessorChain, false);
     }
@@ -356,9 +356,9 @@
                 decryptedEventReaderInputProcessor.setXmlStreamReader(xmlStreamReader);
 
                 if (isSecurityHeaderEvent) {
-                    return decryptedEventReaderInputProcessor.processNextHeaderEvent(inputProcessorChain);
+                    return decryptedEventReaderInputProcessor.processHeaderEvent(inputProcessorChain);
                 } else {
-                    return decryptedEventReaderInputProcessor.processNextEvent(inputProcessorChain);
+                    return decryptedEventReaderInputProcessor.processEvent(inputProcessorChain);
                 }
             }
         }
@@ -661,20 +661,20 @@
         }
 
         @Override
-        public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             return processEvent(inputProcessorChain, true);
         }
 
         @Override
-        public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             return processEvent(inputProcessorChain, false);
         }
 
         private XMLSecEvent processEvent(InputProcessorChain inputProcessorChain, boolean headerEvent)
                 throws XMLStreamException, XMLSecurityException {
-            //did a execption occur during decryption in the decryption thread?
+            //did an exception occur during decryption in the decryption thread?
             testAndThrowUncaughtException();
 
             XMLSecEvent xmlSecEvent = XMLSecEventFactory.allocate(xmlStreamReader, parentXmlSecStartElement);
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
index d1c6eda..e9a7a0e 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
@@ -152,13 +152,13 @@
     }
 
     @Override
-    public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
         return inputProcessorChain.processHeaderEvent();
     }
 
     @Override
-    public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
 
         XMLSecEvent xmlSecEvent = inputProcessorChain.processEvent();
@@ -438,13 +438,13 @@
         }
 
         @Override
-        public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             return inputProcessorChain.processHeaderEvent();
         }
 
         @Override
-        public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             XMLSecEvent xmlSecEvent = inputProcessorChain.processEvent();
             processEvent(xmlSecEvent, inputProcessorChain);
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/input/LogInputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/input/LogInputProcessor.java
index 7001297..07f76c8 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/input/LogInputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/input/LogInputProcessor.java
@@ -43,13 +43,13 @@
     }
 
     @Override
-    public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
         return inputProcessorChain.processHeaderEvent();
     }
 
     @Override
-    public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
         XMLSecEvent xmlSecEvent = inputProcessorChain.processEvent();
         StringWriter stringWriter = new StringWriter();
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEventReaderInputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEventReaderInputProcessor.java
index c8035ea..95bceec 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEventReaderInputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEventReaderInputProcessor.java
@@ -55,18 +55,18 @@
     }
 
     @Override
-    public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
-        return processNextEventInternal();
+        return processEventInternal();
     }
 
     @Override
-    public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
-        return processNextEventInternal();
+        return processEventInternal();
     }
 
-    private XMLSecEvent processNextEventInternal() throws XMLStreamException {
+    private XMLSecEvent processEventInternal() throws XMLStreamException {
         XMLSecEvent xmlSecEvent = XMLSecEventFactory.allocate(xmlStreamReader, parentXmlSecStartElement);
         if (XMLStreamConstants.START_ELEMENT == xmlSecEvent.getEventType()) {
             currentXMLStructureDepth++;
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSecurityInputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSecurityInputProcessor.java
index bc91224..5435399 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSecurityInputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSecurityInputProcessor.java
@@ -58,13 +58,13 @@
     }
 
     @Override
-    public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
         return null;
     }
 
     @Override
-    public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+    public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
             throws XMLStreamException, XMLSecurityException {
 
         //add the buffer processor (for signature) when this processor is called for the first time
@@ -102,13 +102,13 @@
                 // temporary processor to return the EncryptedData element for the DecryptionProcessor
                 AbstractInputProcessor abstractInputProcessor = new AbstractInputProcessor(getSecurityProperties()) {
                     @Override
-                    public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+                    public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
                         throws XMLStreamException, XMLSecurityException {
-                        return processNextEvent(inputProcessorChain);
+                        return processEvent(inputProcessorChain);
                     }
 
                     @Override
-                    public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+                    public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
                         throws XMLStreamException, XMLSecurityException {
                         inputProcessorChain.removeProcessor(this);
                         return xmlSecStartElement;
@@ -194,13 +194,13 @@
         }
 
         @Override
-        public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             return null;
         }
 
         @Override
-        public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             XMLSecEvent xmlSecEvent = inputProcessorChain.processEvent();
             xmlSecEventList.push(xmlSecEvent);
@@ -221,13 +221,13 @@
         }
 
         @Override
-        public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
             return null;
         }
 
         @Override
-        public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
+        public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain)
                 throws XMLStreamException, XMLSecurityException {
 
             if (!xmlSecEventList.isEmpty()) {
diff --git a/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java b/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java
index b03c1ac..7973494 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java
@@ -116,7 +116,7 @@
                                         );
                                     XMLSecEvent xmlSecEvent;
                                     do {
-                                        xmlSecEvent = xmlEventReaderInputProcessor.processNextEvent(null);
+                                        xmlSecEvent = xmlEventReaderInputProcessor.processEvent(null);
                                         getTransformer().transform(xmlSecEvent);
                                     } while (xmlSecEvent.getEventType() != XMLStreamConstants.END_DOCUMENT);
                                 } catch (XMLSecurityException | IOException e) {
diff --git a/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformIdentity.java b/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformIdentity.java
index f88f2bb..3d262da 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformIdentity.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformIdentity.java
@@ -203,7 +203,7 @@
                             try {
                                 XMLSecEvent xmlSecEvent;
                                 do {
-                                    xmlSecEvent = xmlEventReaderInputProcessor.processNextEvent(null);
+                                    xmlSecEvent = xmlEventReaderInputProcessor.processEvent(null);
                                     getTransformer().transform(xmlSecEvent);
                                 } while (xmlSecEvent.getEventType() != XMLStreamConstants.END_DOCUMENT);
                             } catch (XMLSecurityException e) {
diff --git a/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java b/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java
index 2bbc6ef..ade9046 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java
@@ -394,7 +394,7 @@
         try {
             XMLSecEvent xmlSecEvent;
             do {
-                xmlSecEvent = xmlEventReaderInputProcessor.processNextEvent(null);
+                xmlSecEvent = xmlEventReaderInputProcessor.processEvent(null);
                 this.transform(xmlSecEvent);
             } while (xmlSecEvent.getEventType() != XMLStreamConstants.END_DOCUMENT);
         } catch (XMLSecurityException e) {
diff --git a/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java b/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java
index 2301aa7..3dc4e65 100644
--- a/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java
+++ b/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java
@@ -82,12 +82,12 @@
         }
 
         @Override
-        public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
+        public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
             return null;
         }
 
         @Override
-        public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
+        public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
             return null;
         }
 
diff --git a/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java b/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java
index 5e8cce3..87f1e2d 100644
--- a/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java
+++ b/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java
@@ -406,12 +406,12 @@
         }
 
         @Override
-        public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
+        public XMLSecEvent processHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
             return null;
         }
 
         @Override
-        public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
+        public XMLSecEvent processEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
             inputProcessorChain.reset();
             XMLSecEvent xmlSecEvent = XMLSecEventFactory.allocate(xmlStreamReader, null);
             if (xmlStreamReader.hasNext()) {