Bug 730088 - Strings are allowed on integer part while doing import operation
Summary: Strings are allowed on integer part while doing import operation
Keywords:
Status: CLOSED DUPLICATE of bug 730335
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium vote
Target Milestone: ---
: ---
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 730335
Blocks: 707232
TreeView+ depends on / blocked
 
Reported: 2011-08-11 18:02 UTC by Jeeva Kandasamy
Modified: 2011-11-18 08:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-18 08:05:48 UTC


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

Description Jeeva Kandasamy 2011-08-11 18:02:54 UTC
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 14:22:49 UTC
Added a dependency on bug 730335, which describes the underlying cause of this.

Comment 2 Lukas Krejci 2011-11-18 08:05:48 UTC
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.