-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add toString() to PlaceRequest. #284
Conversation
Adding a toString() method to PlaceRequest simplifies debugging.
@@ -75,4 +75,17 @@ public void shouldBuildRequestWithParameterMap() { | |||
assertEquals("value2", request.getParameter("name2", "")); | |||
assertEquals("value3", request.getParameter("name3", "")); | |||
} | |||
|
|||
@Test | |||
public void testToString() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra bonus, nice :)
LGTM. |
@@ -166,6 +166,17 @@ public int hashCode() { | |||
return 11 * (nameToken.hashCode() + (params == null ? 0 : params.hashCode())); | |||
} | |||
|
|||
@Override | |||
public String toString() { | |||
StringBuilder builder = new StringBuilder(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't decide if StringBuilder is overkill. Seems like String concatenation is enough. What do you think @christiangoudreau?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is overkill, the only place where the Compiler isn't smart enough to do replace concatenation with string builders is within loops.
Format should be 4 spaces |
Is the teamcity not running the pulls? |
may be down |
Adding a toString() method to PlaceRequest simplifies debugging.
It's been a while, what's the status on this? |
Your build is failing. Make sure you can successfully run mvn clean package.
|
Please fix build issues. |
Adding a toString() method to PlaceRequest simplifies debugging.
Adding a toString() method to PlaceRequest simplifies debugging.
Adding a toString() method to PlaceRequest simplifies debugging.
Need any help to get it to pass? |
That would be great :) |
What IDE are you using? |
No, you must make sure that there's no conflict and that the build is passing. You must first merge changes from master into your branch/fork. Also, our opensource CI will be changed soon, right now its resource are limited and something the build fail for no good reason. |
Merged from #448 |
Adding a toString() method to PlaceRequest simplifies debugging.