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

JBIDE-15083 avoid null in case of exceptions in central #137

Closed

Conversation

maxandersen
Copy link
Member

No description provided.

StringBuffer message = new StringBuffer("An error occurred");
if(e.getMessage()!=null) {
message.append(": " + StringEscapeUtils.escapeXml(e.getMessage()));
} else if (e.getClass().getCanonicalName()!=null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.getClass().getCanonicalName() can't be null

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false:
"Returns null if the underlying class does not have a canonical name (i.e., if it is a local or anonymous class or an array whose component type does not have a canonical name)."

(i.e. throw new RuntimeException("Java is stupid") { @OverRide
public String getMessage() {
// TODO Auto-generated method stub
return "Arcane error";
}};)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok fair enough :-)

@fbricon
Copy link
Member

fbricon commented Jul 4, 2013

Applied in master and 4.1.x

@fbricon fbricon closed this Jul 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants