jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1208845 - in /jmeter/trunk/src: core/org/apache/jmeter/gui/action/ActionRouter.java reports/org/apache/jmeter/gui/ReportGuiPackage.java reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java
Date Thu, 01 Dec 2011 09:20:07 GMT
On 1 December 2011 09:02, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
> See my comment below.
> Regards
> Philippe
>
> On Thu, Dec 1, 2011 at 1:07 AM, sebb <sebbaz@gmail.com> wrote:
>
>> On 30 November 2011 22:24,  <pmouawad@apache.org> wrote:
>> > Author: pmouawad
>> > Date: Wed Nov 30 22:24:29 2011
>> > New Revision: 1208845
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1208845&view=rev
>> > Log:
>> > Fixed Double Checked Locking Issue
>>
>> Not sure that the multi-threading fixes were needed, but if they are,
>> it might be better to use the Initialisation on Demand idiom.
>>
>> It would be OK if init method did not throw, but as populateCommandMap()
> can throw this would introduce a NoClassDefFoundError
> so I think it's better like this:
>
>   - http://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom (When
>   not to use it)

I'm not sure that is a problem here, because JMeter cannot really
continue if the populate method fails.
So it would just change the exception, which could anyway be caught
and converted.

But probably not worth changing now.

>
>
>> Modified:
>> >    jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java
>> >    jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java
>> >
>>  jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java
>> >
>> > Modified:
>> jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java
>> > URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java?rev=1208845&r1=1208844&r2=1208845&view=diff
>> >
>> ==============================================================================
>> > --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java
>> (original)
>> > +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java
>> Wed Nov 30 22:24:29 2011
>> > @@ -43,7 +43,7 @@ public final class ActionRouter implemen
>> >
>> >        private static final Object LOCK = new Object();
>> >
>> > -    private static ActionRouter router;
>> > +    private static volatile ActionRouter router;
>> >
>> >     private Map<String, Set<Command>> commands = new HashMap<String,
>> Set<Command>>();
>> >
>> >
>> > Modified:
>> jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java
>> > URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java?rev=1208845&r1=1208844&r2=1208845&view=diff
>> >
>> ==============================================================================
>> > --- jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java
>> (original)
>> > +++ jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java
>> Wed Nov 30 22:24:29 2011
>> > @@ -57,7 +57,7 @@ public final class ReportGuiPackage impl
>> >        private static final Object LOCK = new Object();
>> >
>> >     /** Singleton instance. */
>> > -    private static ReportGuiPackage guiPack;
>> > +    private static volatile ReportGuiPackage guiPack;
>> >
>> >     /**
>> >      * Flag indicating whether or not parts of the tree have changed
>> since they
>> >
>> > Modified:
>> jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java
>> > URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java?rev=1208845&r1=1208844&r2=1208845&view=diff
>> >
>> ==============================================================================
>> > ---
>> jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java
>> (original)
>> > +++
>> jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportActionRouter.java
>> Wed Nov 30 22:24:29 2011
>> > @@ -42,7 +42,7 @@ import org.apache.log.Logger;
>> >  public final class ReportActionRouter implements ActionListener {
>> >     private Map<String, Set<Command>> commands = new HashMap<String,
>> Set<Command>>();
>> >
>> > -    private static ReportActionRouter router;
>> > +    private static volatile ReportActionRouter router;
>> >
>> >     private static final Logger log = LoggingManager.getLoggerForClass();
>> >
>> >
>> >
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.

Mime
View raw message