You can compile and run in Eclipse, the same code, using idea compilation will fail error: Unable to determine <t>t type parameter, no unique maximum instance for type variable T with upper bound of Int,java.lang.object
By looking up data on the web, it was mentioned that Eclipse uses JDT compilation and Ant Javac to use JDK to find several solutions:
1. Configuration using JDK compilation [0].
2. By strengthening the type conversion, you can temporarily bypass the problem and refer to [1][2].
3.[2][3] Also points out that this is a JDK1.6 version of the problem, [2] that after upgrading to the jdk1.6.0_45 version, the test packaging is not a problem, and I did not succeed, according to [3] referenced in the StackOverflow link, it was pointed out that this is a JDK bug , which was repaired in JDK1.7 [4]. The problem does not occur after using JDK1.7.
Above is the solution of Baidu;
But I switched the compiler in idea, no JDK, no error in eclipse.