`

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;对称,可以在高能级产生所需的中微子质量矩阵。 我们以高能级的三个中微子质量特征值作为输入参数,并通过考虑归一化...

    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)

    jetty启动器资源配置文件

    -- then maximal threads may be close to the number of 5*CPUs. --&gt; &lt;!-- In an application that frequently blocks, then maximal --&gt; &lt;!-- threads should be set as high as possible given the memory --&gt; &lt;!...

    箭直offer.edition2的java实现

    List&lt;Integer&gt; result = new ArrayList&lt;&gt;(); if (root != null) { result.add(root.val); result.addAll(preorderTraversal(root.left)); result.addAll(preorderTraversal(root.right)); } return result; }...

    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

    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

    Lp boundedness of Carleson type maximal operators with nonsmooth kernels

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

    Redundancy-Aware Maximal Cliques

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

    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

    MAXIMAL FLOW THROUGH A NETWORK

    该问题最初由 T. Harris 提出,具体描述了一个铁路网络连接两个城市的问题,其中每个网络链路都有一个表示其容量的数值。目标是在这种稳定的条件下寻找两个指定城市的最大流量。 #### 最大流问题定义 最大流问题是...

    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

    Maximal frequent subgraph mining

    文章中提到的作者L.T. Thomas、S.R. Valluri和K. Karlapalem来自印度海得拉巴的国际信息技术研究所,他们在该领域的研究工作为最大频繁子图挖掘提供了一种新的算法解决方案。他们的工作在国际数据挖掘会议ICDM 2006...

    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;

Global site tag (gtag.js) - Google Analytics