我正面临一件让我困惑的事情。我有这个时髦的代码:
def static extractTaskIdsFromLine(String orderName, String line) {
print("comment line = \"" + line + "\"")
def pattern = ~/${orderName}-[0-9]+/
return line != null ? line.findAll(pattern) : new ArrayList<>()
}
在我的本地机器上,一切看起来都很好,所有测试都通过了。但是在相同的条件下,Team City 上具有相同输入的这段代码没有给出任何匹配项。编码和输入参数都是相同的。你有什么想法?