Skip to content

Commit

Permalink
Replace System.lineSeparator instead of \n
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Aug 23, 2016
1 parent 170b62a commit e1d8879
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class WollokRepl {
println(wo?.call("printString").toString.returnStyle)
}

// Unused
def dispatch doPrintReturnValue(String obj) {
println(('"' + obj + '"').returnStyle)
}
Expand Down Expand Up @@ -186,13 +187,14 @@ class WollokRepl {

def String filterREPLLines(String originalStackTrace) {
val result = originalStackTrace
.split("\n")
.split(System.lineSeparator)
.filter [ stack | !stack.toLowerCase.contains("synthetic") && !stack.toLowerCase.contains("repl") ]
.fold(new StringBuffer, [ acum, stackTrace | acum.append(stackTrace)
acum.append("\n")
acum.append(System.lineSeparator)
acum
])
result.deleteCharAt(result.length - 1)
val endCharacters = System.lineSeparator.length
result.deleteCharAt(result.length - endCharacters)
result.toString
}

Expand Down
Binary file not shown.

0 comments on commit e1d8879

Please sign in to comment.