Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Navigate to an existing DG or create a new one 2. Enter the string "999999999999999999999999999" into the Recalculation Interval field. 3. View results Actual results: Failure in datasource while processing UPDATE request. java.lang.NumberFormatException:For input string: "1e+27" --- STACK TRACE FOLLOWS --- For input string: "1e+27" at Unknown.java_lang_NumberFormatException_$NumberFormatException__Ljava_lang_NumberFormatException_2Ljava_lang_String_2Ljava_lang_NumberFormatException_2(Unknown source:0) at Unknown.java_lang_Long_parseLong__Ljava_lang_String_2IJ(Unknown source:0) at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_GroupDefinitionDataSource_$copyValues__Lorg_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_GroupDefinitionDataSource_2Lcom_smartgwt_client_data_Record_2Lorg_rhq_core_domain_resource_group_GroupDefinition_2(Unknown source:0) at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_GroupDefinitionDataSource_executeUpdate__Lcom_smartgwt_client_data_Record_2Lcom_smartgwt_client_data_Record_2Lcom_smartgwt_client_data_DSRequest_2Lcom_smartgwt_client_data_DSResponse_2V(Unknown source:0) at Unknown.org_rhq_enterprise_gui_coregui_client_util_RPCDataSource_transformRequest__Lcom_smartgwt_client_data_DSRequest_2Ljava_lang_Object_2(Unknown source:0) at Unknown.anonymous(Unknown source:0) at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0) at Unknown.anonymous(Unknown source:0) at Unknown.isc_DataSource_getServiceInputs(Unknown source:0) at Unknown.isc_DataSource_sendDSRequest(Unknown source:0) at Unknown.isc_DataSource_performDSOperation(Unknown source:0) at Unknown.anonymous(Unknown source:0) at Unknown.anonymous(Unknown source:0) at Unknown.com_smartgwt_client_widgets_form_DynamicForm_$saveData__Lcom_smartgwt_client_widgets_form_DynamicForm_2Lcom_smartgwt_client_data_DSCallback_2V(Unknown source:0) at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView_$saveForm__Lorg_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView_2Lorg_rhq_enterprise_gui_coregui_client_util_selenium_LocatableDynamicForm_2Lorg_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView$DynaGroupChildrenView_2ZV(Unknown source:0) at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_definitions_SingleGroupDefinitionView$1_onClick__Lcom_smartgwt_client_widgets_events_ClickEvent_2V(Unknown source:0) at Unknown.com_smartgwt_client_widgets_events_ClickEvent_dispatch__Lcom_google_gwt_event_shared_EventHandler_2V(Unknown source:0) at Unknown.com_google_gwt_event_shared_HandlerManager$HandlerRegistry_$fireEvent__Lcom_google_gwt_event_shared_HandlerManager$HandlerRegistry_2Lcom_google_gwt_event_shared_GwtEvent_2ZV(Unknown source:0) at Unknown.com_google_gwt_event_shared_HandlerManager_$fireEvent__Lcom_google_gwt_event_shared_HandlerManager_2Lcom_google_gwt_event_shared_GwtEvent_2V(Unknown source:0) at Unknown.com_smartgwt_client_widgets_BaseWidget_fireEvent__Lcom_google_gwt_event_shared_GwtEvent_2V(Unknown source:0) at Unknown.anonymous(Unknown source:0) at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0) at Unknown.anonymous(Unknown source:0) at Unknown.isc_StatefulCanvas_handleActivate(Unknown source:0) at Unknown.isc_StatefulCanvas_handleClick(Unknown source:0) at Unknown.isc_c_EventHandler_bubbleEvent(Unknown source:0) at Unknown.isc_c_EventHandler_handleClick(Unknown source:0) at Unknown.isc_c_EventHandler__handleMouseUp(Unknown source:0) at Unknown.isc_c_EventHandler_handleMouseUp(Unknown source:0) at Unknown.isc_c_EventHandler_dispatch(Unknown source:0) at Unknown.anonymous(Unknown source:0) at Unknown.anonymous(Unknown source:0) Expected results: Some upper bounding on numbers entered into this field. Additional info:
while we aer in here, lets see if we can fix the units. We have it where you have to enter milliseconds, which is pretty annoying. Perhaps we can allow differrent units or change the default units to something more realistic, like minutes. Under the covers we can convert to milliseconds when we pass the value to the server.
I did change the units to minutes (from ms) and kept the representation in the database as milliseconds as I didn't want to break any existing functionality based on those tables. The view shows in minutes and the database is still in millis. I originally started out using various units (via DurationItem), however, things got a little complicated with min/max ranges in the various units so I dropped back to minutes as an acceptable UOM. As indicated, this fulfills the requirement and is simpler/cleaner unless multiple UOM are required. Current maximum set to 1 week (60 * 24 * 7 minutes). I also changed the current resource bundle (Messages.properties) to read (min) instead of (ms) however, i didn't change the other language bundles to reflect the language changes. These changes are in the features/gwt-upgrade branch.
These changes are not in master yet (in feature/gwt-upgrade) so I will leave the status as ON_DEV.
Git commit id: 5754205
Now in master. Also commented out other foreign resource bundles for re-translation. commit: 223f5fd
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.