-
Notifications
You must be signed in to change notification settings - Fork 127
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
2645 printing byte array #2799
2645 printing byte array #2799
Conversation
@maxonfjvipon please check |
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.
@levBagryansky good one, just one comment from my side
* | ||
* @since 0.36 | ||
*/ | ||
public final class ToStringVerbose implements Function<byte[], String> { |
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.
@levBagryansky I think we should use a noun for the name of the class. May be something like VerboseBytesAaString
that would accept bytes in constructor and would have method toString
?
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.
@maxonfjvipon made it Supplier
|
||
@Override | ||
public String get() { | ||
final Bytes bytes = new BytesOf(this.data); |
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.
@levBagryansky I can see that this variable is used only in case 8:
, I think it would be better to move it there
|
||
/** | ||
* Makes a String from byte array that can represent bool, | ||
* double, int or {@link String}. |
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.
@levBagryansky something is wrong with indentation here
@maxonfjvipon please check |
@yegor256 please check |
@rultor merge |
Closes #2645
PR-Codex overview
This PR focuses on improving the readability and logging of error messages in the code.
Detailed summary
Main.java
file to log the app dataization result in a more readable format.VerboseBytesAsString
class to convert byte arrays into a string representation.EOerror.java
file to use theVerboseBytesAsString
class for error message logging.VerboseBytesAsString
class.