jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds] JCLOUDS-642: InternalUrl fallback (#462)
Date Fri, 01 Aug 2014 19:46:43 GMT
>   */
>  @Singleton
>  public class InternalURL implements EndpointToSupplierURI {
>     @Override
>     public Supplier<URI> apply(Endpoint input) {
> -      return Suppliers.ofInstance(input.getInternalURL());
> +      return Suppliers.ofInstance(input.getInternalURL() != null ? input.getInternalURL()
: input.getPublicURL());

Could also be [`MoreObjects.firstNonNull`](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/MoreObjects.html#firstNonNull\(T,
T\))

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/462/files#r15715147
Mime
View raw message