You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clover instrumentation tool processes source files at minimum supported source level, instead of the most appropriate source level, when it does not recognize specified source level
#127
Open
klawson88 opened this issue
Apr 25, 2020
· 0 comments
When the instrumentation tool receives a source argument which does not match any of those which it recognizes...
Expected behavior:
It attempts to override the argument using the following values, in order:
The value determined by JavaEnvUtils#getJavaVersion
The minimum source level which the tool supports
It logs a message stating that it has overriden the source argument, specifies the values involved in the override, and details why the override is occurring.
Actual behavior:
It overrides the argument to be the minimum source level which it supports
It does not log a message stating that it has overriden the source argument
Cause:
The source determination logic only runs when a source argument has not been specified; it does not also run when the argument is not recognized.
The getter for this value consists of an equality-based conditional expression featuring the source values the tool does recognize, which it feeds the specified (or determined, but not in this case) source value to. When the getter is invoked, execution falls through to a catch-all clause in the aforementioned expression which returns the minimum source level which the tool supports.
Effect:
Instrumentation is attempted at a source level less than that which was explicitly specified, which, depending on the contents of the source files to be processed, could result in instrumentation failure or malfunction (in my case, the default test detection logic broke, causing test file data to appear in the application file section of the coverage report).
The text was updated successfully, but these errors were encountered:
klawson88
changed the title
Clover instrumentation tool redefines the source level it processes files at to be 1.3 if argument source level is greater than the max supported
Clover instrumentation tool processes source files at minimum supported source level, instead of the most appropriate source level, when it does not recognize specified source level
Apr 25, 2020
When the instrumentation tool receives a
source
argument which does not match any of those which it recognizes...Expected behavior:
JavaEnvUtils#getJavaVersion
source
argument, specifies the values involved in the override, and details why the override is occurring.Actual behavior:
source
argumentCause:
The source determination logic only runs when a
source
argument has not been specified; it does not also run when the argument is not recognized.The getter for this value consists of an equality-based conditional expression featuring the
source
values the tool does recognize, which it feeds the specified (or determined, but not in this case)source
value to. When the getter is invoked, execution falls through to a catch-all clause in the aforementioned expression which returns the minimum source level which the tool supports.Effect:
Instrumentation is attempted at a source level less than that which was explicitly specified, which, depending on the contents of the source files to be processed, could result in instrumentation failure or malfunction (in my case, the default test detection logic broke, causing test file data to appear in the application file section of the coverage report).
The text was updated successfully, but these errors were encountered: