Skip to content
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

String representation Response and Take #101

Closed
dmzaytsev opened this issue Mar 31, 2015 · 36 comments
Closed

String representation Response and Take #101

dmzaytsev opened this issue Mar 31, 2015 · 36 comments

Comments

@dmzaytsev
Copy link
Contributor

I expect implementations of Response and Take interfaces will be able convert itself to a loggable string but they don't have this feature


- ~~`101-e83253e2`/#159~~ - `101-0be068b8`/#174 (by Yegor Bugayenko)
@yegor256
Copy link
Owner

@dmzaytsev Something like this you have in mind?

interface ConsoleFriendly {
  String toConsole();
}
interface Take extends ConsoleFriendly {
}

right?

@dmzaytsev
Copy link
Contributor Author

@yegor256 Yes, something like this will be suitable

@davvd
Copy link

davvd commented Apr 1, 2015

@yegor256 this task is yours, go ahead

@davvd
Copy link

davvd commented Apr 1, 2015

@dmzaytsev thank you for reporting this, I added 15 mins to your acc, transaction 54622993

@davvd
Copy link

davvd commented Apr 3, 2015

@dmzaytsev the code made here contains a puzzle 101-0be068b8, which will be resolved soon

@davvd
Copy link

davvd commented Apr 18, 2015

@dmzaytsev since there is no milestone yet I set it to "1.0"

@yegor256
Copy link
Owner

@davvd assign someone else pls

@yegor256
Copy link
Owner

@dmzaytsev we'll use toString

@davvd
Copy link

davvd commented Sep 27, 2015

@davvd assign someone else pls

@yegor256 -30 points to your rating

@davvd
Copy link

davvd commented Sep 27, 2015

@davvd assign someone else pls

@yegor256 OK, I will try to assign someone else

@davvd davvd removed the @yegor256 label Sep 27, 2015
@davvd
Copy link

davvd commented Sep 28, 2015

@bdragan please go ahead, it's your task now, keep this in mind, and don't hesitate to ask any technical questions you may have; Budget here is 30 mins (keep this principle in mind)

@davvd davvd added the @bdragan label Sep 28, 2015
@bdragan
Copy link
Contributor

bdragan commented Sep 28, 2015

@dmzaytsev, @yegor256, @davvd I would suggest using Lombok @ToString for this purpose.

Then, for a Take like:
new TkWithType(new TkClasspath(), "text/xsl")
the output would be:
TkWithType(super=TkWrap(origin=org.takes.tk.TkWithType$1@6b601188))
and for a Take like:
new TkFlash(new TkForward(new TkFork(new FkRegex("/", new TkPostMessage()))))
the output is:
TkFlash(origin=TkForward(origin=TkFork(forks=[org.takes.facets.fork.FkRegex@7a2ad171])), cookie=RsFlash)

As you see, classes that don't provide the toString method (including the Takes implemented as anonymous classes) are still printed using the default toString method. Nevertheless, I think we should not exclude these from the toString output (at least the type name is printed, and we can later introduce the proper toString implementations for them as well if needed).

Would you agree?

Also, circular references can be problematic. At the first glance, I would say that there should not be any when it comes to Takes and Responses, am I right?

@yegor256
Copy link
Owner

@bdragan looks good to me

bdragan added a commit to bdragan/takes that referenced this issue Sep 29, 2015
@bdragan
Copy link
Contributor

bdragan commented Sep 29, 2015

@davvd Pull Request #398 created and ready for review.

@davvd
Copy link

davvd commented Sep 30, 2015

@davvd Pull Request #398 created and ready for review.

@bdragan thanks, we'll review it soon

@bdragan
Copy link
Contributor

bdragan commented Oct 6, 2015

@davvd This resolution of this issue is currently blocked by #403.

@davvd
Copy link

davvd commented Oct 8, 2015

@davvd This resolution of this issue is currently blocked by #403.

@bdragan ok, let's wait for #403

@davvd
Copy link

davvd commented Oct 10, 2015

@dmzaytsev we waited for #403, it is closed already

@bdragan
Copy link
Contributor

bdragan commented Oct 11, 2015

@dmzaytsev @davvd PR #398 has been merged to master.

@dmzaytsev
Copy link
Contributor Author

@bdragan thanks!

@davvd
Copy link

davvd commented Oct 14, 2015

@ypshenychka please, let us know what do you think about this ticket, according to our QA rules

@ypshenychka
Copy link

@davvd

davvd commented on 3 Apr
the code made here contains a puzzle 101-0be068b8, which will be resolved soon

According to our QA Rules:

Messages in a ticket always start with a name of a user they are addressed to.

Please correct your message by indicating an addressee in the beginning.

@ypshenychka
Copy link

@davvd Please remove assignment from @yegor256 as far as we have label with @bdragan who actually fixed the issue.

@davvd
Copy link

davvd commented Oct 20, 2015

@davvd

davvd commented on 3 Apr
the code made here contains a puzzle 101-0be068b8, which will be resolved soon

According to our QA Rules:

Messages in a ticket always start with a name of a user they are addressed to.

Please correct your message by indicating an addressee in the beginning.

@ypshenychka @yegor256 what do you think?

@yegor256
Copy link
Owner

@davvd assign @bdragan here pls

@davvd
Copy link

davvd commented Oct 20, 2015

@davvd assign @bdragan here pls

@yegor256 done, @bdragan is assigned to this task, and is already working on it, AFAIK

@ypshenychka
Copy link

@davvd Please remove assignment from @yegor256 and also correct your message (as mentioned in above remark).

@davvd
Copy link

davvd commented Oct 22, 2015

@davvd Please remove assignment from @yegor256 and also correct your message (as mentioned in above remark).

@ypshenychka don't pay attention to the assignee, it's a technical issue on our side

@ypshenychka
Copy link

@davvd Please correct your message by indicating an addressee in the beginning.

davvd commented on 3 Apr
the code made here contains a puzzle 101-0be068b8, which will be resolved soon

@davvd
Copy link

davvd commented Oct 29, 2015

@davvd Please correct your message by indicating an addressee in the beginning.

davvd commented on 3 Apr
the code made here contains a puzzle 101-0be068b8, which will be resolved soon

@ypshenychka fixed, thanks for noticing

@ypshenychka
Copy link

@davvd Thank you.

@ypshenychka
Copy link

@davvd Quality is acceptable here.

@davvd
Copy link

davvd commented Oct 29, 2015

@davvd Thank you.

@ypshenychka no problem :)

@davvd
Copy link

davvd commented Oct 29, 2015

@davvd Quality is acceptable here.

@ypshenychka thanks for the QA review, we'll work better next time

@davvd
Copy link

davvd commented Oct 29, 2015

@bdragan paied 10 mins to @ypshenychka for QA review (payment ID is 68465482). Thank you, I have added 1 hour to your account in payment/transaction "68465485", time consumed: zero. there is a bonus for fast delivery (m=0). added +60 to your rating, now it is equal to +143

@davvd
Copy link

davvd commented Nov 8, 2015

@dmzaytsev last puzzled solved 101-0be068b8/#174

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

No branches or pull requests

5 participants