﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-求索-最新评论</title><link>http://www.blogjava.net/Longbow/CommentsRSS.aspx</link><description>Make it work, make it right, make it fast and make it open。</description><language>zh-cn</language><pubDate>Fri, 02 Sep 2005 04:54:07 GMT</pubDate><lastBuildDate>Fri, 02 Sep 2005 04:54:07 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: windows IP影射</title><link>http://www.blogjava.net/Longbow/archive/2005/10/07/7216.html#14953</link><dc:creator>干老</dc:creator><author>干老</author><pubDate>Fri, 07 Oct 2005 13:17:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/10/07/7216.html#14953</guid><description><![CDATA[你们说的能不能明白点啊，我看不明白!!!<img src ="http://www.blogjava.net/Longbow/aggbug/14953.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">干老</a> 2005-10-07 21:17 <a href="http://www.blogjava.net/Longbow/archive/2005/10/07/7216.html#14953#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Eclipse 3.2M1发布</title><link>http://www.blogjava.net/Longbow/archive/2005/09/02/10061.html#11845</link><dc:creator>猪头小队长</dc:creator><author>猪头小队长</author><pubDate>Fri, 02 Sep 2005 09:35:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/09/02/10061.html#11845</guid><description><![CDATA[集成之后还是不好看，一看就是硬塞进去的。我觉得Java里面最漂亮的Loading logo是sun做的那个Applet加载的时候，java周围闪耀太阳光辉的那个。<img src ="http://www.blogjava.net/Longbow/aggbug/11845.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">猪头小队长</a> 2005-09-02 17:35 <a href="http://www.blogjava.net/Longbow/archive/2005/09/02/10061.html#11845#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 从控制台启动eclipse</title><link>http://www.blogjava.net/Longbow/archive/2005/07/27/8561.html#8580</link><dc:creator>coder</dc:creator><author>coder</author><pubDate>Wed, 27 Jul 2005 14:36:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/27/8561.html#8580</guid><description><![CDATA[请问用什么方法可以单步调试Eclipse的启动过程？<img src ="http://www.blogjava.net/Longbow/aggbug/8580.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">coder</a> 2005-07-27 22:36 <a href="http://www.blogjava.net/Longbow/archive/2005/07/27/8561.html#8580#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: iBatis2.1</title><link>http://www.blogjava.net/Longbow/archive/2005/07/15/4973.html#7761</link><dc:creator>emu</dc:creator><author>emu</author><pubDate>Fri, 15 Jul 2005 04:21:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/15/4973.html#7761</guid><description><![CDATA[快两个月过去了，对iBatis SqlMap 的研究有否进展？<img src ="http://www.blogjava.net/Longbow/aggbug/7761.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">emu</a> 2005-07-15 12:21 <a href="http://www.blogjava.net/Longbow/archive/2005/07/15/4973.html#7761#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: String pool</title><link>http://www.blogjava.net/Longbow/archive/2005/07/15/7742.html#7760</link><dc:creator>emu</dc:creator><author>emu</author><pubDate>Fri, 15 Jul 2005 04:19:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/15/7742.html#7760</guid><description><![CDATA[&gt;&gt;我们比较两个String的值，最好用equals()方法，而最好不要使用==<br><br>结论是对的，但是跟string pool没什么关系。<br><br>&gt;&gt;另外，声明String的时候，最好用=，这样就可以体现String pool的作用了。<br><br>结论也是对的，但是这样做不是为了体现String pool的作用而是避免重复创建对象。<img src ="http://www.blogjava.net/Longbow/aggbug/7760.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">emu</a> 2005-07-15 12:19 <a href="http://www.blogjava.net/Longbow/archive/2005/07/15/7742.html#7760#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 关于Generics的一点儿理解</title><link>http://www.blogjava.net/Longbow/archive/2005/07/08/7201.html#7348</link><dc:creator>文章千古事，得失寸心知</dc:creator><author>文章千古事，得失寸心知</author><pubDate>Fri, 08 Jul 2005 04:05:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/08/7201.html#7348</guid><description><![CDATA[&gt;&gt;  我想这是因为timestamp继承了Date的CompareTo()方法，所以一个timestamp就可以与Date比较了，但是应用了Generics以后这种情况是不允许的，而且代码也没有特殊处理，因此就会有Exception了。看来Generics也会带来一些其他的问题。<br><img src ="http://www.blogjava.net/Longbow/aggbug/7348.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">文章千古事，得失寸心知</a> 2005-07-08 12:05 <a href="http://www.blogjava.net/Longbow/archive/2005/07/08/7201.html#7348#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 关于Generics的一点儿理解</title><link>http://www.blogjava.net/Longbow/archive/2005/07/07/7201.html#7310</link><dc:creator>david</dc:creator><author>david</author><pubDate>Thu, 07 Jul 2005 08:38:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/07/7201.html#7310</guid><description><![CDATA[那可能是我的表达不太清楚。不过我的本意是说Migration的问题。谢谢你评论。<img src ="http://www.blogjava.net/Longbow/aggbug/7310.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">david</a> 2005-07-07 16:38 <a href="http://www.blogjava.net/Longbow/archive/2005/07/07/7201.html#7310#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 关于Generics的一点儿理解</title><link>http://www.blogjava.net/Longbow/archive/2005/07/07/7201.html#7279</link><dc:creator>emu</dc:creator><author>emu</author><pubDate>Thu, 07 Jul 2005 06:19:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/07/7201.html#7279</guid><description><![CDATA[可是你说的是泛形带来的其他问题，而这个问题其实不是泛形带来的。<img src ="http://www.blogjava.net/Longbow/aggbug/7279.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">emu</a> 2005-07-07 14:19 <a href="http://www.blogjava.net/Longbow/archive/2005/07/07/7201.html#7279#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 关于Generics的一点儿理解</title><link>http://www.blogjava.net/Longbow/archive/2005/07/06/7201.html#7232</link><dc:creator>Java求索</dc:creator><author>Java求索</author><pubDate>Wed, 06 Jul 2005 15:31:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/06/7201.html#7232</guid><description><![CDATA[多谢您的评论，我所说的其他问题所指的是Migration的问题。如果一个项目使用了1.4中的compareTo()方法，那么当这个项目要Migrate到1.5的时候，代码就不能编译通过了，必须修改源代码才行。<img src ="http://www.blogjava.net/Longbow/aggbug/7232.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">Java求索</a> 2005-07-06 23:31 <a href="http://www.blogjava.net/Longbow/archive/2005/07/06/7201.html#7232#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 关于Generics的一点儿理解</title><link>http://www.blogjava.net/Longbow/archive/2005/07/06/7201.html#7219</link><dc:creator>emu</dc:creator><author>emu</author><pubDate>Wed, 06 Jul 2005 10:27:00 GMT</pubDate><guid>http://www.blogjava.net/Longbow/archive/2005/07/06/7201.html#7219</guid><description><![CDATA[这是jdk1.5一个已经报告的bug：
<br><a target="_new" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103041">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103041</a>
<br>
<br>
<br>问题在于在jdk1.5中Timestamp多定义了一个比较方法：
<br>
<br>public int compareTo(java.util.Date o) {
<br>        return compareTo((Timestamp)o);
<br>    }
<br>
<br>这样如楼主所说，在1.4中Timestamp.compareTo(Date)的时候会调用继承来的Date.compareTo(Date)方法来完成比较，而Date.compareTo(Date)在比较前会把参数造型成Date对象，因此可以完成比较；而在1.5中Timestamp则直接使用自己的Timestamp.compareTo(Date)方法来比较，并试图在其中把参数造型成Timestamp，因此抛出造型异常。
<br>
<br>但是这并不像楼主想像的，“Generics也会带来一些其他的问题”，而是sun有意为之。看上面这个compareTo方法的相关说明：
<br>
<br>    // This forwarding method ensures that the compareTo(Date) method defined
<br>    // in java.util.Date is not invoked on a Timestamp
<br>
<br>显然sun认为1.4中的做法是不对的，下定决心在以放弃兼容性为代价在1.5中更正这个错误，而不是一个bug(真的要修复这个bug的话只要把上面这个方法删掉就行了)。sun坚持的正好就是楼主说的原则问题：只比较具有相同类型的两个对象
<br>
<br>放弃兼容性的代价就是有一些在1.4下面正常的代码在1.5下面不能允许了，包括大名鼎鼎的JIRA。对此JIRA的反应是：
<br>
<br>
JDK 1.5 has a bug that prevents JIRA from processing mail correctly. Until the issue is resolved, JIRA does not support JDK 1.5. We recommend you use JDK 1.4.x but it is possible to continue with JDK 1.5 by restarting the server with option \'-Dallow.jdk.1.5=true\'. You can find the JDK bug at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103041
<br>
<br>
<br>可是JIRA想要等“issue is resolved”那一天恐怕等不着了，这是个原则问题嘛 :)
<br>
<br><img src ="http://www.blogjava.net/Longbow/aggbug/7219.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Longbow/" target="_blank">emu</a> 2005-07-06 18:27 <a href="http://www.blogjava.net/Longbow/archive/2005/07/06/7201.html#7219#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>