Copied from the mailing list:
I'm cleaning up deprecation warnings on the Apache ESME project. We have some old tests that use for-comprehensions with filters and these tests are resulting in deprecation warnings like the following:
[warn] /Users/esjewett/svn_repos/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala:95: `withFilter' method does not yet exist on net.liftweb.http.testing.HttpResponse, using `filter' method instead
[warn] login <- post("/api/login", "token" -> "00000000") !@ "Login should have failed: bad token" if shouldnt(testSuccess(login))
Would a "withFilter" method need to be added to the BaseResponse class in Lift, or is there maybe something that needs to be fixed on the ESMEs side that I'm missing?
Information to recreate is below.
Offending test file: http://svn.apache.org/viewvc/esme/trunk/server/src/test/scala/org/apache/esme/api/ApiTest.scala?view=markup
SVN checkout URL: http://svn.apache.org/repos/asf/esme/trunk/server
SBT command to recreate warnings: sbt clean test (tested with sbt 0.11.2)
This seems like some pretty nice low-hanging fruit…
Add withFilter implementation to BaseResponse.
This is so it plays nice with for comprehensions.
Added it as an alias to filter. This class is a bit different than some of the collections, so this seemed to make the most sense.