New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"withFilter" method on the BaseResponse class #1253

Merged
merged 1 commit into from May 30, 2014

Conversation

Projects
None yet
2 participants
@farmdawgnation
Copy link
Member

farmdawgnation commented May 30, 2014

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)

@Shadowfiend

This comment has been minimized.

Copy link
Member

Shadowfiend commented May 13, 2014

This seems like some pretty nice low-hanging fruit…

Add withFilter implementation to BaseResponse.
This is so it plays nice with for comprehensions.
@farmdawgnation

This comment has been minimized.

Copy link
Member

farmdawgnation commented May 30, 2014

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.

@Shadowfiend

This comment has been minimized.

Copy link
Member

Shadowfiend commented May 30, 2014

👍

Shadowfiend added a commit that referenced this pull request May 30, 2014

Merge pull request #1253 from lift/msf_issue_1253
"withFilter" method on the BaseResponse class

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.

@Shadowfiend Shadowfiend merged commit 3f4868c into master May 30, 2014

@Shadowfiend Shadowfiend deleted the msf_issue_1253 branch May 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment