On 7 October 2010 11:27, Rickard Öberg <[email protected]> wrote:

> On 2010-10-07 18.10, Stuart McCulloch wrote:
>
>> On 7 October 2010 10:32, Niclas Hedhman <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>>    On Thu, Oct 7, 2010 at 4:03 PM, Stanislav Muhametsin
>>    <[email protected] <mailto:[email protected]>>
>>
>>    wrote:
>>     > Quoting Niclas Hedhman <[email protected]
>>    <mailto:[email protected]>>:
>>
>>     >
>>     >> It is being compiled with JDK 1.5.0_22, as I take that as the only
>>     >> safe way... Compatibility out has the tendency to miss 'new
>> methods'
>>     >> and such.
>>     >>
>>     >
>>     > Did you try changing names of generics? Like, "ThrowableType1" in
>>     > AbstractModifierModel, and "ThrowableType2" in ConstructorsModel . I
>>     > remember having some generics name-clash problem, which 1.6 did
>>    not report
>>     > (correctly), but 1.5 did (incorrectly).
>>
>>    Thanks for the suggestion, but it doesn't help.
>>
>>
>> it's probably a bug in the generics compiler - something to do with
>> resolving the containing wildcard against the contained wildcard
>>
>> these days I tend to compile with a Java6 JDK using target 1.5
>> and use the animal-sniffer-maven-plugin to enforce Java5 usage:
>>
>
> In other words, we can compile with 1.6 and it will run on 1.5?
>

that's the idea - the animal-sniffer will check you only use Java5 APIs (ie.
no String.isEmpty, etc.)

to set the compiler to target Java5 bytecode use:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>


and you don't even need that if you use v2.3.2 of the compiler plugin, as
Java5 is now the default:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
      </plugin>


HTH

/Rickard
>
>
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>

-- 
Cheers, Stuart
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to