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

[JENKINS-73774] Stop overriding #printStackTrace and #getCause in JellyException #125

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Sep 14, 2024

See JENKINS-73774 for motivation in Jenkins.

Testing done

Autotests only so far.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@daniel-beck daniel-beck changed the title [JENKINS-73774] Stop overriding #printStackTrace and #getCause in JellyException [JENKINS-73774] Stop overriding #printStackTrace and #getCause in JellyException Sep 14, 2024
Comment on lines +46 to +50
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;

import static org.hamcrest.CoreMatchers.startsWith;
import static org.hamcrest.MatcherAssert.assertThat;
Copy link
Member Author

@daniel-beck daniel-beck Sep 14, 2024

Choose a reason for hiding this comment

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

The existing annotation failed at first without a useful message, so I switched to Hamcrest as it reports a difference.

}

public JellyException(Throwable cause) {
super(cause.getLocalizedMessage());
this.cause = cause;
super(cause);
Copy link
Member Author

Choose a reason for hiding this comment

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

This changes behavior, see the adapted test. I don't feel strongly about this, so would be happy to restore the previous behavior.

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.

1 participant