You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2019/03/18 20:28:54 UTC

Tomcat 7, DBCP 1.x and generics

All,

I started to work on cleaning up the DBCP generics warnings in 7.0.x 
before I remembered what "fun" it was when I did this for DBCP2. While 
some of it is straight-forward, some of it requires some refactoring. 
 From memory, the refactoring did fix a few bugs along the way.

Given that the changes aren't trivial, I wanted to get some feedback 
from the community as to the best approach here. Options include:

a) No nothing

b) Fix the trivial generics

c) Fix all the generics including any necessary refactoring

d) Something else


Thoughts?

mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat 7, DBCP 1.x and generics

Posted by Mark Thomas <ma...@apache.org>.

On 19/03/2019 02:09, Phil Steitz wrote:
> 
> 
>> On Mar 18, 2019, at 1:28 PM, Mark Thomas <ma...@apache.org> wrote:
>>
>> All,
>>
>> I started to work on cleaning up the DBCP generics warnings in 7.0.x before I remembered what "fun" it was when I did this for DBCP2. While some of it is straight-forward, some of it requires some refactoring. From memory, the refactoring did fix a few bugs along the way.
>>
>> Given that the changes aren't trivial, I wanted to get some feedback from the community as to the best approach here. Options include:
>>
>> a) No nothing
>>
>> b) Fix the trivial generics
>>
>> c) Fix all the generics including any necessary refactoring
>>
>> d) Something else
> 
> IIRC, there was a 1.6 release that was really nothing but generics fixes over 1.5.7.  You might try just pulling those sources in.

Yep. I did that for Pool and it saved a bunch of work :)

The question is what to do for DBCP.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat 7, DBCP 1.x and generics

Posted by Phil Steitz <ph...@gmail.com>.

> On Mar 18, 2019, at 1:28 PM, Mark Thomas <ma...@apache.org> wrote:
> 
> All,
> 
> I started to work on cleaning up the DBCP generics warnings in 7.0.x before I remembered what "fun" it was when I did this for DBCP2. While some of it is straight-forward, some of it requires some refactoring. From memory, the refactoring did fix a few bugs along the way.
> 
> Given that the changes aren't trivial, I wanted to get some feedback from the community as to the best approach here. Options include:
> 
> a) No nothing
> 
> b) Fix the trivial generics
> 
> c) Fix all the generics including any necessary refactoring
> 
> d) Something else

IIRC, there was a 1.6 release that was really nothing but generics fixes over 1.5.7.  You might try just pulling those sources in.

Phil
> 
> 
> Thoughts?
> 
> mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat 7, DBCP 1.x and generics

Posted by Mark Thomas <ma...@apache.org>.
On 20/03/2019 15:44, Igal Sapir wrote:
> On 3/19/2019 6:34 AM, Mark Thomas wrote:
>> On 19/03/2019 04:04, Igal Sapir wrote:
>>> On 3/18/2019 1:28 PM, Mark Thomas wrote:
>>>> All,
>>>>
>>>> I started to work on cleaning up the DBCP generics warnings in 7.0.x
>>>> before I remembered what "fun" it was when I did this for DBCP2.
>>>> While some of it is straight-forward, some of it requires some
>>>> refactoring. From memory, the refactoring did fix a few bugs along
>>>> the way.
>>>>
>>>> Given that the changes aren't trivial, I wanted to get some feedback
>>>> from the community as to the best approach here. Options include:
>>>>
>>>> a) No nothing
>>>>
>>>> b) Fix the trivial generics
>>>>
>>>> c) Fix all the generics including any necessary refactoring
>>>
>>> I actually enjoy refactoring code so I'd be happy to help with (b) or
>>> (c) if either is chosen.
>>
>> Thanks. I'll leave the thread open for a few days to see what folks
>> think.
>>
>> I have a lot of the trivial fixes sat in a local branch so it will be
>> the 'fun' ones that will need to be completed.
> 
> Sounds good.
> 
> Working on tasks like that will make me more familiar with the source
> code and prepare me for tackling bigger issues in the future, so it can
> be beneficial beyond just completing the tasks.

