`

type parameters of <T>T cannot be determined; no unique maximal instance exists

 
阅读更多

转自于: http://www.cnblogs.com/rollenholt/p/3799415.html

 

今天在进行代码检查的时候出现下面的异常:

1 type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object

当时的第一感觉就是代码因为jdk版本太低引起的、

因为最后咨询了配置管理组的同事,确实发现是因为我本地jdk用的是1.7版本,而代码检查机器上用的是jdk1.6版本。因此出现了这个问题。

其实出现这个问题的解决办法很简单:

1.  升级jdk版本

2.    修改代码

第一种升级jdk版本的方式我们就不细说了,说说第二种,原始代码为:

1     public int queryIpCount(String ipAddr) {
2         return getSqlSession().selectOne("IpVerify.queryIpCount", ipAddr);
3     }

修改为:

1     public Integer queryIpCount(String ipAddr) {
2         return getSqlSession().selectOne("IpVerify.queryIpCount", ipAddr);
3     }

也就是将返回类型从int修改为Integer就ok了。

分享到:
评论

相关推荐

    asp图片验证码

    asp图片验证码,分享给大家.&lt;br&gt;&lt;br&gt;ShotGraph version 2.5&lt;br&gt;README.TXT file&lt;br&gt;==================================================&lt;br&gt;&lt;br&gt;Thank you for downloading and usage of ShotGraph.&lt;br&gt;It's time to...

    Linux下的rar解压缩工具

    Usage: rar &lt;command&gt; -&lt;switch 1&gt; -&lt;switch N&gt; &lt;archive&gt; &lt;files...&gt; &lt;@listfiles...&gt; &lt;path_to_extract\&gt; &lt;Commands&gt; a Add files to archive c Add archive comment ch Change archive parameters cw Write...

    具有破碎的A4风味对称性的MSSM中非零θ13的辐射生成

    &lt;msub&gt; &lt;mrow&gt; &lt;mi&gt; A &lt;/ mi&gt; &lt;/ mrow&gt; &lt;mrow&gt; &lt;mn&gt; 4 &lt;/ mn&gt; &lt;/ mrow&gt; &lt;/ msub&gt; &lt;/ math&gt;对称,可以在高能级产生所需的中微子质量矩阵。 我们以高能级的三个中微子质量特征值作为输入参数,并通过考虑归一化...

    二分图匹配幻灯片

    二分图又称作二部图,是图论中...&lt;br&gt;选择这样的边数最大的子集称为图的最大匹配问题(maximal matching problem)&lt;br&gt;如果一个匹配中,图中的每个顶点都和图中某条边相关联,则称此匹配为完全匹配,也称作完备匹配。&lt;br&gt;

    Linearity properties of binary FCSR sequences

    &lt;SPAN lang=EN-US xss=removed&gt;Maximal length FCSR sequences, or &lt;I&gt;l&lt;/I&gt;-sequences, are an important type of nonlinear sequences used for building stream ciphers. This paper studies the linearity ...

    A topology-transparent MAC scheduling algorithm with guaranteed QoS for multihop wireless network

    In this paper, we propose a new topologytransparent&lt;br&gt; MAC scheduling algorithm, with parameters of the node number and the maximal nodal degree known, our&lt;br&gt; scheduling algorithm is based on a ...

    hex2bin_2.2_XiaZaiBa.zip

    hex2bin v2.2, Copyrhex2bin v2.2, Copyright (C) 2015 Jacques Pelletier & contributorsight (C) 2015 Jacques Pelletier & contributors usage: hex2bin [OPTIONS] filename ... -w Swap wordwise (low &lt;-&gt; high)

    Periods of termwise exclusive ors of maximal length FCSR sequences

    &lt;SPAN lang=EN-US xss=removed&gt;A maximal length feedback with carry shift register sequence is also called an &lt;I xss=removed&gt;l&lt;/I&gt;-sequence. Although termwise exclusive ors of &lt;I xss=removed&gt;l&lt;/I&gt;-se

    Maximal frequent subgraph mining

    The set of maximal frequent subgraphs is much smaller to that of the set of frequent subgraphs, thus providing ample scope for pruning. MARGIN is a maximal subgraph mining algorithm that moves among ...

    Specific heat, strength, and maximal strain of atomic bond in a monatomic chain

    纳米尺寸效应新应用:单键比热,强度,及应变极限,孙长庆,,Specific heat, strength, and maximal strain of atomic bond in an impurity-free monatomic chain.

    Weighted Lp boundedness of Carleson type maximal operators

    Carleson型极大算子的加权Lp有界性,丁勇,刘红海,2001年, Stein 和 Wainger证明了Carleson型极大算子的Lp有界性, 其中相函数P(y)是不含线性项的多项式, 奇异核K是光滑的.本文将运用TT*方法推广St

    Redundancy-Aware Maximal Cliques

    数据挖掘相关内容Redundancy-Aware Maximal Cliques,关于最大派系

    Lp boundedness of Carleson type maximal operators with nonsmooth kernels

    粗糙Carleson型极大算子的Lp 有界性,丁勇,刘红海,Stein 和 Wainger证明了Carleson型极大算子的 Lp 有界性, 其中相函数P(y)是不含线性项的多项式, 奇异核 K 是光滑的.本文将考虑另一类Carleson型�

    Maximal Margin Sphere-Structured Multi-class Support Vector Machine

    Instead of using hyperplanes, hyperspheres that tightly enclosed the data of each class can be used. Since the classspecific hyperspheres are constructed for each class separately, the spherical-...

    Astyle(格式调整)

    包含源代码,需要的...spaces per indent, a maximal indentation of 40 spaces inside continuous statements, a minimum indentation of eight spaces inside conditional statements, and NO formatting options.

    dna匹配leetcode-leetcode:leetcode刷题

    dna匹配 leetcode leetcode刷题--C++ 哈希表 Longest Substring Without Repeating Characters 哈希表 ...of ...map&lt;pair&gt;, int&gt; Fraction to Recurring Decimal map long long 正负号 Repeated DNA S

    Type.Inheritance.and.Relational.Theory

    However, there doesn’t seem to be any consensus in the community at large on a formal, rigorous, and abstract model of inheritance. This book proposes such a model, one that enjoys several ...

    Autocorrelations of l-sequences with certain shifts

    &lt;SPAN lang=EN-US xss=removed&gt;In this paper, the autocorrelation of maximal period Feedback with Carry Shift Register sequences (&lt;I xss=removed&gt;l&lt;/I&gt;-sequences) are discussed. For an &lt;I xss=removed&gt;

    Boundedness of some maximal commutators in Hardy-type spaces with non-doubling measures

    某些极大交换子在非倍测度Hardy型空间上的有界性,胡国恩,孟岩,设μ是Rd上的非负Radon测度且只满足某些增长条件. 在该假设条件下, 作者建立了一类 极大Calderón-Zygmund算子以及由Calderón-Zygmund算子和RBMO

    Maximal Parabolic Kazhdan-Lusztig R-polynomials of Types B and D

    B型和D型极大抛物型Kazhdan-Lusztig R-多项式,范久瑜,,在本文中,我们给出了某些$B$型和$D$型极大抛物型Kazhdan-Lusztig $R$-多项式的显式表达式。记$B_n$为$B$型Coxeter群,生成元集记为$S_n^B={s_0,s_1,ldot

Global site tag (gtag.js) - Google Analytics