commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherb...@apache.org
Subject [commons-codec] branch master updated: Ignore cobertura instrumentation fields.
Date Sat, 30 Nov 2019 13:10:17 GMT
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
     new 9bd2cda  Ignore cobertura instrumentation fields.
9bd2cda is described below

commit 9bd2cda3bcf4cc55ed1396c9c3c6415328c7b32e
Author: Alex Herbert <aherbert@apache.org>
AuthorDate: Sat Nov 30 13:10:13 2019 +0000

    Ignore cobertura instrumentation fields.
    
    These fields break the test when using:
    
    mvn test cobertura:cobertura
---
 .../org/apache/commons/codec/digest/MessageDigestAlgorithmsTest.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/test/java/org/apache/commons/codec/digest/MessageDigestAlgorithmsTest.java
b/src/test/java/org/apache/commons/codec/digest/MessageDigestAlgorithmsTest.java
index bae787c..9295c8a 100644
--- a/src/test/java/org/apache/commons/codec/digest/MessageDigestAlgorithmsTest.java
+++ b/src/test/java/org/apache/commons/codec/digest/MessageDigestAlgorithmsTest.java
@@ -63,6 +63,11 @@ public class MessageDigestAlgorithmsTest {
         boolean ok = true;
         int psf = 0;
         for(final Field f : fields) {
+            // Ignore cobertura instrumentation fields
+            if (f.getName().contains("cobertura")) {
+                continue;
+            }
+
             // Only interested in public fields
             final int modifiers = f.getModifiers();
             if (Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers) &&
Modifier.isFinal(modifiers)) {


Mime
View raw message