@Override public URI getCredentialsEndpoint() throws URISyntaxException { String fullUri = System.getenv(CONTAINER_CREDENTIALS_FULL_URI); if (fullUri == null || fullUri.length() == 0) { throw new SdkClientException("The environment variable " + CONTAINER_CREDENTIALS_FULL_URI + " is empty"); } URI uri = new URI(fullUri); if (!ALLOWED_FULL_URI_HOSTS.contains(uri.getHost())) { throw new SdkClientException("The full URI (" + uri + ") contained withing environment variable " + CONTAINER_CREDENTIALS_FULL_URI + " has an invalid host. Host can only be one of [" + CollectionUtils.join(ALLOWED_FULL_URI_HOSTS, ", ") + "]"); } return uri; }
@SdkInternalApi void fillInStackTrace(Class<?> interfaceClass) { if (stackTraces != null) { final List<StackTraceElement> elements = new ArrayList<StackTraceElement>(); for (List<String> stackTrace : stackTraces) { final String methodName = CollectionUtils.join(stackTrace, ",").trim(); elements.add(new StackTraceElement(interfaceClass.getName(), methodName, null, -1)); } this.setStackTrace(elements.toArray(new StackTraceElement[elements.size()])); } if (getCause() != null) { getCause().fillInStackTrace(interfaceClass); } } }
@Override public URI getCredentialsEndpoint() throws URISyntaxException { String fullUri = System.getenv(CONTAINER_CREDENTIALS_FULL_URI); if (fullUri == null || fullUri.length() == 0) { throw new SdkClientException("The environment variable " + CONTAINER_CREDENTIALS_FULL_URI + " is empty"); } URI uri = new URI(fullUri); if (!ALLOWED_FULL_URI_HOSTS.contains(uri.getHost())) { throw new SdkClientException("The full URI (" + uri + ") contained withing environment variable " + CONTAINER_CREDENTIALS_FULL_URI + " has an invalid host. Host can only be one of [" + CollectionUtils.join(ALLOWED_FULL_URI_HOSTS, ", ") + "]"); } return uri; }
@Override public URI getCredentialsEndpoint() throws URISyntaxException { String fullUri = System.getenv(CONTAINER_CREDENTIALS_FULL_URI); if (fullUri == null || fullUri.length() == 0) { throw new SdkClientException("The environment variable " + CONTAINER_CREDENTIALS_FULL_URI + " is empty"); } URI uri = new URI(fullUri); if (!ALLOWED_FULL_URI_HOSTS.contains(uri.getHost())) { throw new SdkClientException("The full URI (" + uri + ") contained withing environment variable " + CONTAINER_CREDENTIALS_FULL_URI + " has an invalid host. Host can only be one of [" + CollectionUtils.join(ALLOWED_FULL_URI_HOSTS, ", ") + "]"); } return uri; }
@SdkInternalApi void fillInStackTrace(Class<?> interfaceClass) { if (stackTraces != null) { final List<StackTraceElement> elements = new ArrayList<StackTraceElement>(); for (List<String> stackTrace : stackTraces) { final String methodName = CollectionUtils.join(stackTrace, ",").trim(); elements.add(new StackTraceElement(interfaceClass.getName(), methodName, null, -1)); } this.setStackTrace(elements.toArray(new StackTraceElement[elements.size()])); } if (getCause() != null) { getCause().fillInStackTrace(interfaceClass); } } }