JAL-1889 ignore 'synthetic' fields added for jacoco
[jalview.git] / test / jalview / viewmodel / styles / ViewStyleTest.java
index bc74d8a..7deb2b0 100644 (file)
@@ -100,24 +100,23 @@ public class ViewStyleTest
   private boolean copyConstructorIgnores(Field field)
   {
     /*
-     * just instrumentation added by test coverage while testing
+     * ignore instrumentation added by jacoco for test coverage
      */
-    String type = field.getClass().toString();
-    if (type.toString().contains("com_atlassian_clover"))
+    if (field.isSynthetic())
     {
-      // instrumentation added for test coverage - ignore
       return true;
     }
+
     return false;
   }
-
+  
   /**
-   * Change the value of one field in a ViewStyle object
-   * 
-   * @param vs
-   * @param field
-   * @throws IllegalAccessException
-   */
+  * Change the value of one field in a ViewStyle object
+  * 
+  * @param vs
+  * @param field
+  * @throws IllegalAccessException
+  */
   protected void changeValue(ViewStyle vs, Field field)
           throws IllegalAccessException
   {