Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 086A5171DB for ; Wed, 26 Aug 2015 06:22:22 +0000 (UTC) Received: (qmail 64127 invoked by uid 500); 26 Aug 2015 06:22:21 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 64070 invoked by uid 500); 26 Aug 2015 06:22:21 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 64058 invoked by uid 99); 26 Aug 2015 06:22:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2015 06:22:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CFA62E03E6; Wed, 26 Aug 2015 06:22:20 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: Quota master Content-Type: text/plain Message-Id: <20150826062220.CFA62E03E6@git1-us-west.apache.org> Date: Wed, 26 Aug 2015 06:22:20 +0000 (UTC) Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/689#discussion_r37949568 --- Diff: server/src/com/cloud/api/dispatch/ParamProcessWorker.java --- @@ -294,6 +294,14 @@ private void setFieldValue(final Field field, final BaseCmd cmdObj, final Object field.set(cmdObj, Float.valueOf(paramObj.toString())); } break; + case DOUBLE: + // Assuming that the parameters have been checked for required before now, + // we ignore blank or null values and defer to the command to set a default + // value for optional parameters ... + if (paramObj != null && isNotBlank(paramObj.toString())) { --- End diff -- Consider using ``com.google.common.base.Strings#isNullorEmpty`` method which consolidates the null and blank checks. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---