commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: svn commit: r1564905 - /commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
Date Wed, 05 Feb 2014 20:25:40 GMT
On Wed, Feb 5, 2014 at 3:18 PM, Gary Gregory <garydgregory@gmail.com> wrote:

> On Wed, Feb 5, 2014 at 2:56 PM, <markt@apache.org> wrote:
>
>> Author: markt
>> Date: Wed Feb  5 19:56:10 2014
>> New Revision: 1564905
>>
>> URL: http://svn.apache.org/r1564905
>> Log:
>> Keep FindBugs happy
>>
>> Modified:
>>
>> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
>>
>> Modified:
>> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
>> URL:
>> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java?rev=1564905&r1=1564904&r2=1564905&view=diff
>>
>> ==============================================================================
>> ---
>> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
>> (original)
>> +++
>> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
>> Wed Feb  5 19:56:10 2014
>> @@ -1326,7 +1326,7 @@ public class BasicDataSource
>>      /**
>>       * The PrintWriter to which log messages should be directed.
>>       */
>> -    private PrintWriter logWriter = new PrintWriter(new
>> OutputStreamWriter(
>> +    private volatile PrintWriter logWriter = new PrintWriter(new
>> OutputStreamWriter(
>>              System.out, StandardCharsets.UTF_8));
>>
>
> I do not want to say -1 but would it not be better to make this final
> instead of volatile?
>

Nevermind! I missed the setLogWriter method.

Gary

>
> Is anyone planning to review the project to make ivars immutable if they
> can be?
>
>

> Gary
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message