Closed jessitron closed 7 years ago
(this is not high priority)
further note which may provide a clue: That path expression does not match even when the methodName is correct.
This one does: /JavaFile()/typeDeclaration/classDeclaration/normalClassDeclaration/classBody/classBodyDeclaration/classMemberDeclaration/methodDeclaration[/methodHeader/methodDeclarator/Identifier[@value='peelTest']]
So maybe there's a problem with // descendants
hmm I just noticed that I was trying JavaType() and the good path expression is JavaFile()
oops
When my path expression had no matches, instead of an empty result, I got an exception:
com.atomist.rug.RugRuntimeException: <unknown>: No child with name 'methodDeclaration' in JavaClassOrInterfaceMutableView
Maybe it's falling back to looking for methods or children on the view, and then failing when that doesn't work.
The path expression was:
/JavaType()//methodDeclaration[/methodHeader/methodDeclarator/Identifier[@value='${methodName}']]
(where a method by that name was not found)This might be specific to JavaType() where it has a special MutableView? not sure. Either way, it's unexpected.