Inline static factory methods in BandwidthResource

Change-Id: I8ac7fbaea5c81c9558f88f6ac88bcf581466d073
diff --git a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
index 387ba44..b17d04c 100644
--- a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
@@ -24,6 +24,7 @@
 import org.apache.karaf.shell.commands.Option;
 import org.onlab.packet.Ip6Address;
 import org.onlab.packet.IpAddress;
+import org.onlab.util.Bandwidth;
 import org.onosproject.cli.AbstractShellCommand;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
@@ -306,8 +307,8 @@
 
         // Check for a bandwidth specification
         if (!isNullOrEmpty(bandwidthString)) {
-            final double bandwidthValue = Double.parseDouble(bandwidthString);
-            constraints.add(new BandwidthConstraint(BandwidthResource.bps(bandwidthValue)));
+            final Bandwidth bandwidth = Bandwidth.bps(Double.parseDouble(bandwidthString));
+            constraints.add(new BandwidthConstraint(new BandwidthResource(bandwidth)));
         }
 
         // Check for a lambda specification