Bug 871407 - NPE on auto completion for javascript object
Summary: NPE on auto completion for javascript object
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.6
Assignee: Jirka Kremser
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-30 11:55 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-31 10:14:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Libor Zoubek 2012-10-30 11:55:56 UTC
Description of problem: I get NPE on code-completion 


Version-Release number of selected component (if applicable):
4.6.0-SNAPSHOT
Build Number: aba99ed

How reproducible:always


Steps to Reproduce:
start CLI and type the following:

var x = {y:"y"}
x..<TAB>

and you get

java.lang.NullPointerException
	at org.rhq.scripting.javascript.JavascriptCompletor.contextComplete(JavascriptCompletor.java:185)
	at org.rhq.scripting.javascript.JavascriptCompletor.complete(JavascriptCompletor.java:131)
	at org.rhq.enterprise.client.utility.CodeCompletionCompletorWrapper.complete(CodeCompletionCompletorWrapper.java:34)
	at jline.MultiCompletor.complete(MultiCompletor.java:53)
	at jline.ConsoleReader.complete(ConsoleReader.java:832)
	at jline.ConsoleReader.readLine(ConsoleReader.java:518)
	at jline.ConsoleReader.readLine(ConsoleReader.java:448)
	at org.rhq.enterprise.client.ClientMain.getUserInput(ClientMain.java:278)
	at org.rhq.enterprise.client.ClientMain$1.run(ClientMain.java:319)
	at java.lang.Thread.run(Unknown Sourc

Comment 1 Jirka Kremser 2012-10-31 13:25:30 UTC
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=140259030

fixed in master
time:    Wed Oct 31 14:21:17 2012 +0100
commit:  1402590305df51642f83c7efe63340c62b354d83
author:  Jirka Kremser - jkremser
message: [BZ 871407 - NPE on auto completion for javascript object] the contextComplete() method now returns -1 instead of throwing NPE

Comment 2 Libor Zoubek 2013-04-02 09:25:22 UTC
verifed on Version: 4.7.0-SNAPSHOT Build Number: bd0c492

Comment 3 Heiko W. Rupp 2013-08-31 10:14:07 UTC
Bulk close of old bugs in VERIFIED state.


Note You need to log in before you can comment on or make changes to this bug.