[ 
https://issues.apache.org/jira/browse/LANG-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17086177#comment-17086177
 ] 

Bruno P. Kinoshita commented on LANG-1339:
------------------------------------------

[~oheger]
 

>[~kinow], I am fine with these changes, using a Consumer for state 
>notifications is a good idea.

>If you want to support multiple state listeners, an option could be to have a 
>thread-safe list with Consumer<State> objects, e.g. a CopyOnWriteArrayList, 
>and have corresponding addListener() and removeListener() methods. But I am 
>not sure whether this is worth the effort.

Thanks, it's similar to your suggestion to replace the property change 
listeners. That was my first option to replace the property change listeners 
after [~erans] pointed it would be a bad idea to use the Observable code as 
that was being deprecated in a future JDK release.

I left it open exactly because I wasn't sure if it would be worth the effort as 
you said. If I have more time to work on this, I will try to implement your 
suggestion and add that to the Javadoc of the BaseCircuitBreaker (as I think 
the interface doesn't have any relationship to a Consumer) as an example. So 
users could implement that if necessary. What do you think?

> Some classes depend on the java.desktop profile
> -----------------------------------------------
>
>                 Key: LANG-1339
>                 URL: https://issues.apache.org/jira/browse/LANG-1339
>             Project: Commons Lang
>          Issue Type: Task
>            Reporter: Benedikt Ritter
>            Priority: Major
>              Labels: Java9
>             Fix For: 4.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Commons Lang currently depends on java.desktop. This seems like an 
> unnecessary heavy dependency for a library like Commons Lang. We need to find 
> a way to fix this, without breaking bc. For more information see 
> https://lists.apache.org/thread.html/8db8ec4aa1bdeae3d471ca4f46a21dc7da1a4c6933e1810238b72283@%3Cdev.commons.apache.org%3E



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to