Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Media and other Handler objects: Improve toString method
Description
In Media.java the toString() method currently returns this.url. As the url can be empty, this can result in a return null. According to the javadoc it should return a textually representation of the object.
In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read.
Especially if you are debugging, it is annoying to see that the current media-object is "null" (as the debugger calls toString). Therefor I'd love to see something more informative here.
In Media.java the toString() method currently returns this.url. As the url can be empty, this can result in a return null.
According to the javadoc it should return a textually representation of the object.
In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read.Especially if you are debugging, it is annoying to see that the current media-object is "null" (as the debugger calls toString). Therefor I'd love to see something more informative here.