Bug 1324828 - pretty.print(null) fails
Summary: pretty.print(null) fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: CLI
Version: JON 3.3.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ER01
: JON 3.3.6
Assignee: Josejulio Martínez
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On: 907897
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-07 11:39 UTC by Filip Brychta
Modified: 2016-07-27 15:31 UTC (History)
3 users (show)

Fixed In Version:
Clone Of: 907897
Environment:
Last Closed: 2016-07-27 15:31:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1519 0 normal SHIPPED_LIVE Critical: Red Hat JBoss Operations Network 3.3.6 update 2016-08-26 00:44:36 UTC

Description Filip Brychta 2016-04-07 11:39:22 UTC
+++ This bug was initially created as a clone of Bug #907897 +++

Description of problem:
This is very annoying in non-interactive mode (script is terminated). Null is a valid value returned by some methods, so pretty.print should print it without terminating the script.

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

How reproducible:
always

Steps to Reproduce:
1. ./rhq-cli.sh -s $yourRHQserverIP -p rhqadmin -u rhqadmin
2. pretty.print(null)

  
Actual results:
org.mozilla.javascript.EvaluatorException: The choice of Java method org.rhq.bindings.output.TabularWriter.print matching JavaScript argument types (null) is ambiguous; candidate methods are: 
    void print(java.lang.Object)
    void print(java.util.Map)
    void print(java.util.Collection)
    void print(org.rhq.core.domain.configuration.Configuration)
    void print(java.lang.Object[])
    void print(java.lang.String[][]) (<Unknown source>#1) in <Unknown source> at line number 1
pretty.print(null); 

Expected results:
null

--- Additional comment from John Sanda on 2015-11-18 14:17:00 EST ---

I saw that commit 8b540d7848a was pushed to fix this, but it resulted in a minor regression caught by some Jenkins test failures. I fixed the test failures with commit e1fa9edbe0.

Comment 8 Filip Brychta 2016-06-20 11:28:53 UTC
This is again broken in upstream - bz907897 comment2

Comment 10 Simeon Pinder 2016-07-07 08:22:57 UTC
Moving to ON_QA as available to test with the following build:
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=502442

Note: 	jon-server-patch-3.3.0.GA.zip maps to JON 3.3.6(jon-server-3.3.0.GA-update-06.zip)

Comment 12 errata-xmlrpc 2016-07-27 15:31:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-1519.html


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