@Test void getDefaultAddress_isBlankThrowsException() throws Exception { TestUtils.setEnvironmentVariable(Address.SOCKET_ENV_VARIABLE, ""); try { Address.getDefaultAddress(); fail(); } catch (Exception e) { assertEquals("Endpoint Socket Address Environment Variable is not set: SPIFFE_ENDPOINT_SOCKET", e.getMessage()); } }
public static String getDefaultAddress() { String address = System.getenv(Address.SOCKET_ENV_VARIABLE); if (StringUtils.isBlank(address)) { String error = String.format("Endpoint Socket Address Environment Variable is not set: %s", SOCKET_ENV_VARIABLE); throw new IllegalStateException(error); } return address; }
Address { public static String getDefaultAddress() { String address = System.getenv(Address.SOCKET_ENV_VARIABLE); if (StringUtils.isBlank(address)) { String error = String.format("Endpoint Socket Address Environment Variable is not set: %s", SOCKET_ENV_VARIABLE); throw new IllegalStateException(error); } return address; } }
Address { public static String getDefaultAddress() { String address = System.getenv(Address.SOCKET_ENV_VARIABLE); if (StringUtils.isBlank(address)) { String error = String.format("Endpoint Socket Address Environment Variable is not set: %s", SOCKET_ENV_VARIABLE); throw new IllegalStateException(error); } return address; } private  Address(); }
Address { public static String getDefaultAddress() { String address = System.getenv(Address.SOCKET_ENV_VARIABLE); if (StringUtils.isBlank(address)) { String error = String.format("Endpoint Socket Address Environment Variable is not set: %s", SOCKET_ENV_VARIABLE); throw new IllegalStateException(error); } return address; } private  Address(); static String getDefaultAddress(); static URI parseAddress(@NonNull final String address); }
Address { public static String getDefaultAddress() { String address = System.getenv(Address.SOCKET_ENV_VARIABLE); if (StringUtils.isBlank(address)) { String error = String.format("Endpoint Socket Address Environment Variable is not set: %s", SOCKET_ENV_VARIABLE); throw new IllegalStateException(error); } return address; } private  Address(); static String getDefaultAddress(); static URI parseAddress(@NonNull final String address); static final String SOCKET_ENV_VARIABLE; }