[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lang] preparing for 3.8

On Tue, 14 Aug 2018 11:44:44 +0000 (UTC), Bruno P. Kinoshita wrote:
Hi Gilles,

The parts that I think would take a bit more of time would be making
sure it is thread safe

The suggestion does not change anything on this issue wrt
an implementation using "java.util.Observable".

and to write the unit tests,

Supposedly, the patch referred to in JIRA already contains
unit tests.

send a pull
request, and get some reviews to make sure it doesn't have any design
flaws that would require deprecating these classes yet again.

The new API is the "Observer" interface which my suggestion
defines in reference to its usage in the patch (1 argument).



      From: Gilles <gilles@xxxxxxxxxxxxxxxxxxxxx>
 To: dev@xxxxxxxxxxxxxxxxxx
 Sent: Tuesday, 14 August 2018 11:39 PM
 Subject: Re: [lang] preparing for 3.8


On Tue, 14 Aug 2018 11:13:48 +0000 (UTC), Bruno P. Kinoshita wrote:
Hi Rob!

Thanks for RM'ing lang 3.8!

I think it would be good to fix for LANG-1339, as we get closer to
supporting Java 9 someday...

I believe the summary from the last comments in the discussion in the
mailing list is that looks like Observable/Observable won't be
from the JDK, but marked as deprecated and not maintained. We can't
just copy the JVM code into our codebase (even if internal). And
java.util.concurrent provides the building blocks for the DIY
observer/observable pattern.

Unless I'm mistaken, the Observer/Observable can be trivially
implemented within the library.
In the "observable" class, define
  * an inner interface "Observer" that declares method
      public void update(CircuitBreaker);
  * a field "observers" (of type "List<Observer>"),
  * a method "registerObserver(Observer)" that populates the list,
  * a method "notifyObservers":
      private void notifyObservers() {
        for (Observer obs : observers) {


Alas, it could take a while until we had a proper replacement for the
observable/observer. So maybe we could discuss merging the pull
request, and adding the deprecated note for existing circuit
The cons of this solution, is that the new circuit breakers would
on code being marked as deprecated in JDK 9 I think :/ (unless
we got a proper replacement in something like Java 12, 13, ...)

But I wouldn't want to block the release if it appears it'd take too
long to fix it. WDYT?



From: Rob Tompkins <chtompki@xxxxxxxxx>
To: Commons Developers List <dev@xxxxxxxxxxxxxxxxxx>
Sent: Tuesday, 14 August 2018 12:36 PM
Subject: [lang] preparing for 3.8

Hello all,

I’m planning on working on 3.8 for lang later this week. Does anyone
want to get any specific jira's in? I think that I can quickly button
up LANG-1408 (selfishly want to get that in).



To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxxx

To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxxx