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

Signature on UIViewParameter.getSubmittedValue should not return String, but Object. #1063

Closed
eclipse-faces-bot opened this issue Dec 20, 2011 · 10 comments

Comments

@eclipse-faces-bot
Copy link

API docs states:

==============
getSubmittedValue

public java.lang.String getSubmittedValue()
Assume that the submitted value is always a string.

Specified by:
getSubmittedValue in interface EditableValueHolder
Overrides:
getSubmittedValue in class UIInput
Since:
2.0

So UIViewparameter extends UIInput, which implements EditableValueHolder, this method is a "EditableValueHolder" interface method and the signature should stay the same.

The below code shows how this is broken in this state now.

EditableValueHolder holder = (EditableValueHolder) new UIViewParameter();

holder.setSubmittedValue(Boolean.TRUE);

if (!((Boolean)holder.getSubmittedValue()))

{ System.out.println("FAILED"); }

Environment

N/A

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by dougd

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
File: 20111220-1506-i_spec_1063.patch
Attached By: @edburns

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Wednesday, December 21st 2011, 12:52:30 pm

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Committed to trunk:

Sending jsf-api/src/main/java/javax/faces/component/UIViewAction.java
Sending jsf-api/src/main/java/javax/faces/component/UIViewParameter.java
Sending jsf-ri/src/main/java/com/sun/faces/context/FacesContextImpl.java
Transmitting file data ...
Committed revision 9540.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
File: changebundle.txt
Attached By: dueni

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
dueni said:
Since the return type on the getSubmittedValue() method signature was changed to Object, the cast to String in the return statement does not really make sense any more.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Sending jsf-api/src/main/java/javax/faces/component/UIViewParameter.java
Sending jsf-ri/src/main/java/com/sun/faces/application/view/StateManagementStrategyImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/config/processor/FaceletTaglibConfigProcessor.java
Transmitting file data ...
Committed revision 9814.

http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1063 http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-787 http://java.net/jira/browse/JAVASERVERFACES-2369

SECTION: Modified Files

M jsf-ri/src/main/java/com/sun/faces/application/view/StateManagementStrategyImpl.java

  • in restoreView(), note that the state map will never be null due to
    the assignment statement at the top of the method. Therefore, we
    shouldn't test for null to determine the presence or absence of a
    pre-existing state map.

M jsf-ri/src/main/java/com/sun/faces/config/processor/FaceletTaglibConfigProcessor.java

  • in createMethod(), replace one or more whitespace with a single whitespace.

M jsf-api/src/main/java/javax/faces/component/UIViewParameter.java

  • in getSubmittedValue(), remove unnecessary cast to String.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Closing resolved issue out

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1063

@eclipse-faces-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant