Join GitHub today
Using JMockit in WildFly will give many false-positive "internal class mocked" warnings #339
If you use JMockit within WildFly, the calculation whether a
e. g. the JMockit-internal startup mocks for
having a mock like the following
which is definitely not in our codebase also gives the warning, this time the fields are
As the own code can be defined in an arbitrary amount of own JARs, it is hard to say which classes are internal and which are external.
You think so? Besides that the locations don't necessarily need to include the JAR name per-se, you then still cannot reliably do the validation you wanted. You can change it so that the false-positives are away, but you will probably also remove most of the real findings if you restrict the check on JAR, because target and mockup will not be in the same JAR.
Your test is also highly test-runner specific anyway. One example, I use Gradle to run normal JUnit tests with JMockit. I have multiple projects and multiple sourcesets. In the example I tested now I have a test in the
So the check you do is very much dependent on the used toolchain.