cxbrooks / test

Second test for bugzilla to git
0 stars 0 forks source link

Nullpointer exception upon getting value from record using escaped key #321

Closed cxbrooks closed 9 years ago

cxbrooks commented 11 years ago

Note: the issue was created automatically with bugzilla2github tool

Original bug ID: BZ#526 From: @lhstrh Reported version: 9.1.devel CC: @cxbrooks, pt-dev@chess.eecs.berkeley.edu

cxbrooks commented 11 years ago

In the expression evaluator:

a = {x = 1} {x = 1} a.get("\"x")

yields: "Failed to evaluate expression null"

Hitting "Dismiss" and continuing by hitting will keep giving the same exception.

Stacktrace:

java.lang.NullPointerException at ptolemy.data.expr.ConversionUtilities.convertJavaTypeToToken(ConversionUtilities.java:233) at ptolemy.data.expr.CachedMethod.invoke(CachedMethod.java:549) at ptolemy.data.expr.ParseTreeEvaluator._methodCall(ParseTreeEvaluator.java:1452) at ptolemy.data.expr.ParseTreeEvaluator.visitMethodCallNode(ParseTreeEvaluator.java:897) at ptolemy.data.expr.ASTPtMethodCallNode.visit(ASTPtMethodCallNode.java:98) at ptolemy.data.expr.ParseTreeEvaluator.evaluateParseTree(ParseTreeEvaluator.java:105) at ptolemy.actor.gui.ExpressionShellTableau.evaluateCommand(ExpressionShellTableau.java:149) at ptolemy.gui.ShellTextArea._evalCommand(ShellTextArea.java:319) at ptolemy.gui.ShellTextArea.access$2(ShellTextArea.java:294) at ptolemy.gui.ShellTextArea$ShellKeyListener.keyPressed(ShellTextArea.java:476) at java.awt.Component.processKeyEvent(Component.java:6248) at javax.swing.JComponent.processKeyEvent(JComponent.java:2801) at java.awt.Component.processEvent(Component.java:6067) at java.awt.Container.processEvent(Container.java:2039) at java.awt.Component.dispatchEventImpl(Component.java:4653) at java.awt.Container.dispatchEventImpl(Container.java:2097) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1836) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676) at java.awt.Component.dispatchEventImpl(Component.java:4525) at java.awt.Container.dispatchEventImpl(Container.java:2097) at java.awt.Window.dispatchEventImpl(Window.java:2482) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648) at java.awt.EventQueue.access$000(EventQueue.java:84) at java.awt.EventQueue$1.run(EventQueue.java:607) at java.awt.EventQueue$1.run(EventQueue.java:605) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$2.run(EventQueue.java:621) at java.awt.EventQueue$2.run(EventQueue.java:619) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:618) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

cxbrooks commented 11 years ago

This was solved in the slipstream of addressing another issue, see: https://projects.ecoinformatics.org/ecoinfo/issues/5722

cxbrooks commented 11 years ago

The same problem reappeared, needs looking into.

cxbrooks commented 9 years ago

Fixed.

x = {a = 1} {a = 1} x.get("b") No such key: "b"