You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Francisco Collao Gárate <pc...@gmail.com> on 2015/06/08 17:06:41 UTC

Change on Generics and remove unnecesary cast

Hi:

I've been working on eliminate some warnings with jdk 1.5 and above,
removing some unnecesary cast when generics parameter are apply.

I published a branch on my fork on github if anybody want to help or test.

Here the link:

https://github.com/pcollaog/velocity-engine/tree/feature/fix-some-generics

If you have some requirement or new ideas... all are welcome

Best Regards
-- 
Francisco Collao Gárate
LinuxUser #363300
http://blog.pcollaog.cl

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


Re: Change on Generics and remove unnecesary cast

Posted by Francisco Collao Gárate <pc...@gmail.com>.
Ok... now more clear changes (a lot, but more clear)

https://github.com/pcollaog/velocity-engine/tree/feature/add-generics-remove-casts

Best Regards

On Fri, Jun 12, 2015 at 9:30 AM, Francisco Collao Gárate
<pc...@gmail.com> wrote:
> Ok, I will create another branch with code changes (not style)
>
> I'll pushing during the day.
>
> I have a question... this Class "ExtendedProperties" from
> commons-collection isn't use generics and use object for return the
> instance so... It's hard to work with this. Any plans for remove,
> change or use other library to read the configuration, I read in the
> code that you are planing to use commons-configuracion for that.
>
> En example of that is when you get a String or a String comma
> separated that is convert in a List<String>... so the class that is
> call to getter receive an object and you have to force to ask wich
> kind of instance was returned (instanceOf list, string.... or
> whatever)... It's hard for migrate code. Any plans? ideas?
>
> best regards
>
> On Fri, Jun 12, 2015 at 1:01 AM, Sergiu Dumitriu
> <se...@gmail.com> wrote:
>> Hi Francisco,
>>
>> Good idea about the codestyle files, I usually like to:
>>
>> - add configuration files for Eclipse / IDEA
>> - set up the checkstyle Maven plugin to enforce a common codestyle (and
>> a several other good code practices)
>> - set up a license checking maven plugin to enforce the presence of the
>> license header
>>
>> I'll get working on that.
>>
>> A few hints for getting patches applied faster:
>>
>> - make smaller, easy to process pull requests
>> - try to separate actual code fixes from stylistic reformatting
>>
>>
>> On 06/11/2015 10:30 PM, Francisco Collao Gárate wrote:
>>> Hi:
>>>
>>> 1... thanks so much for the review of the changes.
>>>
>>> 2... sorry about the formatter that I use (eclipse + apache maven code
>>> style). I will correct the classes when I'll work on them. It's a good
>>> idea publish the eclipse formatter (xml) in the velocity wiki, It will
>>> be more easy add the right code format and another preferences.
>>>
>>> 3... I answered the code review that sdumitriu made.
>>>
>>> 4... Reading the code, there are a lot of dead code (controlled with a
>>> boolean just for debug) it is really necesary? maybe exist another way
>>> to do this.
>>>
>>> If you have more comments.. I'll be expecting
>>>
>>> Best Regards
>>>
>>> On Thu, Jun 11, 2015 at 5:08 PM, Sergiu Dumitriu
>>> <se...@gmail.com> wrote:
>>>> Hi Francisco,
>>>>
>>>> Thank you for this work, it's appreciated. I did a quick pass over the
>>>> code, I don't know if you received those comments [1], and I see you did
>>>> even more work afterwards. Can you review those comments?
>>>>
>>>> [1] https://github.com/apache/velocity-engine/pull/2
>>>>
>>>> On 06/08/2015 11:06 AM, Francisco Collao Gárate wrote:
>>>>> Hi:
>>>>>
>>>>> I've been working on eliminate some warnings with jdk 1.5 and above,
>>>>> removing some unnecesary cast when generics parameter are apply.
>>>>>
>>>>> I published a branch on my fork on github if anybody want to help or test.
>>>>>
>>>>> Here the link:
>>>>>
>>>>> https://github.com/pcollaog/velocity-engine/tree/feature/fix-some-generics
>>>>>
>>>>> If you have some requirement or new ideas... all are welcome
>>>>>
>>>>> Best Regards
>>>>>
>>>>
>>>>
>>>> --
>>>> Sergiu Dumitriu
>>>> http://purl.org/net/sergiu
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>>>> For additional commands, e-mail: dev-help@velocity.apache.org
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: dev-help@velocity.apache.org
>>
>
>
>
> --
> Francisco Collao Gárate
> LinuxUser #363300
> http://blog.pcollaog.cl



-- 
Francisco Collao Gárate
LinuxUser #363300
http://blog.pcollaog.cl

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


