You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by gi...@apache.org on 2012/10/18 14:17:43 UTC

svn commit: r1399606 [2/2] - in /santuario/xml-security-java/trunk: ./ src/main/java/org/apache/xml/security/stax/config/ src/main/java/org/apache/xml/security/stax/ext/ src/main/java/org/apache/xml/security/stax/ext/stax/ src/main/java/org/apache/xml/...

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/MultiInputStream.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/MultiInputStream.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/MultiInputStream.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/MultiInputStream.java Thu Oct 18 12:17:41 2012
@@ -75,7 +75,7 @@ public class MultiInputStream extends In
         for (int i = 0; i < inputStreamCount; i++) {
             try {
                 inputStreams[i].close();
-            } catch (IOException e) {
+            } catch (IOException e) { //NOPMD
                 //ignore and try to close the others
             }
         }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/SignerOutputStream.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/SignerOutputStream.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/SignerOutputStream.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/SignerOutputStream.java Thu Oct 18 12:17:41 2012
@@ -44,10 +44,12 @@ public class SignerOutputStream extends 
         }
     }
 
+    @Override
     public void write(byte[] arg0) {
         write(arg0, 0, arg0.length);
     }
 
+    @Override
     public void write(int arg0) {
         try {
             signatureAlgorithm.engineUpdate((byte) arg0);
@@ -59,6 +61,7 @@ public class SignerOutputStream extends 
         }
     }
 
+    @Override
     public void write(byte[] arg0, int arg1, int arg2) {
         try {
             signatureAlgorithm.engineUpdate(arg0, arg1, arg2);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/securityEvent/SecurityEventListener.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/securityEvent/SecurityEventListener.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/securityEvent/SecurityEventListener.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/securityEvent/SecurityEventListener.java Thu Oct 18 12:17:41 2012
@@ -33,5 +33,5 @@ public interface SecurityEventListener {
      * @param securityEvent The security event for the SecurityEventListener
      * @throws XMLSecurityException when the event will not be accepted (e.g. policy-violation)
      */
-    public void registerSecurityEvent(SecurityEvent securityEvent) throws XMLSecurityException;
+    void registerSecurityEvent(SecurityEvent securityEvent) throws XMLSecurityException;
 }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java Thu Oct 18 12:17:41 2012
@@ -84,7 +84,7 @@ public class RFC2253Parser {
                 l += countQuotes(DN, j, k);
 
                 if ((k > 0) && (DN.charAt(k - 1) != '\\') && (l % 2) == 0) {
-                    sb.append(parseRDN(DN.substring(i, k).trim(), toXml) + ",");
+                    sb.append(parseRDN(DN.substring(i, k).trim(), toXml)).append(",");
 
                     i = k + 1;
                     l = 0;
@@ -117,7 +117,7 @@ public class RFC2253Parser {
             l += countQuotes(str, j, k);
 
             if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) {
-                sb.append(parseATAV(trim(str.substring(i, k)), toXml) + "+");
+                sb.append(parseATAV(trim(str.substring(i, k)), toXml)).append("+");
 
                 i = k + 1;
                 l = 0;
@@ -365,7 +365,7 @@ public class RFC2253Parser {
         int k;
 
         for (int j = 0; (k = string.indexOf("\\20", j)) >= 0; j = k + 3) {
-            sb.append(trim(string.substring(i, k)) + "\\ ");
+            sb.append(trim(string.substring(i, k))).append("\\ ");
 
             i = k + 3;
         }
@@ -414,7 +414,7 @@ public class RFC2253Parser {
             l += countQuotes(str, j, k);
 
             if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) {
-                sb.append(trim(str.substring(i, k)) + replace);
+                sb.append(trim(str.substring(i, k))).append(replace);
 
                 i = k + 1;
                 l = 0;

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java Thu Oct 18 12:17:41 2012
@@ -52,22 +52,27 @@ public class InputProcessorChainTest ext
         private Set<Object> beforeProcessors = new HashSet<Object>();
         private Set<Object> afterProcessors = new HashSet<Object>();
 
+        @Override
         public void addBeforeProcessor(Object processor) {
             this.beforeProcessors.add(processor);
         }
 
+        @Override
         public Set<Object> getBeforeProcessors() {
             return beforeProcessors;
         }
 
+        @Override
         public void addAfterProcessor(Object processor) {
             this.afterProcessors.add(processor);
         }
 
+        @Override
         public Set<Object> getAfterProcessors() {
             return afterProcessors;
         }
 
+        @Override
         public XMLSecurityConstants.Phase getPhase() {
             return phase;
         }
@@ -76,14 +81,17 @@ public class InputProcessorChainTest ext
             this.phase = phase;
         }
 
+        @Override
         public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
             return null;
         }
 
+        @Override
         public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
             return null;
         }
 
+        @Override
         public void doFinal(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
         }
     }

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java Thu Oct 18 12:17:41 2012
@@ -50,31 +50,39 @@ public class OutputProcessorChainTest ex
         private Set<Object> beforeProcessors = new HashSet<Object>();
         private Set<Object> afterProcessors = new HashSet<Object>();
 
+        @Override
         public void setXMLSecurityProperties(XMLSecurityProperties xmlSecurityProperties) {
         }
 
+        @Override
         public void setAction(XMLSecurityConstants.Action action) {
         }
 
+        @Override
         public void init(OutputProcessorChain outputProcessorChain) throws XMLSecurityException {
         }
 
+        @Override
         public void addBeforeProcessor(Object processor) {
             this.beforeProcessors.add(processor);
         }
 
+        @Override
         public Set<Object> getBeforeProcessors() {
             return beforeProcessors;
         }
 
+        @Override
         public void addAfterProcessor(Object processor) {
             this.afterProcessors.add(processor);
         }
 
+        @Override
         public Set<Object> getAfterProcessors() {
             return afterProcessors;
         }
 
+        @Override
         public XMLSecurityConstants.Phase getPhase() {
             return phase;
         }
@@ -83,9 +91,11 @@ public class OutputProcessorChainTest ex
             this.phase = phase;
         }
 
+        @Override
         public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
         }
 
+        @Override
         public void doFinal(OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
         }
     }

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java Thu Oct 18 12:17:41 2012
@@ -274,6 +274,7 @@ public class XMLSecurityStreamReaderTest
                     "org/apache/xml/security/c14n/inExcl/plain-soap-1.1.xml"));
         }
 
