-
Notifications
You must be signed in to change notification settings - Fork 123
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
fast-track: Add a TCK test to verify that the default ExceptionMapper can be overridden. #1235
fast-track: Add a TCK test to verify that the default ExceptionMapper can be overridden. #1235
Conversation
...tck/src/main/java/ee/jakarta/tck/ws/rs/ee/resource/webappexception/mapper/JAXRSClientIT.java
Outdated
Show resolved
Hide resolved
import ee.jakarta.tck.ws.rs.common.JAXRSCommonClient; | ||
import ee.jakarta.tck.ws.rs.lib.util.TestUtil; | ||
import jakarta.ws.rs.core.Response.Status; |
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.
Change
Copyright (c) 2012, 2020, 2021
to
Copyright (c) 2012, 2024
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.
No, I was incorrect. The practices for Eclipse projects are different. https://www.eclipse.org/projects/handbook/#ip-copyright-headers
So
Copyright (c) 2012, 2020, 2021
should really be changed to
Copyright (c) 2012
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.
Strange, the document used to allow for a single year, or two years (creation, last modification), and in that manner the maven copyright plugin checks two year-values in the copyright header. I am not a lawyer, but I saw somewhere that a copyright wears off after some ten years, unless updated with a new code (and year).
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.
From the same document, FAQ section:
Do we need to specify a range of years in the copyright statement?
No. In the past, legal advice was that the year of the initial creation of the content and the year of the last change should be reflected in the copyright header. This is no longer the case. Specify the year that the content was initially created in the copyright statement.
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.
Minus the two comments, this looks good to me. Once the changes are made I'll approve it.
@WhiteCat22 Could you address the comments pls? |
I have some failures locally in the other related tests. So I don't think I can re-use this existing application for this test. |
fda8daa
to
6aee4c2
Compare
I broke out the test into a new test and application to avoid breaking existing tests. |
c0bf9e6
to
498aa83
Compare
@alwin-joseph Could you verify the new version? |
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.
The two minor notes should not hold up merging this PR.
...ee/jakarta/tck/ws/rs/ee/resource/webappexception/defaultmapper/DefaultExceptionMapperIT.java
Outdated
Show resolved
Hide resolved
...ee/jakarta/tck/ws/rs/ee/resource/webappexception/defaultmapper/DefaultExceptionMapperIT.java
Outdated
Show resolved
Hide resolved
New test passes with Glassfish8. |
…ridden. Signed-off-by: Adam Anderson <atanderson9383@gmail.com>
498aa83
to
5d825a4
Compare
Addressed James' comments. Also, I tested this against OpenLiberty and it passes. |
@alwin-joseph Thank you! |
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.
Looks good, thank you @WhiteCat22. Passes on WildFly as well.
The
nomapper
tests seem to test the defaultExceptionMapper
, however, we could use a test to verify that the defaultExceptionMapper
can be overridden.This test overrides the default
ExceptionMapper
to return status HTTP 512 instead of HTTP 500 and the test client verifies that status HTTP 512 is returned.