You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/11/30 13:10:17 UTC

[commons-codec] branch master updated: Ignore cobertura instrumentation fields.

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 <ah...@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)) {