Friday, 15 June 2012

java - Compiler difference between IntelliJ and Eclipse -


I have a class that looks like the following. This class punishes Eclipse Build 20090 9 20-1017:

  Public Squared Mercedes Exporter's Scheduled Expert Services ... ... Public & lt; T & gt; & Lt; Future & lt; T & gt; & Gt; InvokeAll throws interwanted exposure (collection & lt; callable & lt; T & gt; jobs, long timetable, time unit unit) {...} public & lt; T & gt; & Lt; Future & lt; T & gt; & Gt; InvokeAll throws interruptedException (collections & lt; callable & lt; T & gt; jobs) {...} public & lt; T & gt; T invokeAny throws (interceptedException, ExecutionException, TimeoutException {...} public & lt; throws at the time (
  • T & gt; Tasks & lt; T & gt; Task, Long End, TIMEUNIT unit) T & gt; T invokeAny throws (archive & lt; refundable & lt; t & gt; functions) InterruptedException, ExecutionException {...} ...}
  • However, if I intelliJ 9, I compile a compilation error, it will only be compiled in IntelliJ if I & lt; Callable & lt; T & gt; & Gt; With & lt;? Replace all references to callable & lt; T & gt; & Gt; Expands for example:

      public  
      name collision. The method is invokeAll (the collection is & lt;? Repatriated & lt; t & gt; & gt;); Retributable & LT; T & gt type SingleScheduledExecutor's invokeAll (The collection is & lt is the same extinction;; of the type executorService) but it does not dominate  

    Can you make that the applicable ScheduledExectorService that will compile under both the intelles and eclipse? Both IDEs have been configured to use Java 1.5, which is right for my deployment platform. 6 in Java, declares the following method (for example):

     

    > & lt; T & gt; InterruptedException, ExecutionException

    throws invokeAny (t & gt; is the collection & lt;; is repayable & lt; extends & gt; functions) but in java 5, declares this way in the same method Used:

      & lt; T & gt; Interactive Exception, execution exception  

    I do not have Java 5 installed and Eclipse Java EE Galileo 20090920- 1017 (I have been removed from the repository of personnel under Ubuntu and Sun-Java 5-JDK and I am very lazy to install it manually), but in reality, I think that Eclipse is correct.

    Are you sure you are using JDK5 in the Intelligent IDEA (and not JDK 6 with 1.5 level compliance)?


    No comments:

    Post a Comment