Skip to content

Commit e367ae3

Browse files
Fixed static checks issues
1 parent 7c376b8 commit e367ae3

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/com/magento/idea/magento2plugin/project/diagnostic/github/GitHubNewIssueBodyBuilderUtil.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ private GitHubNewIssueBodyBuilderUtil() {}
2727
* @param project Project
2828
* @param bugDescription String
2929
* @param stackTrace String
30-
* @param maxAllowedBodyLength short
30+
* @param maxAllowedBodyLength int
3131
*
3232
* @return String
3333
*/
3434
public static String buildNewBugReportBody(
3535
final @NotNull Project project,
3636
final @NotNull String bugDescription,
3737
final @NotNull String stackTrace,
38-
final short maxAllowedBodyLength
38+
final int maxAllowedBodyLength
3939
) {
40-
final short maxAllowedStackTraceLength = getMaxAllowedStackTraceLength(
40+
final int maxAllowedStackTraceLength = getMaxAllowedStackTraceLength(
4141
project,
4242
bugDescription,
4343
maxAllowedBodyLength
@@ -91,16 +91,16 @@ private static String buildTemplate(
9191
* @param bugDescription String
9292
* @param maxAllowedBodyLength String
9393
*
94-
* @return short
94+
* @return int
9595
*/
96-
private static short getMaxAllowedStackTraceLength(
96+
private static int getMaxAllowedStackTraceLength(
9797
final @NotNull Project project,
9898
final @NotNull String bugDescription,
99-
final short maxAllowedBodyLength
99+
final int maxAllowedBodyLength
100100
) {
101101
final String builtTemplateWithoutStackTrace = buildTemplate(project, bugDescription, "");
102102

103-
return (short) (maxAllowedBodyLength - encode(builtTemplateWithoutStackTrace).length());
103+
return maxAllowedBodyLength - encode(builtTemplateWithoutStackTrace).length();
104104
}
105105

106106
/**

src/com/magento/idea/magento2plugin/project/diagnostic/github/GitHubNewIssueUrlBuilderUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public final class GitHubNewIssueUrlBuilderUtil {
1616
+ "magento2-phpstorm-plugin/issues/new"
1717
+ "?assignees=&labels=bug&template=bug_report.md";
1818
private static final String URI_PARAMS_PART = "&title=%title&body=%body";
19-
private static final short MAX_URI_LENGTH = 8000;
19+
private static final int MAX_URI_LENGTH = 8000;
2020

2121
private GitHubNewIssueUrlBuilderUtil() {}
2222

@@ -73,9 +73,9 @@ private static String formatNewBugIssueUrl(
7373
*
7474
* @param title String
7575
*
76-
* @return short
76+
* @return int
7777
*/
78-
private static short getAllowedBodyLength(final @NotNull String title) {
79-
return (short) (MAX_URI_LENGTH - formatNewBugIssueUrl(title, "").length());
78+
private static int getAllowedBodyLength(final @NotNull String title) {
79+
return MAX_URI_LENGTH - formatNewBugIssueUrl(title, "").length();
8080
}
8181
}

0 commit comments

Comments
 (0)