That certainly achieves the goal of closing the ResultSet. Unfortunately, as you're going to find out when you run it, it also has the side effect of returning a closed ResultSet to the caller.
If you want to follow the suggestion given by that product, then the approach you should follow is to not return a ResultSet. Instead, inside the getResults() method you should read through the ResultSet and construct a List<Data>, where Data is a class whose instances each hold one row of the ResultSet. Then return that list to the caller. (And keep that bit about closing the ResultSet in the finally block, that's a good thing.)