Re: Change on Generics and remove unnecesary cast

Posted by Sergiu Dumitriu <se...@gmail.com>.
commons-collections has a newer version, commons-collections4, which
does use generics. That's another good dependency upgrade that should be
done.

On 06/12/2015 08:30 AM, Francisco Collao Gárate wrote:
> Ok, I will create another branch with code changes (not style)
> 
> I'll pushing during the day.
> 
> I have a question... this Class "ExtendedProperties" from
> commons-collection isn't use generics and use object for return the
> instance so... It's hard to work with this. Any plans for remove,
> change or use other library to read the configuration, I read in the
> code that you are planing to use commons-configuracion for that.
> 
> En example of that is when you get a String or a String comma
> separated that is convert in a List<String>... so the class that is
> call to getter receive an object and you have to force to ask wich
> kind of instance was returned (instanceOf list, string.... or
> whatever)... It's hard for migrate code. Any plans? ideas?
> 
> best regards
> 

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

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


Re: Change on Generics and remove unnecesary cast

Posted by Francisco Collao Gárate <pc...@gmail.com>.
Ok, I will create another branch with code changes (not style)

I'll pushing during the day.

I have a question... this Class "ExtendedProperties" from
commons-collection isn't use generics and use object for return the
instance so... It's hard to work with this. Any plans for remove,
change or use other library to read the configuration, I read in the
code that you are planing to use commons-configuracion for that.

En example of that is when you get a String or a String comma
separated that is convert in a List<String>... so the class that is
call to getter receive an object and you have to force to ask wich
kind of instance was returned (instanceOf list, string.... or
whatever)... It's hard for migrate code. Any plans? ideas?

best regards

On Fri, Jun 12, 2015 at 1:01 AM, Sergiu Dumitriu
<se...@gmail.com> wrote:
> Hi Francisco,
>
> Good idea about the codestyle files, I usually like to:
>
> - add configuration files for Eclipse / IDEA
> - set up the checkstyle Maven plugin to enforce a common codestyle (and
> a several other good code practices)
> - set up a license checking maven plugin to enforce the presence of the
> license header
>
> I'll get working on that.
>
> A few hints for getting patches applied faster:
>
> - make smaller, easy to process pull requests
> - try to separate actual code fixes from stylistic reformatting
>
>
> On 06/11/2015 10:30 PM, Francisco Collao Gárate wrote:
>> Hi:
>>
>> 1... thanks so much for the review of the changes.
>>
>> 2... sorry about the formatter that I use (eclipse + apache maven code
>> style). I will correct the classes when I'll work on them. It's a good
>> idea publish the eclipse formatter (xml) in the velocity wiki, It will
>> be more easy add the right code format and another preferences.
>>
>> 3... I answered the code review that sdumitriu made.
>>
>> 4... Reading the code, there are a lot of dead code (controlled with a
>> boolean just for debug) it is really necesary? maybe exist another way
>> to do this.
>>
>> If you have more comments.. I'll be expecting
>>
>> Best Regards
>>
>> On Thu, Jun 11, 2015 at 5:08 PM, Sergiu Dumitriu
>> <se...@gmail.com> wrote:
>>> Hi Francisco,
>>>
>>> Thank you for this work, it's appreciated. I did a quick pass over the
>>> code, I don't know if you received those comments [1], and I see you did
>>> even more work afterwards. Can you review those comments?
>>>
>>> [1] https://github.com/apache/velocity-engine/pull/2
>>>
>>> On 06/08/2015 11:06 AM, Francisco Collao Gárate wrote:
>>>> Hi:
>>>>
>>>> I've been working on eliminate some warnings with jdk 1.5 and above,
>>>> removing some unnecesary cast when generics parameter are apply.
>>>>
>>>> I published a branch on my fork on github if anybody want to help or test.
>>>>
>>>> Here the link:
>>>>
>>>> https://github.com/pcollaog/velocity-engine/tree/feature/fix-some-generics
>>>>
>>>> If you have some requirement or new ideas... all are welcome
>>>>
>>>> Best Regards
>>>>
>>>
>>>
>>> --
>>> Sergiu Dumitriu
>>> http://purl.org/net/sergiu
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>>> For additional commands, e-mail: dev-help@velocity.apache.org
>>>
>>
>>
>>
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>



-- 
Francisco Collao Gárate
LinuxUser #363300
http://blog.pcollaog.cl

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


Re: Change on Generics and remove unnecesary cast

Posted by Sergiu Dumitriu <se...@gmail.com>.
Hi Francisco,

Good idea about the codestyle files, I usually like to:

