No.

We need to compare whether values[] and enums.getFixedList() are identical
(method name is "isEnumEquivalent").

If one is null and the other not, they are not equivalent.


On 5 March 2014 00:36, Petr Široký <notifications@github.com> wrote:

> In
> drools-wb-screens/drools-wb-guided-rule-editor/drools-wb-guided-rule-editor-client/src/main/java/org/drools/workbench/screens/guided/rule/client/editor/ActionValueEditor.java:
>
> > @@ -554,10 +551,7 @@ private boolean isRHSFieldTypeEquivalent( String boundVariable ) {
> >      }
> >
> >      private boolean isEnumEquivalent( String[] values ) {
> > -        if ( values == null && this.enums.getFixedList() != null ) {
> > -            return false;
> > -        }
> > -        if ( values != null && this.enums.getFixedList() == null ) {
> > +        if ( values == null || this.enums.getFixedList() == null ) {
>
> If either of the the 'values' or 'this.enums.getFixedList()' is null we
> need to return false. Originally if both of them were null the code would
> fail below with NPE.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/droolsjbpm/drools-wb/pull/9/files#r10282970>
> .
>