Brian O'Connor

fixed typo and undeprecated a method

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