java培训吧 关注:116,351贴子:396,612
  • 0回复贴,共1

JVM抛出一个奇怪的StackOverflow异常

取消只看楼主收藏回复

hashCode()方法直接堆栈溢出,会是什么原因引起的?
注: 异常是在获取一个Map结果之后,toString()时抛出。
java.lang.StackOverflowError
at java.util.Date.getTimeImpl(Date.java:889)
at java.util.Date.getTime(Date.java:885)
at java.sql.Timestamp.getTime(Timestamp.java:146)
at java.util.Date.hashCode(Date.java:994)
at java.sql.Timestamp.hashCode(Timestamp.java:529)
at java.util.Objects.hashCode(Objects.java:98)
at java.util.HashMap$Node.hashCode(HashMap.java:296)
at java.util.AbstractMap.hashCode(AbstractMap.java:507)
at java.util.Objects.hashCode(Objects.java:98)
at java.util.HashMap$Node.hashCode(HashMap.java:296)
at java.util.AbstractMap.hashCode(AbstractMap.java:507)
at java.util.Objects.hashCode(Objects.java:98)
at java.util.HashMap$Node.hashCode(HashMap.java:296)
at java.util.AbstractMap.hashCode(AbstractMap.java:507)
at java.util.Objects.hashCode(Objects.java:98)
at java.util.HashMap$Node.hashCode(HashMap.java:296)
at java.util.AbstractMap.hashCode(AbstractMap.java:507)
… 显示全部


1楼2015-09-30 08:49回复