+        @Override
         public void addBeforeProcessor(Object processor) {
         }
 

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer11Test.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer11Test.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer11Test.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer11Test.java Thu Oct 18 12:17:41 2012
@@ -48,6 +48,7 @@ public class Canonicalizer11Test extends
         this.xmlInputFactory = XMLInputFactory.newInstance();
         this.xmlInputFactory.setEventAllocator(new XMLSecEventAllocator());
         XMLResolver xmlResolver = new XMLResolver() {
+            @Override
             public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException {
                 return this.getClass().getClassLoader().getResourceAsStream(
                     "org/apache/xml/security/c14n/in/" + systemID);

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer20010315Test.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer20010315Test.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer20010315Test.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer20010315Test.java Thu Oct 18 12:17:41 2012
@@ -48,6 +48,7 @@ public class Canonicalizer20010315Test e
         this.xmlInputFactory = XMLInputFactory.newInstance();
         this.xmlInputFactory.setEventAllocator(new XMLSecEventAllocator());
         XMLResolver xmlResolver = new XMLResolver() {
+            @Override
             public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException {
                 return this.getClass().getClassLoader().getResourceAsStream(
                     "org/apache/xml/security/c14n/in/" + systemID);

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java Thu Oct 18 12:17:41 2012
@@ -233,6 +233,7 @@ public class PerformanceMemoryTest exten
             this.stop = stop;
         }
 
+        @Override
         public void run() {
             int sleepTime = 50;
             while (!isStop()) {

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/StAX2DOM.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/StAX2DOM.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/StAX2DOM.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/StAX2DOM.java Thu Oct 18 12:17:41 2012
@@ -112,27 +112,33 @@ public class StAX2DOM {
                     final String pubId = loc.getPublicId() == null ? doc.getDocumentURI() : loc.getPublicId();
                     final String sysId = loc.getSystemId() == null ? doc.getDocumentURI() : loc.getSystemId();
                     Location loc2 = new Location() {
+                        @Override
                         public int getCharacterOffset() {
                             return charOffset;
                         }
 
+                        @Override
                         public int getColumnNumber() {
                             return colNum;
                         }
 
+                        @Override
                         public int getLineNumber() {
                             return linNum;
                         }
 
+                        @Override
                         public String getPublicId() {
                             return pubId;
                         }
 
+                        @Override
                         public String getSystemId() {
                             return sysId;
                         }
                     };
                     node.setUserData("location", loc2, new UserDataHandler() {
+                        @Override
                         public void handle(short operation, String key, Object data, Node src, Node dst) {
                             if (operation == NODE_CLONED) {
                                 dst.setUserData(key, data, this);

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/XMLSecEventAllocator.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/XMLSecEventAllocator.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/XMLSecEventAllocator.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/XMLSecEventAllocator.java Thu Oct 18 12:17:41 2012
@@ -53,6 +53,7 @@ public class XMLSecEventAllocator implem
         }
     }
 
+    @Override
     public XMLEventAllocator newInstance() {
         try {
             return new XMLSecEventAllocator();
@@ -61,6 +62,7 @@ public class XMLSecEventAllocator implem
         }
     }
 
+    @Override
     public XMLEvent allocate(XMLStreamReader xmlStreamReader) throws XMLStreamException {
         XMLSecEvent xmlSecEvent = XMLSecEventFactory.allocate(xmlStreamReader, parentXmlSecStartElement);
         switch (xmlSecEvent.getEventType()) {
@@ -76,6 +78,7 @@ public class XMLSecEventAllocator implem
         return xmlSecEvent;
     }
 
+    @Override
     public void allocate(XMLStreamReader reader, XMLEventConsumer consumer) throws XMLStreamException {
         xmlEventAllocator.allocate(reader, consumer);
     }