2024年Clojure状态调查!分享你的想法。

欢迎!请参阅关于页面,了解如何使用本服务。

0
Clojure

在使用某些平台上的Clojure 1.6.0版本时(详情见下文),如果你创建一个类似这样的对象:

(def nst (vec '((3 7 22) 99 (123 18 225 437))))

然后检查该对象所表示的树

(inspect-tree nst)

使用键盘导航大部分都正常。然而,当你指向一个单独的值——比如99或437——并按下右箭头键时,会出现错误

`
线程"AWT-EventQueue-0"中的异常:不支持在此类型上使用count:Long

at clojure.lang.RT.countFrom(RT.java:556)
at clojure.lang.RT.count(RT.java:530)
at clojure.inspector$fn__6907.invoke(inspector.clj:40)
at clojure.lang.MultiFn.invoke(MultiFn.java:227)
at clojure.inspector$tree_model$fn__6929.invoke(inspector.clj:63)
at clojure.inspector.proxy$java.lang.Object$TreeModel$775afa87.getChildCount(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Actions.traverse(BasicTreeUI.java:4395)
at javax.swing.plaf.basic.BasicTreeUI$Actions.actionPerformed(BasicTreeUI.java:4052)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1662)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2878)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2925)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2841)
at java.awt.Component.processEvent(Component.java:6282)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
at java.awt.Component.dispatchEventImpl(Component.java:4731)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

`

已复现此问题的环境
+ Windows 7 Enterprise,SP1,Oracle JDK 1.7.0_51,Clojure 1.6.0
+ Ubuntu Linux 14.04.1,Oracle JDK 1.7.0_65,Clojure 1.6.0

不会因相同的操作序列而产生异常的环境
+ Mac OS X 10.8.5,Oracle JDK 1.7.0_51,Clojure 1.6.0

3 个答案

0

评论由:jafingerhut

Patch clj-1502-v1.patch可避免报告中出现的那种异常。已在OS X,Linux和补丁注释中提到的Windows 7版本上手动测试。我怀疑编写对此进行自动测试不值得花费力气。

0

评论由:cljexplorer

谢谢,Andy

  • DC
0
参考: https://clojure.atlassian.net/browse/CLJ-1502(由 alex+import 汇报)
...