On 9 January 2015 at 15:22, sebb <seb...@gmail.com> wrote:
> On 9 January 2015 at 10:01, Thomas Neidhart <thomas.neidh...@gmail.com> wrote:
>> On 01/09/2015 02:00 AM, sebb wrote:
>>> On 9 January 2015 at 00:47, Bernd Eckenfels <e...@zusammenkunft.net> wrote:
>>>> Am Fri, 9 Jan 2015 00:38:31 +0000
>>>> schrieb sebb <seb...@gmail.com>:
>>>>
>>>>> Just tried the animal sniffer on NET (Java 1.5) - I added a call to
>>>>> new IOException(new Exception()) which is Java 1.6+
>>>>
>>>> What Java did you use to start maven? Looks like Animal sniffer itself
>>>> uses Java 7 API.
>>>
>>> Java 7, but I just tried Java 6 and that worked the same.
>>>
>>> I raised a bug about the unhelpful output.
>>>
>>> There are some bug reports which suggest that the plugin is not 100%
>>> accurate compared with a compiler.
>>>
>>> So at best the plugin can be used to detect some API violations.
>>> I think we still need to build and test with the appropriate Java version.
>>
>> There must be something wrong with your setup.
>
> Just tried again
>
> Looks like the plugin does not like Java6 on MacOS, and fails when
> trying to report the first problem.

The problem is that the plugin uses a Java 7 method, but only when
reporting API violations.

I've raised

https://jira.codehaus.org/browse/MANIMALSNIFFER-55

about this.

The cause is suprising - the sniffer plugin was compiled with Java 7.
See the JIRA issue for details.

>> I did the same test and get the following output:
>>
>> [INFO] --- animal-sniffer-maven-plugin:1.13:check (default-cli) @
>> commons-email ---
>> [INFO] Checking unresolved references to
>> org.codehaus.mojo.signature:java15:1.0
>> [ERROR]
>> /home/tn/workspace/apache/email/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java:75:
>> Undefined reference: double[] java.util.Arrays.copyOf(double[], int)
>> [ERROR]
>> /home/tn/workspace/apache/email/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java:77:
>> Undefined reference: void java.io.IOException.<init>(Throwable)
>>
>>
>> after adding the following code snippet to commons-email (also at JDK 1.5):
>>
>>         Arrays.copyOf(new double[] { 0 }, 1);
>>         if ( true ) {
>>             throw new IOException(new Exception());
>>         }
>>
>
>
>> Thomas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to