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
add a JUnit test to make sure that classes implementing FacesWrapper do wrap all public and protected methods of the wrapped class #917
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented I'd like to contribute that - please review patches and let me commit these changes. regards |
@glassfishrobot Commented just updated the patch to also include the build.xml changes to run the FacesWrapperTestCase. I was able to run "ant clean main test.with.container.refresh" with no error. Please review the patch or let someone test it so I can commit the changes. Since these changes also affect the TCK for JSF 2.2, how are the changes sent to the TCK developers? regards |
@glassfishrobot Commented |
@glassfishrobot Commented Ed: maybe you want to add this one: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-938 as a duplicate or "going to be fixed by this" . Thank you, |
@glassfishrobot Commented This is the first change to any class in package javax.faces.application in JSF 2.2. Therefore, make sure to modify javax/faces/application/package.html to include changed_modified_2_2 in the span there where the rest of the changes are flagged. Please commit to trunk when the extenal hudson jobs for trunk are all clean <http://hudson.glassfish.org/view/JSF%20Mojarra/>. |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented javax.faces.application.ResourceWrapper:
r=edburns SECTION: Modified files M jsf-api/build.xml |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Often it gets forgotten to change the wrapper classes whe a method is changed or added to the wrapped class. This can result in unexpected behavior.
Therfore I developed the attached JUnit test to scan all classes implementing FacesWrapper and make sure the wrappers do wrap all public and protected methods of the wrapped class.
On the current 2.1.0 development stage as of 23. dec 2010, the following missing wrapper methods where detected:
ResourceWrapper:
ExternalContextWrapper:
PartialViewContextWrapper
Since the above methods would cause API change and 2.1 closed, this has to be planned for 2.2.
See also attached patch file providing the FacesWrapperTestCase and the minimal change for the wrapper classes.
Affected Versions
[2.1]
The text was updated successfully, but these errors were encountered: