Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4c27eea authored by Cody Kesting's avatar Cody Kesting
Browse files

Change Exception class references to use Class.getName().

This CL updates references to fully qualified Exception names (such as
"java.lang.RuntimeException") to get the Exception name through the
Exception's Class Object (e.g. RuntimeException.class.getName()).

Bug: 163433613
Test: atest FrameworksVcntests
Change-Id: I1ceccedda0a513a8c41caaef752d9f0005eceac0
parent 901dc86e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -969,7 +969,7 @@ public class VcnGatewayConnection extends StateMachine {
            mGatewayStatusCallback.onGatewayConnectionError(
                    mConnectionConfig.getRequiredUnderlyingCapabilities(),
                    VCN_ERROR_CODE_INTERNAL_ERROR,
                    "java.lang.RuntimeException",
                    RuntimeException.class.getName(),
                    "Received "
                            + exception.getClass().getSimpleName()
                            + " with message: "
@@ -991,11 +991,11 @@ public class VcnGatewayConnection extends StateMachine {
        } else if (exception instanceof IkeInternalException
                && exception.getCause() instanceof IOException) {
            errorCode = VCN_ERROR_CODE_NETWORK_ERROR;
            exceptionClass = "java.io.IOException";
            exceptionClass = IOException.class.getName();
            exceptionMessage = exception.getCause().getMessage();
        } else {
            errorCode = VCN_ERROR_CODE_INTERNAL_ERROR;
            exceptionClass = "java.lang.RuntimeException";
            exceptionClass = RuntimeException.class.getName();
            exceptionMessage =
                    "Received "
                            + exception.getClass().getSimpleName()
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ public class VcnManagerTest {
        cbBinder.onGatewayConnectionError(
                UNDERLYING_NETWORK_CAPABILITIES,
                VcnManager.VCN_ERROR_CODE_NETWORK_ERROR,
                "java.net.UnknownHostException",
                UnknownHostException.class.getName(),
                "exception_message");
        verify(mMockStatusCallback)
                .onGatewayConnectionError(