You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Martin Kreidenweis <ma...@tngtech.com> on 2011/03/17 10:12:32 UTC

Re: svn commit: r1081912 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java

Hi Jacques,

the 'official' workaround seems to be this:

    public <STMNT extends SQLStatement<?>> SQLPlan<?> plan(STMNT statement) {

This also compiles in older Java versions and doesn't show a warning in Eclipse.

Martin


On 15.03.2011 20:19, jleroux@apache.org wrote:
> Author: jleroux
> Date: Tue Mar 15 19:19:22 2011
> New Revision: 1081912
> 
> URL: http://svn.apache.org/viewvc?rev=1081912&view=rev
> Log:
> Revert partially r1076852 (only http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?view=diff&r1=1076852&r2=1076853&pathrev=1076853)
> 
> This is preventing some java version to compile (So far at least 1.6.0_14 and 1.6.0_17 fail. It's ok with 1.6.0_23 and 1.6.0_24)
> 
> Marco mades this change recently in his warnings effort. But I don't see anything in Eclipse nor while building. So I'm reverting this trivial change
> 
> 
> Modified:
>     ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
> 
> Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?rev=1081912&r1=1081911&r2=1081912&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java (original)
> +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java Tue Mar 15 19:19:22 2011
> @@ -37,7 +37,7 @@ public abstract class Planner<P extends 
>          }
>      }
>  
> -    public SQLPlan<?> plan(SQLStatement<?> statement) {
> +    public SQLPlan<?> plan(SQLStatement statement) {
>          if (statement instanceof SQLDelete) return planDelete((SQLDelete) statement);
>          if (statement instanceof SQLInsert) return planInsert((SQLInsert) statement);
>          if (statement instanceof SQLSelect) return planSelect((SQLSelect) statement);
> 
> 

Re: svn commit: r1081912 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Martin,

Committed at r1082475

I still wonder why we care about that ;o)

Jacques

From: "Martin Kreidenweis" <ma...@tngtech.com>
> Hi,
>
> Ignore the 'official'... :-)
> It's just a workaround I found on several pages during my Google search.
> I tested with Java 1.6.0_17 and 1.6.0_24.
>
> Martin
>
>
> On 17.03.2011 12:54, Jacques Le Roux wrote:
>> Compiles also with 6.0_14, sounds good
>> Still Why official?
>>
>> Thks
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <ja...@les7arts.com>
>>> Hi Martin,
>>>
>>> Yes, it compiles just fine in 6.0_22
>>> Why official? I guess you tested it with an older version, which one?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>> From: "Martin Kreidenweis" <ma...@tngtech.com>
>>>> Hi Jacques,
>>>>
>>>> the 'official' workaround seems to be this:
>>>>
>>>>    public <STMNT extends SQLStatement<?>> SQLPlan<?> plan(STMNT statement) {
>>>>
>>>> This also compiles in older Java versions and doesn't show a warning in Eclipse.
>>>>
>>>> Martin
>>>>
>>>>
>>>> On 15.03.2011 20:19, jleroux@apache.org wrote:
>>>>> Author: jleroux
>>>>> Date: Tue Mar 15 19:19:22 2011
>>>>> New Revision: 1081912
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1081912&view=rev
>>>>> Log:
>>>>> Revert partially r1076852 (only
>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?view=diff&r1=1076852&r2=1076853&pathrev=1076853)
>>>>>
>>>>>
>>>>> This is preventing some java version to compile (So far at least 1.6.0_14 and 1.6.0_17 fail.
>>>>> It's ok with 1.6.0_23 and 1.6.0_24)
>>>>>
>>>>> Marco mades this change recently in his warnings effort. But I don't see anything in Eclipse nor
>>>>> while building. So I'm reverting this trivial change
>>>>>
>>>>>
>>>>> Modified:
>>>>>     ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>>>>>
>>>>> Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>>>>> URL:
>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?rev=1081912&r1=1081911&r2=1081912&view=diff
>>>>>
>>>>> ==============================================================================
>>>>> --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java (original)
>>>>> +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java Tue Mar 15 19:19:22 2011
>>>>> @@ -37,7 +37,7 @@ public abstract class Planner<P extends
>>>>>          }
>>>>>      }
>>>>>
>>>>> -    public SQLPlan<?> plan(SQLStatement<?> statement) {
>>>>> +    public SQLPlan<?> plan(SQLStatement statement) {
>>>>>          if (statement instanceof SQLDelete) return planDelete((SQLDelete) statement);
>>>>>          if (statement instanceof SQLInsert) return planInsert((SQLInsert) statement);
>>>>>          if (statement instanceof SQLSelect) return planSelect((SQLSelect) statement);
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>
>
> -- 
> Martin Kreidenweis
> Software Consultant
> TNG Technology Consulting
> martin.kreidenweis@tngtech.com - +49 176 10284831
>
> TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
> Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
> Sitz: Unterföhring * Amtsgericht München * HRB 135082
> 



Re: svn commit: r1081912 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java

Posted by Martin Kreidenweis <ma...@tngtech.com>.
Hi,

Ignore the 'official'... :-)
It's just a workaround I found on several pages during my Google search.
I tested with Java 1.6.0_17 and 1.6.0_24.

Martin


On 17.03.2011 12:54, Jacques Le Roux wrote:
> Compiles also with 6.0_14, sounds good
> Still Why official?
> 
> Thks
> 
> Jacques
> 
> From: "Jacques Le Roux" <ja...@les7arts.com>
>> Hi Martin,
>>
>> Yes, it compiles just fine in 6.0_22
>> Why official? I guess you tested it with an older version, which one?
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Martin Kreidenweis" <ma...@tngtech.com>
>>> Hi Jacques,
>>>
>>> the 'official' workaround seems to be this:
>>>
>>>    public <STMNT extends SQLStatement<?>> SQLPlan<?> plan(STMNT statement) {
>>>
>>> This also compiles in older Java versions and doesn't show a warning in Eclipse.
>>>
>>> Martin
>>>
>>>
>>> On 15.03.2011 20:19, jleroux@apache.org wrote:
>>>> Author: jleroux
>>>> Date: Tue Mar 15 19:19:22 2011
>>>> New Revision: 1081912
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1081912&view=rev
>>>> Log:
>>>> Revert partially r1076852 (only
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?view=diff&r1=1076852&r2=1076853&pathrev=1076853)
>>>>
>>>>
>>>> This is preventing some java version to compile (So far at least 1.6.0_14 and 1.6.0_17 fail.
>>>> It's ok with 1.6.0_23 and 1.6.0_24)
>>>>
>>>> Marco mades this change recently in his warnings effort. But I don't see anything in Eclipse nor
>>>> while building. So I'm reverting this trivial change
>>>>
>>>>
>>>> Modified:
>>>>     ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>>>>
>>>> Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?rev=1081912&r1=1081911&r2=1081912&view=diff
>>>>
>>>> ==============================================================================
>>>> --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java (original)
>>>> +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java Tue Mar 15 19:19:22 2011
>>>> @@ -37,7 +37,7 @@ public abstract class Planner<P extends
>>>>          }
>>>>      }
>>>>
>>>> -    public SQLPlan<?> plan(SQLStatement<?> statement) {
>>>> +    public SQLPlan<?> plan(SQLStatement statement) {
>>>>          if (statement instanceof SQLDelete) return planDelete((SQLDelete) statement);
>>>>          if (statement instanceof SQLInsert) return planInsert((SQLInsert) statement);
>>>>          if (statement instanceof SQLSelect) return planSelect((SQLSelect) statement);
>>>>
>>>>
>>>
>>
>>
> 
> 


-- 
Martin Kreidenweis
Software Consultant
TNG Technology Consulting
martin.kreidenweis@tngtech.com - +49 176 10284831

TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
Sitz: Unterföhring * Amtsgericht München * HRB 135082

Re: svn commit: r1081912 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java

Posted by Jacques Le Roux <jl...@les7arts.com>.
Compiles also with 6.0_14, sounds good
Still Why official?

Thks

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
> Hi Martin,
>
> Yes, it compiles just fine in 6.0_22
> Why official? I guess you tested it with an older version, which one?
>
> Thanks
>
> Jacques
>
> From: "Martin Kreidenweis" <ma...@tngtech.com>
>> Hi Jacques,
>>
>> the 'official' workaround seems to be this:
>>
>>    public <STMNT extends SQLStatement<?>> SQLPlan<?> plan(STMNT statement) {
>>
>> This also compiles in older Java versions and doesn't show a warning in Eclipse.
>>
>> Martin
>>
>>
>> On 15.03.2011 20:19, jleroux@apache.org wrote:
>>> Author: jleroux
>>> Date: Tue Mar 15 19:19:22 2011
>>> New Revision: 1081912
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1081912&view=rev
>>> Log:
>>> Revert partially r1076852 (only 
>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?view=diff&r1=1076852&r2=1076853&pathrev=1076853)
>>>
>>> This is preventing some java version to compile (So far at least 1.6.0_14 and 1.6.0_17 fail. It's ok with 1.6.0_23 and 1.6.0_24)
>>>
>>> Marco mades this change recently in his warnings effort. But I don't see anything in Eclipse nor while building. So I'm 
>>> reverting this trivial change
>>>
>>>
>>> Modified:
>>>     ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>>>
>>> Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>>> URL: 
>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?rev=1081912&r1=1081911&r2=1081912&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java (original)
>>> +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java Tue Mar 15 19:19:22 2011
>>> @@ -37,7 +37,7 @@ public abstract class Planner<P extends
>>>          }
>>>      }
>>>
>>> -    public SQLPlan<?> plan(SQLStatement<?> statement) {
>>> +    public SQLPlan<?> plan(SQLStatement statement) {
>>>          if (statement instanceof SQLDelete) return planDelete((SQLDelete) statement);
>>>          if (statement instanceof SQLInsert) return planInsert((SQLInsert) statement);
>>>          if (statement instanceof SQLSelect) return planSelect((SQLSelect) statement);
>>>
>>>
>>
>
> 



Re: svn commit: r1081912 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Martin,

Yes, it compiles just fine in 6.0_22
Why official? I guess you tested it with an older version, which one?

Thanks

Jacques

From: "Martin Kreidenweis" <ma...@tngtech.com>
> Hi Jacques,
>
> the 'official' workaround seems to be this:
>
>    public <STMNT extends SQLStatement<?>> SQLPlan<?> plan(STMNT statement) {
>
> This also compiles in older Java versions and doesn't show a warning in Eclipse.
>
> Martin
>
>
> On 15.03.2011 20:19, jleroux@apache.org wrote:
>> Author: jleroux
>> Date: Tue Mar 15 19:19:22 2011
>> New Revision: 1081912
>>
>> URL: http://svn.apache.org/viewvc?rev=1081912&view=rev
>> Log:
>> Revert partially r1076852 (only 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?view=diff&r1=1076852&r2=1076853&pathrev=1076853)
>>
>> This is preventing some java version to compile (So far at least 1.6.0_14 and 1.6.0_17 fail. It's ok with 1.6.0_23 and 1.6.0_24)
>>
>> Marco mades this change recently in his warnings effort. But I don't see anything in Eclipse nor while building. So I'm reverting 
>> this trivial change
>>
>>
>> Modified:
>>     ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>>
>> Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java?rev=1081912&r1=1081911&r2=1081912&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java (original)
>> +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Planner.java Tue Mar 15 19:19:22 2011
>> @@ -37,7 +37,7 @@ public abstract class Planner<P extends
>>          }
>>      }
>>
>> -    public SQLPlan<?> plan(SQLStatement<?> statement) {
>> +    public SQLPlan<?> plan(SQLStatement statement) {
>>          if (statement instanceof SQLDelete) return planDelete((SQLDelete) statement);
>>          if (statement instanceof SQLInsert) return planInsert((SQLInsert) statement);
>>          if (statement instanceof SQLSelect) return planSelect((SQLSelect) statement);
>>
>>
>