No-one else spoke up and I am one of those people who prefers to see
warning free code (mainly because when I get things wrong the warnings
that appear help me figure out I did something wrong) so I've gone ahead
and applied the 'easy' generics fixes I had locally.

From memory, code the went anywhere near PStmtKey (and there are two of
them just for fun) got quite tricky to add generics to. If you want an
interesting problem to tackle that might be a good place to start. I
have been using the equivalent code in the DBCP 2.0 tag as a guide.

I planning on working on this as well as time allows. I'll commit
regularly to reduce the change of duplicating effort.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat 7, DBCP 1.x and generics

Posted by Igal Sapir <is...@apache.org>.
On 3/19/2019 6:34 AM, Mark Thomas wrote:
> On 19/03/2019 04:04, Igal Sapir wrote:
>> On 3/18/2019 1:28 PM, Mark Thomas wrote:
>>> All,
>>>
>>> I started to work on cleaning up the DBCP generics warnings in 7.0.x 
>>> before I remembered what "fun" it was when I did this for DBCP2. 
>>> While some of it is straight-forward, some of it requires some 
>>> refactoring. From memory, the refactoring did fix a few bugs along 
>>> the way.
>>>
>>> Given that the changes aren't trivial, I wanted to get some feedback 
>>> from the community as to the best approach here. Options include:
>>>
>>> a) No nothing
>>>
>>> b) Fix the trivial generics
>>>
>>> c) Fix all the generics including any necessary refactoring
>>
>> I actually enjoy refactoring code so I'd be happy to help with (b) or 
>> (c) if either is chosen.
>
> Thanks. I'll leave the thread open for a few days to see what folks 
> think.
>
> I have a lot of the trivial fixes sat in a local branch so it will be 
> the 'fun' ones that will need to be completed.

Sounds good.

Working on tasks like that will make me more familiar with the source 
code and prepare me for tackling bigger issues in the future, so it can 
be beneficial beyond just completing the tasks.

Best,

Igal



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat 7, DBCP 1.x and generics

Posted by Mark Thomas <ma...@apache.org>.
On 19/03/2019 04:04, Igal Sapir wrote:
> On 3/18/2019 1:28 PM, Mark Thomas wrote:
>> All,
>>
>> I started to work on cleaning up the DBCP generics warnings in 7.0.x 
>> before I remembered what "fun" it was when I did this for DBCP2. While 
>> some of it is straight-forward, some of it requires some refactoring. 
>> From memory, the refactoring did fix a few bugs along the way.
>>
>> Given that the changes aren't trivial, I wanted to get some feedback 
>> from the community as to the best approach here. Options include:
>>
>> a) No nothing
>>
>> b) Fix the trivial generics
>>
>> c) Fix all the generics including any necessary refactoring
> 
> I actually enjoy refactoring code so I'd be happy to help with (b) or 
> (c) if either is chosen.

Thanks. I'll leave the thread open for a few days to see what folks think.

I have a lot of the trivial fixes sat in a local branch so it will be 
the 'fun' ones that will need to be completed.

Cheers,

Marjk

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Tomcat 7, DBCP 1.x and generics

Posted by Igal Sapir <is...@apache.org>.
On 3/18/2019 1:28 PM, Mark Thomas wrote:
> All,
>
> I started to work on cleaning up the DBCP generics warnings in 7.0.x 
> before I remembered what "fun" it was when I did this for DBCP2. While 
> some of it is straight-forward, some of it requires some refactoring. 
> From memory, the refactoring did fix a few bugs along the way.
>
> Given that the changes aren't trivial, I wanted to get some feedback 
> from the community as to the best approach here. Options include:
>
> a) No nothing
>
> b) Fix the trivial generics
>
> c) Fix all the generics including any necessary refactoring

I actually enjoy refactoring code so I'd be happy to help with (b) or 
(c) if either is chosen.

Best,

Igal


>
> d) Something else
>
>
> Thoughts?
>
> mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org