Bug 730088 - Strings are allowed on integer part while doing import operation
Strings are allowed on integer part while doing import operation
Status: CLOSED DUPLICATE of bug 730335
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
x86_64 Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: Lukas Krejci
Mike Foley
Depends On: 730335
Blocks: 707232
  Show dependency treegraph
Reported: 2011-08-11 14:02 EDT by Jeeva Kandasamy
Modified: 2011-11-18 03:05 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-11-18 03:05:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Screen shot (49.48 KB, image/jpeg)
2011-08-11 14:02 EDT, Jeeva Kandasamy
no flags Details

  None (edit)
Description Jeeva Kandasamy 2011-08-11 14:02:54 EDT
Created attachment 517855 [details]
Screen shot

Description of problem:
If we put string on integer data type should be restricted/throw exception. I Changed 'ALERT_PURGE' value from integer to String and imported to RHQ server. There is no validation on server CLI side! String directly inserted in to database and GUI throws exception!

Version-Release number of selected component (if applicable):
RHQ 4.1.0 Beta #47

How reproducible:

Import settings from RHQ server via CLI,

var ex = SynchronizationManager.exportAllSubsystems();
saveBytesToFile(ex.exportFile, 'export.xml.gz');

unpack the .gz pack and change the ALERT_PURGE to string and pack it then do import.

var data = getFileBytes('export.xml.gz');
SynchronizationManager.importAllSubsystems(data, null);

Actual results:
String updated successfully

Expected results:
Should report immediate exception/error message on CLI.

Additional info: Screen shots are attached
Comment 1 Lukas Krejci 2011-08-12 10:22:49 EDT
Added a dependency on bug 730335, which describes the underlying cause of this.
Comment 2 Lukas Krejci 2011-11-18 03:05:48 EST
Bug 730335 has been fixed with verification steps replicating this bug.

*** This bug has been marked as a duplicate of bug 730335 ***

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