Summary: Fix NPE when calling createFirewallRule Detail: CreateFirewallRuleCmd.java was returning 'null' for getTrafficType(). Recently, getTrafficType started being used by createIngressFirewallRule. Changing getTrafficType() to return ingress per Jayapal Reddy.
BUG-ID: CLOUDSTACK-1168 Bugfix-for: master,4.1 Signed-off-by: Marcus Sorensen <[email protected]> 1360170916 -0700 Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ec6fdc74 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ec6fdc74 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ec6fdc74 Branch: refs/heads/vim51_win8 Commit: ec6fdc7471a327a30c16426012a6132fab4e40a2 Parents: dc7578c Author: Marcus Sorensen <[email protected]> Authored: Wed Feb 6 10:15:16 2013 -0700 Committer: Marcus Sorensen <[email protected]> Committed: Wed Feb 6 10:15:16 2013 -0700 ---------------------------------------------------------------------- .../user/firewall/CreateFirewallRuleCmd.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ec6fdc74/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java index d0c49ff..b7cb471 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java @@ -324,7 +324,7 @@ public class CreateFirewallRuleCmd extends BaseAsyncCreateCmd implements Firewal @Override public TrafficType getTrafficType() { - return null; + return FirewallRule.TrafficType.Ingress; } }
