提交 37e14044 编写于 作者: A Andrew J. Erickson

small tweaks

no need to call toString() on the string
add comments
上级 06ead841
......@@ -252,9 +252,11 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
if (offlineCause == null) {
return "";
}
// remove header string from offline cause when a comment was set
String newString = offlineCause.toString().replaceAll(
"^Disconnected by [\\w]* \\: ","");
return newString.toString().replaceAll(
// remove header string from offline cause when no comment was set
return newString.replaceAll(
"^Disconnected by [\\w]*","");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册