Brian O'Connor

fixed typo and undeprecated a method

Change-Id: Ia15c4df9978ac66d4cd5288f9462d3238958893e
...@@ -58,7 +58,6 @@ public abstract class Intent { ...@@ -58,7 +58,6 @@ public abstract class Intent {
58 * @param appId application identifier 58 * @param appId application identifier
59 * @param resources required network resources (optional) 59 * @param resources required network resources (optional)
60 */ 60 */
61 - @Deprecated
62 protected Intent(ApplicationId appId, 61 protected Intent(ApplicationId appId,
63 Collection<NetworkResource> resources) { 62 Collection<NetworkResource> resources) {
64 this(appId, null, resources); 63 this(appId, null, resources);
......
...@@ -24,11 +24,11 @@ import java.util.List; ...@@ -24,11 +24,11 @@ import java.util.List;
24 import static com.google.common.base.Preconditions.checkNotNull; 24 import static com.google.common.base.Preconditions.checkNotNull;
25 25
26 // TODO: Reconsider error handling and intent exception design. Otherwise, write Javadoc. 26 // TODO: Reconsider error handling and intent exception design. Otherwise, write Javadoc.
27 -public class FlowRuleBatchOperationConvertionException extends IntentException { 27 +public class FlowRuleBatchOperationConversionException extends IntentException {
28 28
29 private final List<FlowRuleBatchOperation> converted; 29 private final List<FlowRuleBatchOperation> converted;
30 30
31 - public FlowRuleBatchOperationConvertionException(List<FlowRuleBatchOperation> converted, Throwable cause) { 31 + public FlowRuleBatchOperationConversionException(List<FlowRuleBatchOperation> converted, Throwable cause) {
32 super("exception occurred during IntentInstaller.install()", cause); 32 super("exception occurred during IntentInstaller.install()", cause);
33 this.converted = ImmutableList.copyOf((checkNotNull(converted))); 33 this.converted = ImmutableList.copyOf((checkNotNull(converted)));
34 } 34 }
......
...@@ -49,7 +49,7 @@ class Installing implements IntentUpdate { ...@@ -49,7 +49,7 @@ class Installing implements IntentUpdate {
49 // TODO: call FlowRuleService API to push FlowRules and track resources, 49 // TODO: call FlowRuleService API to push FlowRules and track resources,
50 // which the submitted intent will use. 50 // which the submitted intent will use.
51 return Optional.of(new Installed(intentManager, intent, installables, converted)); 51 return Optional.of(new Installed(intentManager, intent, installables, converted));
52 - } catch (FlowRuleBatchOperationConvertionException e) { 52 + } catch (FlowRuleBatchOperationConversionException e) {
53 log.warn("Unable to install intent {} due to:", intent.id(), e.getCause()); 53 log.warn("Unable to install intent {} due to:", intent.id(), e.getCause());
54 return Optional.of(new InstallingFailed(intentManager, intent, installables, e.converted())); 54 return Optional.of(new InstallingFailed(intentManager, intent, installables, e.converted()));
55 } 55 }
......
...@@ -437,7 +437,7 @@ public class IntentManager ...@@ -437,7 +437,7 @@ public class IntentManager
437 registerSubclassInstallerIfNeeded(installable); 437 registerSubclassInstallerIfNeeded(installable);
438 batches.addAll(getInstaller(installable).install(installable)); 438 batches.addAll(getInstaller(installable).install(installable));
439 } catch (Exception e) { // TODO this should be IntentException 439 } catch (Exception e) { // TODO this should be IntentException
440 - throw new FlowRuleBatchOperationConvertionException(batches, e); 440 + throw new FlowRuleBatchOperationConversionException(batches, e);
441 } 441 }
442 } 442 }
443 return batches; 443 return batches;
......