You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "KyleAure (via GitHub)" <gi...@apache.org> on 2023/01/31 17:49:17 UTC

[GitHub] [myfaces] KyleAure opened a new pull request, #509: SPEC-1558 UIComponent#subscribeToEvent() should not allow duplicate values

KyleAure opened a new pull request, #509:
URL: https://github.com/apache/myfaces/pull/509

   This issue was previously tracked by https://issues.apache.org/jira/browse/MYFACES-4385
   
   No TCK test was ever written for this change in SPEC documentation, so I wrote a test here: 
   https://github.com/OpenLiberty/open-liberty/blob/86a8d4a81f2c0424c1e975ccd6eb837225edbf52/dev/io.openliberty.org.apache.myfaces.4.0_fat/test-applications/SubscribeToEventTest.war/src/io/openliberty/org/apache/faces40/fat/subscribe/SubscribeTest.java
   
   Test output: 
   ```txt
   subscribeToEvent method behaved incorrectly 
   expected:<[true]> 
   but was:   <[false - Failed testSubscribeToEvent after 2 attempt(s) with message: 
   testSubscribeToEvent subscribeList was either null, or contained more than one listener:
   [
     jakarta.faces.component._EventListenerWrapper@49fc76dc, 
     jakarta.faces.component._EventListenerWrapper@49fc76dc
   ]]> 
   ```
   
   MyFaces still allows for duplicate values when subscribing a listener to an event.
   Mojarra does not, 
   
   https://github.com/eclipse-ee4j/mojarra/blob/875994bfe8aec20f5ac87bfa53f23a5630de7ef5/impl/src/main/java/jakarta/faces/component/UIComponentBase.java#L765-L767
   
   This will ensure MyFaces behaves the same, and that we follow the updated SPEC. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [myfaces] bohmber commented on pull request #509: SPEC-1558 UIComponent#subscribeToEvent() should not allow duplicate values

Posted by "bohmber (via GitHub)" <gi...@apache.org>.
bohmber commented on PR #509:
URL: https://github.com/apache/myfaces/pull/509#issuecomment-1410874538

   Please don't reference the mojarra code


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [myfaces] volosied merged pull request #509: SPEC-1558 UIComponent#subscribeToEvent() should not allow duplicate values

Posted by "volosied (via GitHub)" <gi...@apache.org>.
volosied merged PR #509:
URL: https://github.com/apache/myfaces/pull/509


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org