[ https://issues.apache.org/jira/browse/CLOUDSTACK-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14215799#comment-14215799 ]
ASF GitHub Bot commented on CLOUDSTACK-7930: -------------------------------------------- Github user karuturi commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/41#discussion_r20488370 --- Diff: server/src/com/cloud/configuration/ConfigurationManagerImpl.java --- @@ -725,6 +725,21 @@ private String validateConfigurationValue(String name, String value, String scop type = c.getType(); } + String errMsg = null; + try { + if (type.equals(Integer.class)) { + errMsg = "There was error in trying to parse value: " + value + ". Please enter a valid integer value for parameter " + name; + Integer.parseInt(value); + } else if (type.equals(Float.class)) { + errMsg = "There was error in trying to parse value: " + value + ". Please enter a valid float value for parameter " + name; + Float.parseFloat(value); --- End diff -- should we allow values like "3,400.5" ? > Do not allow to set invalid values for global settings which are of type > Integer, Float > --------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-7930 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7930 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Anshul Gangwar > Assignee: Anshul Gangwar > Priority: Critical > Fix For: 4.5.0 > > > Setting Integer/Float/Boolean to invalid values results in > NullPointerException, NumberFormatException later in code. > In case of network.throttling.rate parameter set to null results in deploy VM > failure with message of null and no other exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332)