Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing classes not in report if using IErrorLogger.reportMissingClass(ClassDescriptor) #219

Closed
sewe opened this issue Jun 26, 2017 · 0 comments · Fixed by #2234
Closed
Labels

Comments

@sewe
Copy link

sewe commented Jun 26, 2017

I just observed the following bug: If I use two different ways to reporting missing classes org.example.Foo and org.example.Bar)

bugReporter.reportMissingClass(new ClassNotFoundException("Class org.example.Foo cannot be resolved."));
bugReporter.reportMissingClass(ClassDescriptor.createClassDescriptorFromDottedClassName("org.example.Bar"));

in one of my detectors, then org.example.Foo is counted as missing and noted in the XML report (-xml)

<Errors errors="0" missingClasses="1">
  <MissingClass>org.example.Bar</MissingClass>
</Errors>

whereas org.example.Bar is not.

On the text UI, however, both classes are noted as missing:

The following classes needed for analysis were missing:
  org.example.Foo
  org.example.Bar

The problem seems to be that several classes (at least ErrorCountingBugReporter, BugCollectionBugReporter) override only IErrorLogger.reportMissingClass(ClassNotFoundException) but not reportMissingClass(ClassDescriptor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants