X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fservices%2FAbstractRequestCallback.java;h=4544e933f9bb983a7c0b7cc943d5a265ebb615c2;hb=777c94332871b8c34f56f7f2010de1536cb759ba;hp=a146d8bda3b199657b66e8581595399f23c8a0f0;hpb=9764631013ed7b092f9e9224c129ca874805b96a;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractRequestCallback.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractRequestCallback.java index a146d8bda3..4544e933f9 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractRequestCallback.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractRequestCallback.java @@ -20,7 +20,7 @@ import org.opendaylight.openflowplugin.impl.services.util.RequestContextUtil; import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.Error; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader; -import org.opendaylight.yangtools.yang.common.RpcError; +import org.opendaylight.yangtools.yang.common.ErrorType; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; @@ -28,7 +28,7 @@ public abstract class AbstractRequestCallback implements FutureCallback context; private final Class requestType; private final MessageSpy spy; - private EventIdentifier eventIdentifier; + private final EventIdentifier eventIdentifier; AbstractRequestCallback(final RequestContext context, final Class requestType, @@ -54,7 +54,7 @@ public abstract class AbstractRequestCallback implements FutureCallback builder; if (null != eventIdentifier) { EventsTimeCounter.markEnd(eventIdentifier); @@ -65,16 +65,16 @@ public abstract class AbstractRequestCallback implements FutureCallbackfailed().withError(RpcError.ErrorType.APPLICATION, errorString, throwable); + builder = RpcResultBuilder.failed().withError(ErrorType.APPLICATION, errorString, throwable); spyMessage(StatisticsGroup.TO_SWITCH_SUBMIT_FAILURE); } else { if (throwable != null) { builder = RpcResultBuilder.failed() - .withError(RpcError.ErrorType.APPLICATION, throwable.getMessage(), throwable); + .withError(ErrorType.APPLICATION, throwable.getMessage(), throwable); } else { Throwable deviceReadFailedThrowable = new Throwable("Failed to read from device."); builder = RpcResultBuilder.failed() - .withError(RpcError.ErrorType.APPLICATION, deviceReadFailedThrowable.getMessage(), + .withError(ErrorType.APPLICATION, deviceReadFailedThrowable.getMessage(), deviceReadFailedThrowable); } spyMessage(StatisticsGroup.TO_SWITCH_SUBMIT_ERROR);