Attaching a patch for this issue. Ready for review.
This patch introduce the classe ijScalarResult representing a single value returned from an ij statement. ijScalarResult is defined as a subclass of ijVectorResult. I use it to store the integer value returned by getCurrentRowNumber().
However, according to the comment on ijVectorResult, that class is for vectors of /strings/. But, the only usage for such vectors ends up in org.apache.derby.impl.tools.ij.util.DisplayVector(LocalizedOutput, Vector) where a println is issued for each item. So, I don't think it is a problem to feed such a vector with other kind of objects. Moreover, ijVectorResult is package-private so there is little chance this break anything outside of ij.
I wasn't able to find where ij's cursor statements are tested (are they?). So I add a simple test for GETCURRENTROWNUMBER in ij7.sql
Pass ToolScript test suite:
sh$ java junit.textui.TestRunner org.apache.derbyTesting.functionTests.tests.tools.ToolScripts
OK (8 tests)