[jbosstools-issues] [JBoss JIRA] (JBIDE-13023) Erroneous logic in ELValidator at picking the best resolution

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Thu Nov 8 13:15:19 EST 2012


    [ https://issues.jboss.org/browse/JBIDE-13023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732906#comment-12732906 ] 

Viacheslav Kabanovich commented on JBIDE-13023:
-----------------------------------------------

Because of this issue tests 
ELValidatorTest.testUnknownELVariable()
ELValidatorTest.testMaxNumberOfMarkersPerFileLesThanDefault()
ELValidatorTest.testMaxNumberOfMarkersPerFileMoreThanDefault()
fail together with probability 25%. There are 4 resolvers:
{code}
[] org.jboss.tools.jsf.model.JSFFuncsELCompletionEngine at 1c2ffca
[user(false);] org.jboss.tools.jsf.model.JSFELCompletionEngine at e96af5
[user(false);] org.jboss.tools.jsf.jsf2.bean.el.JSF2ElResolver at 19e7a4b
[user(false);] org.jboss.tools.jsf.model.JSFMessageELCompletionEngine at 1d7fadd
{code}
Resolver JSFFuncsELCompletionEngine does not detect segments but its resolution is accepted because other resolvers do not resolve the detected segment and are not preferred by the current logic.
                
> Erroneous logic in ELValidator at picking the best resolution
> -------------------------------------------------------------
>
>                 Key: JBIDE-13023
>                 URL: https://issues.jboss.org/browse/JBIDE-13023
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: common/jst/core
>    Affects Versions: 4.0.0.Beta2
>            Reporter: Viacheslav Kabanovich
>            Assignee: Viacheslav Kabanovich
>             Fix For: 4.0.0.CR1
>
>
> Method ELValidator.validateElOperand() iterates over available resolvers and selects the best resolution. 
> If a resolution has property 'resolved' = true, it is accepted as the best, that is ok.
> If all resolutions have property 'resolved' = false, then ELValidator selects resolution that has more resolved segments than the others. If two or more resolutions have equal maximal number of resolved segments, then the first of them is selected.
> This logic is insufficient. 
> Suppose there are two resolutions:
> 1) no segments detected;
> 2) one unresolved segment detected;
> Both will return the number of resolved segments 0. The first resolution will be accepted as the best; while the second is more informative.
> I think that the logic should take into account the number of detected segments when the number of resolved segments is the same.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list