[
https://issues.apache.org/jira/browse/MYFACES-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881320#action_12881320
]
Jakob Korherr commented on MYFACES-2730:
----------------------------------------
Hi Leo,
OK good to know. But I agree with Martin here "Deleting files in svn is totally
ok as well - you can always restore them at any point of time.". Also you
really can restore the svn-history from the branch, maybe you did not know that!
Alright - don't get me wrong: I also like having some alternatives :)
However, I really do think it is the best here to throw an
UnsupportedOperationException (or an IllegalStateExeption) instead of doing
some dummy stuff. Thus I totally agree with Martin at "I want exceptions on
methods which make no sense - much clearer to the user." and your first option
is my favorite!
Actually I don't care what the RI does here, since the behavior is explicitly
unspecified. This means if any framework or application does not work because
of this Exception, it is the framework's/application's fault, and I'd rather
have the Exception as an indicator here that something is wrong than doing some
dummy stuff which maybe will cause weird internal behavior. Also why would
someone use such a method at all at system startup??
I also took a good look at all the problems we had with this stuff when
implementing the solution (like MYFACES-2520), and I was actually very happy to
be able to delete these dummy classes. You see, my conclusion was that all
those problems only existed because we used FacesContextFactory to create the
FacesContext for startup. Creating a StartupFacesContextImpl without the
factory solves all those problems. Also note that the StartupFacesContextImpl
really does provide the needed UIViewRoot (for system event), so there is no
problem here.
I am looking forward to your patches, but - to repeat myself - I really do
favour the version with Exceptions, thus something like or really similar to my
solution.
Regards,
Jakob
> FacesContext not available on application startup
> -------------------------------------------------
>
> Key: MYFACES-2730
> URL: https://issues.apache.org/jira/browse/MYFACES-2730
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-127, JSR-252, JSR-314
> Affects Versions: 1.1.8, 1.2.9, 2.0.0
> Reporter: Nick Belaevski
> Assignee: Leonardo Uribe
> Fix For: 2.0.2-SNAPSHOT
>
> Attachments: MYFACES-2730-1.patch, MYFACES-2730-2.patch,
> MYFACES-2730-revert.patch
>
>
> If custom ResourceHandler calls FacesContext.getCurrentInstance() in
> constructor to read init parameters, null value is returned. This affects
> latest MyFaces 2.0.0-SNAPSHOT. Mojarra 2.0 provides InitFacesContext in this
> case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.