File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/com/magento/idea/magento2plugin/project/diagnostic/github Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public static String buildNewBugReportBody(
4242 final @ NotNull String stackTrace ,
4343 final int maxAllowedBodyLength
4444 ) {
45- final int maxAllowedStackTraceLength = getMaxAllowedStackTraceLength (
45+ int maxAllowedStackTraceLength = getMaxAllowedStackTraceLength (
4646 project ,
4747 bugDescription ,
4848 maxAllowedBodyLength
@@ -56,6 +56,9 @@ public static String buildNewBugReportBody(
5656 String encodedCutStackTrace = "" ;
5757
5858 while (!isFound ) {
59+ if (stackTrace .length () < maxAllowedStackTraceLength ) {
60+ maxAllowedStackTraceLength = stackTrace .length ();
61+ }
5962 final String cutStackTrace = stackTrace .substring (0 , maxAllowedStackTraceLength - step );
6063 encodedCutStackTrace = encode (cutStackTrace );
6164
@@ -64,11 +67,6 @@ public static String buildNewBugReportBody(
6467 } else {
6568 step += 10 ;
6669 }
67- final int index = maxAllowedStackTraceLength - step ;
68-
69- if (index > stackTrace .length () || index - step < 0 ) {
70- isFound = true ;
71- }
7270 }
7371
7472 return buildTemplate (project , bugDescription , decode (encodedCutStackTrace ));
You can’t perform that action at this time.
0 commit comments