Skip to content

Commit 3511375

Browse files
jimklimovjglick
andauthored
CpsFlowExecution:: simplify end-of-line regex
Apply suggestion from @jglick Co-authored-by: Jesse Glick <[email protected]>
1 parent 16adabe commit 3511375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ protected static Throwable reportSuspectedMethodTooLarge(Throwable x) {
680680
Throwable mtlEx = null;
681681
int ecCount = 0;
682682
String xStr = Functions.printThrowable(x); // includes x.getMessage() contents
683-
final Pattern LINE_SEP_PATTERN = Pattern.compile("\\R");
683+
final Pattern LINE_SEP_PATTERN = Pattern.compile("\r?\n");
684684
String[] xLines = LINE_SEP_PATTERN.split(xStr);
685685

686686
if (x.getClass().getSimpleName().equals("MethodTooLargeException")) {

0 commit comments

Comments
 (0)