- add configuration files for Eclipse / IDEA
- set up the checkstyle Maven plugin to enforce a common codestyle (and
a several other good code practices)
- set up a license checking maven plugin to enforce the presence of the
license header

I'll get working on that.

A few hints for getting patches applied faster:

- make smaller, easy to process pull requests
- try to separate actual code fixes from stylistic reformatting


On 06/11/2015 10:30 PM, Francisco Collao Gárate wrote:
> Hi:
> 
> 1... thanks so much for the review of the changes.
> 
> 2... sorry about the formatter that I use (eclipse + apache maven code
> style). I will correct the classes when I'll work on them. It's a good
> idea publish the eclipse formatter (xml) in the velocity wiki, It will
> be more easy add the right code format and another preferences.
> 
> 3... I answered the code review that sdumitriu made.
> 
> 4... Reading the code, there are a lot of dead code (controlled with a
> boolean just for debug) it is really necesary? maybe exist another way
> to do this.
> 
> If you have more comments.. I'll be expecting
> 
> Best Regards
> 
> On Thu, Jun 11, 2015 at 5:08 PM, Sergiu Dumitriu
> <se...@gmail.com> wrote:
>> Hi Francisco,
>>
>> Thank you for this work, it's appreciated. I did a quick pass over the
>> code, I don't know if you received those comments [1], and I see you did
>> even more work afterwards. Can you review those comments?
>>
>> [1] https://github.com/apache/velocity-engine/pull/2
>>
>> On 06/08/2015 11:06 AM, Francisco Collao Gárate wrote:
>>> Hi:
>>>
>>> I've been working on eliminate some warnings with jdk 1.5 and above,
>>> removing some unnecesary cast when generics parameter are apply.
>>>
>>> I published a branch on my fork on github if anybody want to help or test.
>>>
>>> Here the link:
>>>
>>> https://github.com/pcollaog/velocity-engine/tree/feature/fix-some-generics
>>>
>>> If you have some requirement or new ideas... all are welcome
>>>
>>> Best Regards
>>>
>>
>>
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: dev-help@velocity.apache.org
>>
> 
> 
> 


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

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


Re: Change on Generics and remove unnecesary cast

Posted by Francisco Collao Gárate <pc...@gmail.com>.
Hi:

1... thanks so much for the review of the changes.

2... sorry about the formatter that I use (eclipse + apache maven code
style). I will correct the classes when I'll work on them. It's a good
idea publish the eclipse formatter (xml) in the velocity wiki, It will
be more easy add the right code format and another preferences.

3... I answered the code review that sdumitriu made.

4... Reading the code, there are a lot of dead code (controlled with a
boolean just for debug) it is really necesary? maybe exist another way
to do this.

If you have more comments.. I'll be expecting

Best Regards

On Thu, Jun 11, 2015 at 5:08 PM, Sergiu Dumitriu
<se...@gmail.com> wrote:
> Hi Francisco,
>
> Thank you for this work, it's appreciated. I did a quick pass over the
> code, I don't know if you received those comments [1], and I see you did
> even more work afterwards. Can you review those comments?
>
> [1] https://github.com/apache/velocity-engine/pull/2
>
> On 06/08/2015 11:06 AM, Francisco Collao Gárate wrote:
>> Hi:
>>
>> I've been working on eliminate some warnings with jdk 1.5 and above,
>> removing some unnecesary cast when generics parameter are apply.
>>
>> I published a branch on my fork on github if anybody want to help or test.
>>
>> Here the link:
>>
>> https://github.com/pcollaog/velocity-engine/tree/feature/fix-some-generics
>>
>> If you have some requirement or new ideas... all are welcome
>>
>> Best Regards
>>
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>



-- 
Francisco Collao Gárate
LinuxUser #363300
http://blog.pcollaog.cl

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


Re: Change on Generics and remove unnecesary cast

Posted by Sergiu Dumitriu <se...@gmail.com>.
Hi Francisco,

Thank you for this work, it's appreciated. I did a quick pass over the
code, I don't know if you received those comments [1], and I see you did
even more work afterwards. Can you review those comments?

[1] https://github.com/apache/velocity-engine/pull/2

On 06/08/2015 11:06 AM, Francisco Collao Gárate wrote:
> Hi:
> 
> I've been working on eliminate some warnings with jdk 1.5 and above,
> removing some unnecesary cast when generics parameter are apply.
> 
> I published a branch on my fork on github if anybody want to help or test.
> 
> Here the link:
> 
> https://github.com/pcollaog/velocity-engine/tree/feature/fix-some-generics
> 
> If you have some requirement or new ideas... all are welcome
> 
> Best Regards
> 


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu

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