Skip to content

Commit 0d6a35a

Browse files
committed
Corrected marks.
1 parent 3a67fb3 commit 0d6a35a

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

src/main/java/org/jetbrains/research/groups/ml_methods/error_reporting/AnonymousFeedback.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class AnonymousFeedback {
2626
private final static String ISSUE_LABEL_BUG = "bug";
2727
private final static String ISSUE_LABEL_AUTO_GENERATED = "auto-generated";
2828
private final static String GIT_ISSUE_TITLE = "[auto-generated:%s] %s";
29+
private final static String HTML_URL_TO_CREATE_NEW_ISSUE = "https://github.com/ml-in-programming/ArchitectureReloaded/issues/new";
2930
private final static EnumMap<InformationType, String> usersInformationToPresentableForm
3031
= new EnumMap<>(InformationType.class);
3132

@@ -85,8 +86,10 @@ static SubmittedReportInfo sendFeedback(ErrorReportInformation errorReportInform
8586
result = new SubmittedReportInfo(htmlUrl, message, isNewIssue ? SubmissionStatus.NEW_ISSUE : SubmissionStatus.DUPLICATE);
8687
return result;
8788
} catch (Exception e) {
88-
return new SubmittedReportInfo(null,
89-
ArchitectureReloadedBundle.message("report.error.connection.failure") + "\nReason: " + e.getMessage(),
89+
return new SubmittedReportInfo(HTML_URL_TO_CREATE_NEW_ISSUE,
90+
ArchitectureReloadedBundle.message("report.error.connection.failure",
91+
HTML_URL_TO_CREATE_NEW_ISSUE,
92+
e.getMessage()),
9093
SubmissionStatus.FAILED);
9194
}
9295
}

src/main/java/org/jetbrains/research/groups/ml_methods/error_reporting/GitHubAccessTokenScrambler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/**
1515
* Provides functionality to encode and decode secret tokens to make them not directly readable. Let me be clear:
1616
* THIS IS THE OPPOSITE OF SECURITY!
17-
* @author patrick (20.06.17).
1817
*/
1918
public class GitHubAccessTokenScrambler {
2019
private static final String myInitVector = "RandomInitVector";

src/main/java/org/jetbrains/research/groups/ml_methods/error_reporting/GitHubErrorBean.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66

77
/**
88
* Extends the standard class to provide the hash of the thrown exception stack trace.
9-
* @author patrick (17.06.17).
109
*/
1110
class GitHubErrorBean extends ErrorBean {
1211

1312
private String myExceptionHash;
1413

1514
GitHubErrorBean(Throwable throwable, String lastAction) {
1615
super(throwable, lastAction);
17-
final int hashCode = Arrays.hashCode(throwable.getStackTrace());
18-
myExceptionHash = String.valueOf(hashCode);
16+
final long hashCode = Integer.toUnsignedLong(Arrays.hashCode(throwable.getStackTrace()));
17+
myExceptionHash = Long.toHexString(hashCode);
1918
}
2019

2120
String getExceptionHash() {

src/main/java/org/jetbrains/research/groups/ml_methods/error_reporting/GitHubErrorReporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void consume(SubmittedReportInfo reportInfo) {
114114
ReportMessages.ERROR_REPORT,
115115
reportInfo.getLinkText(),
116116
NotificationType.ERROR,
117-
null).setImportant(false).notify(myProject);
117+
NotificationListener.URL_OPENING_LISTENER).setImportant(false).notify(myProject);
118118
} else {
119119
ReportMessages.GROUP.createNotification(
120120
ReportMessages.ERROR_REPORT,

src/main/resources/ArchitectureReloadedBundle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ java.member.is.not.valid = Java member (field or method) is not valid anymore
3737
target.class.is.not.valid = Target class is not valid anymore
3838
report.error.to.plugin.vendor = Report error to plugin vendor
3939
report.error.progress.dialog.text = Submitting error report...
40-
report.error.connection.failure = Could not communicate with GitHub
40+
report.error.connection.failure = Could not communicate with GitHub.\n\
41+
Please <a href="{0}">create issue</a>.\n\
42+
Error reason: {1}.
4143
git.issue.text = <a href="{0}">Created issue {1}</a>. Thank you for your feedback! \n \
4244
Make sure you have the latest plugin version.
4345
git.issue.duplicate.text = <a href="{0}">A similar issues was already reported (#{1})</a>. \n \

0 commit comments

Comments
 (0)