Skip to content

Commit

Permalink
Fix bug with odd title of issues. This closes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
jqyp committed Jul 8, 2020
1 parent 5bfe131 commit 2109c31
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
*/
package org.jetbrains.plugins.spotbugs.core;

import com.intellij.diagnostic.AbstractMessage;
import com.intellij.diagnostic.IdeaReportingEvent;
import com.intellij.ide.BrowserUtil;
import com.intellij.openapi.diagnostic.*;
import com.intellij.openapi.ide.CopyPasteManager;
Expand Down Expand Up @@ -203,8 +205,15 @@ private static Error createError(@NotNull final IdeaLoggingEvent event) {
if (StringUtil.isEmptyOrSpaces(message) || "null".equals(message)) {
message = null;
}
final Throwable throwable = event.getThrowable();
if (message == null && throwable == null) {
final Throwable throwable;
// event is a com.intellij.diagnostic.IdeaReportingEvent.TextBasedThrowable
// This is a wrapper and is only providing the original stack trace via 'printStackTrace(...)',
// but not via 'getStackTrace()'.
//
// So, we workaround this by retrieving the original exception from the data property
if (event instanceof IdeaReportingEvent && event.getData() instanceof AbstractMessage) {
throwable = ((AbstractMessage) event.getData()).getThrowable();
} else {
return null;
}
final String fullError;
Expand Down

0 comments on commit 2109c31

Please sign in to comment.