diff --git a/core/src/main/java/org/jclouds/Utils.java b/core/src/main/java/org/jclouds/Utils.java index b673b62064..95928a43eb 100644 --- a/core/src/main/java/org/jclouds/Utils.java +++ b/core/src/main/java/org/jclouds/Utils.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/command/FutureCommand.java b/core/src/main/java/org/jclouds/command/FutureCommand.java index ead4b712fe..7aeea7b049 100644 --- a/core/src/main/java/org/jclouds/command/FutureCommand.java +++ b/core/src/main/java/org/jclouds/command/FutureCommand.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/command/FutureCommandClient.java b/core/src/main/java/org/jclouds/command/FutureCommandClient.java index cdf57d7c8c..f365233c8e 100644 --- a/core/src/main/java/org/jclouds/command/FutureCommandClient.java +++ b/core/src/main/java/org/jclouds/command/FutureCommandClient.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionHandle.java b/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionHandle.java index a2591cc610..e0d023abf8 100644 --- a/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionHandle.java +++ b/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionHandle.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPool.java b/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPool.java index 38a3c28941..a3bbaa4e29 100644 --- a/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPool.java +++ b/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPool.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPoolClient.java b/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPoolClient.java index cf612f3262..1fe4fc4cf2 100644 --- a/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPoolClient.java +++ b/core/src/main/java/org/jclouds/command/pool/FutureCommandConnectionPoolClient.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/command/pool/PoolConstants.java b/core/src/main/java/org/jclouds/command/pool/PoolConstants.java index 2e27309b02..06a492f60e 100644 --- a/core/src/main/java/org/jclouds/command/pool/PoolConstants.java +++ b/core/src/main/java/org/jclouds/command/pool/PoolConstants.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/command/pool/config/FutureCommandConnectionPoolClientModule.java b/core/src/main/java/org/jclouds/command/pool/config/FutureCommandConnectionPoolClientModule.java index f9c1ecac0f..3757012a49 100644 --- a/core/src/main/java/org/jclouds/command/pool/config/FutureCommandConnectionPoolClientModule.java +++ b/core/src/main/java/org/jclouds/command/pool/config/FutureCommandConnectionPoolClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/HttpConstants.java b/core/src/main/java/org/jclouds/http/HttpConstants.java index 71d176fada..862cbe5213 100644 --- a/core/src/main/java/org/jclouds/http/HttpConstants.java +++ b/core/src/main/java/org/jclouds/http/HttpConstants.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/HttpException.java b/core/src/main/java/org/jclouds/http/HttpException.java index 62f8685c63..cb1070e7ad 100644 --- a/core/src/main/java/org/jclouds/http/HttpException.java +++ b/core/src/main/java/org/jclouds/http/HttpException.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/HttpFutureCommand.java b/core/src/main/java/org/jclouds/http/HttpFutureCommand.java index a20c0649ba..049227a54b 100644 --- a/core/src/main/java/org/jclouds/http/HttpFutureCommand.java +++ b/core/src/main/java/org/jclouds/http/HttpFutureCommand.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/HttpFutureCommandClient.java b/core/src/main/java/org/jclouds/http/HttpFutureCommandClient.java index 3438696084..a6b69564da 100644 --- a/core/src/main/java/org/jclouds/http/HttpFutureCommandClient.java +++ b/core/src/main/java/org/jclouds/http/HttpFutureCommandClient.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/HttpRequest.java b/core/src/main/java/org/jclouds/http/HttpRequest.java index 31ccb9089d..3d51b40904 100644 --- a/core/src/main/java/org/jclouds/http/HttpRequest.java +++ b/core/src/main/java/org/jclouds/http/HttpRequest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/HttpRequestFilter.java b/core/src/main/java/org/jclouds/http/HttpRequestFilter.java index d8d06f67f2..8c12b0f905 100644 --- a/core/src/main/java/org/jclouds/http/HttpRequestFilter.java +++ b/core/src/main/java/org/jclouds/http/HttpRequestFilter.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/HttpResponse.java b/core/src/main/java/org/jclouds/http/HttpResponse.java index a3a17f06b4..0f7a52fcc8 100644 --- a/core/src/main/java/org/jclouds/http/HttpResponse.java +++ b/core/src/main/java/org/jclouds/http/HttpResponse.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/JavaUrlHttpFutureCommandClient.java b/core/src/main/java/org/jclouds/http/JavaUrlHttpFutureCommandClient.java index 269e365ef1..b37c792e0c 100644 --- a/core/src/main/java/org/jclouds/http/JavaUrlHttpFutureCommandClient.java +++ b/core/src/main/java/org/jclouds/http/JavaUrlHttpFutureCommandClient.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one @@ -23,9 +23,10 @@ */ package org.jclouds.http; +import static com.google.common.base.Preconditions.checkNotNull; + import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -39,7 +40,6 @@ import java.util.List; import javax.annotation.Resource; import org.apache.commons.io.IOUtils; -import org.jclouds.Utils; import org.jclouds.logging.Logger; import com.google.inject.Inject; @@ -53,7 +53,7 @@ public class JavaUrlHttpFutureCommandClient implements HttpFutureCommandClient { private URL target; private List requestFilters = Collections.emptyList(); @Resource - private Logger logger = Logger.NULL; + protected Logger logger = Logger.NULL; public List getRequestFilters() { return requestFilters; @@ -71,7 +71,7 @@ public class JavaUrlHttpFutureCommandClient implements HttpFutureCommandClient { } public void submit(HttpFutureCommand command) { - HttpRequest request = (HttpRequest) command.getRequest(); + HttpRequest request = command.getRequest(); HttpURLConnection connection = null; try { for (HttpRequestFilter filter : getRequestFilters()) { @@ -79,56 +79,23 @@ public class JavaUrlHttpFutureCommandClient implements HttpFutureCommandClient { } HttpResponse response = null; for (;;) { - try { - logger.trace("%1s - converting request %2s", target, - request); - connection = openJavaConnection(request); - logger.trace("%1s - submitting request %2s", target, - connection); - response = getResponse(connection); - logger.trace("%1s - received response %2s", target, - response); - if (request.isReplayable() - && response.getStatusCode() >= 500) { - logger.info("resubmitting command: %1s", command); - continue; - } - break; - } catch (IOException e) { - if (request.isReplayable() - && e.getMessage().indexOf( - "Server returned HTTP response code: 5") >= 0) { - logger.info("resubmitting command: %1s", command); - continue; - } - throw e; + logger.trace("%1s - converting request %2s", target, request); + connection = openJavaConnection(request); + logger + .trace("%1s - submitting request %2s", target, + connection); + response = getResponse(connection); + logger.trace("%1s - received response %2s", target, response); + if (command.getRequest().isReplayable() + && response.getStatusCode() >= 500) { + logger.info("resubmitting command: %1s", command); + continue; } + break; } command.getResponseFuture().setResponse(response); command.getResponseFuture().run(); - } catch (FileNotFoundException e) { - HttpResponse response = new HttpResponse(); - response.setStatusCode(404); - command.getResponseFuture().setResponse(response); - command.getResponseFuture().run(); } catch (Exception e) { - if (connection != null) { - StringBuilder errors = new StringBuilder(); - try { - for (InputStream in : new InputStream[] { - connection.getErrorStream(), - connection.getInputStream() }) { - if (in != null) { - errors.append(Utils.toStringAndClose(in)).append( - "\n"); - } - } - logger.error(e, - "error encountered during the exception: %1s", - errors.toString()); - } catch (IOException e2) { - } - } command.setException(e); } finally { // DO NOT disconnect, as it will also close the unconsumed @@ -138,9 +105,20 @@ public class JavaUrlHttpFutureCommandClient implements HttpFutureCommandClient { } } - private HttpResponse getResponse(HttpURLConnection connection) + protected HttpResponse getResponse(HttpURLConnection connection) throws IOException { HttpResponse response = new HttpResponse(); + InputStream in; + try { + in = connection.getInputStream(); + } catch (IOException e) { + in = connection.getErrorStream(); + } + if (in != null) { + response.setContent(in); + response.setContentType(connection + .getHeaderField(HttpConstants.CONTENT_TYPE)); + } response.setStatusCode(connection.getResponseCode()); for (String header : connection.getHeaderFields().keySet()) { response.getHeaders().putAll(header, @@ -148,15 +126,10 @@ public class JavaUrlHttpFutureCommandClient implements HttpFutureCommandClient { } response.setMessage(connection.getResponseMessage()); - if (!connection.getRequestMethod().equals("HEAD")) { - response.setContent(connection.getInputStream()); - response.setContentType(connection - .getHeaderField(HttpConstants.CONTENT_TYPE)); - } return response; } - private HttpURLConnection openJavaConnection(HttpRequest request) + protected HttpURLConnection openJavaConnection(HttpRequest request) throws IOException { URL url = new URL(target, request.getUri()); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); @@ -169,8 +142,9 @@ public class JavaUrlHttpFutureCommandClient implements HttpFutureCommandClient { connection.setRequestProperty(header, value); } if (request.getContent() != null) { - connection.setRequestProperty(HttpConstants.CONTENT_TYPE, request - .getContentType()); + connection.setRequestProperty(HttpConstants.CONTENT_TYPE, + checkNotNull(request.getContentType(), + "request.getContentType()")); OutputStream out = connection.getOutputStream(); try { if (request.getContent() instanceof String) { diff --git a/core/src/main/java/org/jclouds/http/commands/CommandFactory.java b/core/src/main/java/org/jclouds/http/commands/CommandFactory.java index 12ce9760d4..45d0c30b1d 100644 --- a/core/src/main/java/org/jclouds/http/commands/CommandFactory.java +++ b/core/src/main/java/org/jclouds/http/commands/CommandFactory.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/GetAndParseSax.java b/core/src/main/java/org/jclouds/http/commands/GetAndParseSax.java index 4b84c9bb71..ac09ba4d27 100644 --- a/core/src/main/java/org/jclouds/http/commands/GetAndParseSax.java +++ b/core/src/main/java/org/jclouds/http/commands/GetAndParseSax.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/GetString.java b/core/src/main/java/org/jclouds/http/commands/GetString.java index 51813fd214..01bb0b1473 100644 --- a/core/src/main/java/org/jclouds/http/commands/GetString.java +++ b/core/src/main/java/org/jclouds/http/commands/GetString.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/Head.java b/core/src/main/java/org/jclouds/http/commands/Head.java index e5c5c12f1f..5a1164959e 100644 --- a/core/src/main/java/org/jclouds/http/commands/Head.java +++ b/core/src/main/java/org/jclouds/http/commands/Head.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/callables/ReturnStringIf200.java b/core/src/main/java/org/jclouds/http/commands/callables/ReturnStringIf200.java index 1cd52021c9..460a78b068 100644 --- a/core/src/main/java/org/jclouds/http/commands/callables/ReturnStringIf200.java +++ b/core/src/main/java/org/jclouds/http/commands/callables/ReturnStringIf200.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/callables/ReturnTrueIf200.java b/core/src/main/java/org/jclouds/http/commands/callables/ReturnTrueIf200.java index 41eec580cc..41a583cd6c 100644 --- a/core/src/main/java/org/jclouds/http/commands/callables/ReturnTrueIf200.java +++ b/core/src/main/java/org/jclouds/http/commands/callables/ReturnTrueIf200.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/callables/xml/ParseSax.java b/core/src/main/java/org/jclouds/http/commands/callables/xml/ParseSax.java index 5236a20915..7c2f619c6c 100644 --- a/core/src/main/java/org/jclouds/http/commands/callables/xml/ParseSax.java +++ b/core/src/main/java/org/jclouds/http/commands/callables/xml/ParseSax.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/callables/xml/config/SaxModule.java b/core/src/main/java/org/jclouds/http/commands/callables/xml/config/SaxModule.java index 2af5e82e93..7a2d283d74 100644 --- a/core/src/main/java/org/jclouds/http/commands/callables/xml/config/SaxModule.java +++ b/core/src/main/java/org/jclouds/http/commands/callables/xml/config/SaxModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/commands/config/HttpCommandsModule.java b/core/src/main/java/org/jclouds/http/commands/config/HttpCommandsModule.java index 074f993c29..b7eef218ee 100644 --- a/core/src/main/java/org/jclouds/http/commands/config/HttpCommandsModule.java +++ b/core/src/main/java/org/jclouds/http/commands/config/HttpCommandsModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/config/HttpFutureCommandClientModule.java b/core/src/main/java/org/jclouds/http/config/HttpFutureCommandClientModule.java index 81c31a0e3d..6423a31e46 100644 --- a/core/src/main/java/org/jclouds/http/config/HttpFutureCommandClientModule.java +++ b/core/src/main/java/org/jclouds/http/config/HttpFutureCommandClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/http/config/JavaUrlHttpFutureCommandClientModule.java b/core/src/main/java/org/jclouds/http/config/JavaUrlHttpFutureCommandClientModule.java index 3a0a05f392..c2b0c73ab5 100644 --- a/core/src/main/java/org/jclouds/http/config/JavaUrlHttpFutureCommandClientModule.java +++ b/core/src/main/java/org/jclouds/http/config/JavaUrlHttpFutureCommandClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one @@ -45,6 +45,10 @@ public class JavaUrlHttpFutureCommandClientModule extends AbstractModule { @Override protected void configure() { + bindClient(); + } + + protected void bindClient() { // note this is not threadsafe, so it cannot be singleton bind(HttpFutureCommandClient.class).to( JavaUrlHttpFutureCommandClient.class); diff --git a/core/src/main/java/org/jclouds/lifecycle/BaseLifeCycle.java b/core/src/main/java/org/jclouds/lifecycle/BaseLifeCycle.java index 2f7ea09a6f..9cbf949862 100644 --- a/core/src/main/java/org/jclouds/lifecycle/BaseLifeCycle.java +++ b/core/src/main/java/org/jclouds/lifecycle/BaseLifeCycle.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/lifecycle/Closer.java b/core/src/main/java/org/jclouds/lifecycle/Closer.java index cdbc545e50..ba0aefd71a 100644 --- a/core/src/main/java/org/jclouds/lifecycle/Closer.java +++ b/core/src/main/java/org/jclouds/lifecycle/Closer.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/lifecycle/LifeCycle.java b/core/src/main/java/org/jclouds/lifecycle/LifeCycle.java index 077d9e3471..88b3ed8149 100644 --- a/core/src/main/java/org/jclouds/lifecycle/LifeCycle.java +++ b/core/src/main/java/org/jclouds/lifecycle/LifeCycle.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java b/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java index 7c54d923cf..f20924bd04 100644 --- a/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java +++ b/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/BaseLogger.java b/core/src/main/java/org/jclouds/logging/BaseLogger.java index fb5b8a2c8c..fbe22a10b8 100644 --- a/core/src/main/java/org/jclouds/logging/BaseLogger.java +++ b/core/src/main/java/org/jclouds/logging/BaseLogger.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/Logger.java b/core/src/main/java/org/jclouds/logging/Logger.java index 6423a0c784..5cf34300bf 100644 --- a/core/src/main/java/org/jclouds/logging/Logger.java +++ b/core/src/main/java/org/jclouds/logging/Logger.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/NullLogger.java b/core/src/main/java/org/jclouds/logging/NullLogger.java index ce677075c0..3c9e4570a1 100644 --- a/core/src/main/java/org/jclouds/logging/NullLogger.java +++ b/core/src/main/java/org/jclouds/logging/NullLogger.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java b/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java index bf887aee89..cc299ecf90 100644 --- a/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java +++ b/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/config/LoggingModule.java b/core/src/main/java/org/jclouds/logging/config/LoggingModule.java index e82a355dff..ca4023193d 100644 --- a/core/src/main/java/org/jclouds/logging/config/LoggingModule.java +++ b/core/src/main/java/org/jclouds/logging/config/LoggingModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java b/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java index 7ccc800118..0579ca53c9 100644 --- a/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java +++ b/core/src/main/java/org/jclouds/logging/config/NullLoggingModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/jdk/JDKLogger.java b/core/src/main/java/org/jclouds/logging/jdk/JDKLogger.java index 5fcd7f0d4c..c96ce6ecce 100644 --- a/core/src/main/java/org/jclouds/logging/jdk/JDKLogger.java +++ b/core/src/main/java/org/jclouds/logging/jdk/JDKLogger.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java b/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java index cff19aceb3..cb4b48f1d0 100644 --- a/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java +++ b/core/src/main/java/org/jclouds/logging/jdk/config/JDKLoggingModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/guice/GuiceDebug.java b/core/src/test/java/org/jclouds/guice/GuiceDebug.java index 938b050f56..0701576a9d 100644 --- a/core/src/test/java/org/jclouds/guice/GuiceDebug.java +++ b/core/src/test/java/org/jclouds/guice/GuiceDebug.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/http/BaseHttpFutureCommandClientTest.java b/core/src/test/java/org/jclouds/http/BaseHttpFutureCommandClientTest.java index cd589562dd..dc85982b03 100644 --- a/core/src/test/java/org/jclouds/http/BaseHttpFutureCommandClientTest.java +++ b/core/src/test/java/org/jclouds/http/BaseHttpFutureCommandClientTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/http/JavaUrlHttpFutureCommandFutureCommandClientTest.java b/core/src/test/java/org/jclouds/http/JavaUrlHttpFutureCommandFutureCommandClientTest.java index 3b9b019d20..c90c8751c7 100644 --- a/core/src/test/java/org/jclouds/http/JavaUrlHttpFutureCommandFutureCommandClientTest.java +++ b/core/src/test/java/org/jclouds/http/JavaUrlHttpFutureCommandFutureCommandClientTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/http/commands/GetStringTest.java b/core/src/test/java/org/jclouds/http/commands/GetStringTest.java index 7967e7a4ef..a4940b5298 100644 --- a/core/src/test/java/org/jclouds/http/commands/GetStringTest.java +++ b/core/src/test/java/org/jclouds/http/commands/GetStringTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/http/commands/callables/ReturnStringIf200Test.java b/core/src/test/java/org/jclouds/http/commands/callables/ReturnStringIf200Test.java index 60dd6db36f..37884988b7 100644 --- a/core/src/test/java/org/jclouds/http/commands/callables/ReturnStringIf200Test.java +++ b/core/src/test/java/org/jclouds/http/commands/callables/ReturnStringIf200Test.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/http/commands/config/HttpCommandsModuleTest.java b/core/src/test/java/org/jclouds/http/commands/config/HttpCommandsModuleTest.java index be3d99f78a..1ac1831cb2 100644 --- a/core/src/test/java/org/jclouds/http/commands/config/HttpCommandsModuleTest.java +++ b/core/src/test/java/org/jclouds/http/commands/config/HttpCommandsModuleTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java b/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java index 84f3059572..0215dc7900 100644 --- a/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java +++ b/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java b/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java index 0a0f9c75a3..e8050670a2 100644 --- a/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java +++ b/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/HttpNioUtils.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/HttpNioUtils.java index 1e51b20263..d72dd947cc 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/HttpNioUtils.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/HttpNioUtils.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/HttpNioConnectionPoolClientModule.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/HttpNioConnectionPoolClientModule.java index 32823e324e..93c64e7388 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/HttpNioConnectionPoolClientModule.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/HttpNioConnectionPoolClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/BaseHttpNioConnectionPoolClientModule.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/BaseHttpNioConnectionPoolClientModule.java index 5fce93376e..37a9c49a00 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/BaseHttpNioConnectionPoolClientModule.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/BaseHttpNioConnectionPoolClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/NonSSLHttpNioConnectionPoolClientModule.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/NonSSLHttpNioConnectionPoolClientModule.java index bf56dada01..92933ee876 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/NonSSLHttpNioConnectionPoolClientModule.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/NonSSLHttpNioConnectionPoolClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/SSLHttpNioConnectionPoolClientModule.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/SSLHttpNioConnectionPoolClientModule.java index 584e6004af..297864dd93 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/SSLHttpNioConnectionPoolClientModule.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/internal/SSLHttpNioConnectionPoolClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolClient.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolClient.java index a944b9d3e7..7cd1088a1b 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolClient.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolClient.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionHandle.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionHandle.java index 37b80b5eb8..13332e1a57 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionHandle.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionHandle.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionPool.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionPool.java index fa6bc3fa16..aa43386a6e 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionPool.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandConnectionPool.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandExecutionHandler.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandExecutionHandler.java index bc7450d307..6e658686d0 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandExecutionHandler.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/HttpNioFutureCommandExecutionHandler.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/httpnio/src/test/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolFutureCommandClientTest.java b/extensions/httpnio/src/test/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolFutureCommandClientTest.java index 51510f2820..8ae053c677 100644 --- a/extensions/httpnio/src/test/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolFutureCommandClientTest.java +++ b/extensions/httpnio/src/test/java/org/jclouds/http/httpnio/pool/HttpNioConnectionPoolFutureCommandClientTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/JCloudsS3Service.java b/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/JCloudsS3Service.java index 040fc96b99..5a6805e18a 100644 --- a/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/JCloudsS3Service.java +++ b/extensions/jets3t/src/main/java/org/jclouds/aws/s3/jets3t/JCloudsS3Service.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one @@ -110,14 +110,13 @@ public class JCloudsS3Service extends S3Service { /** * {@inheritDoc} * - * @see S3Connection#deleteBucket(org.jclouds.aws.s3.domain.S3Bucket) + * @see S3Connection#deleteBucketIfNotEmpty(org.jclouds.aws.s3.domain.S3Bucket) */ @Override protected void deleteBucketImpl(String bucketName) throws S3ServiceException { try { - connection.deleteBucket( - new org.jclouds.aws.s3.domain.S3Bucket(bucketName)).get( + connection.deleteBucketIfNotEmpty(bucketName).get( requestTimeoutMilliseconds, TimeUnit.MILLISECONDS); } catch (Exception e) { Utils. rethrowIfRuntimeOrSameType(e); @@ -136,10 +135,8 @@ public class JCloudsS3Service extends S3Service { protected void deleteObjectImpl(String bucketName, String objectKey) throws S3ServiceException { try { - connection.deleteObject( - new org.jclouds.aws.s3.domain.S3Bucket(bucketName), - objectKey).get(requestTimeoutMilliseconds, - TimeUnit.MILLISECONDS); + connection.deleteObject(bucketName, objectKey).get( + requestTimeoutMilliseconds, TimeUnit.MILLISECONDS); } catch (Exception e) { Utils. rethrowIfRuntimeOrSameType(e); throw new S3ServiceException(String.format( @@ -210,17 +207,17 @@ public class JCloudsS3Service extends S3Service { @Override protected S3Bucket[] listAllBucketsImpl() throws S3ServiceException { try { - List jcBucketList = connection - .getBuckets().get(requestTimeoutMilliseconds, - TimeUnit.MILLISECONDS); + List jcBucketList = connection + .getMetaDataOfOwnedBuckets().get( + requestTimeoutMilliseconds, TimeUnit.MILLISECONDS); ArrayList jsBucketList = new ArrayList(); - for (org.jclouds.aws.s3.domain.S3Bucket jcBucket : jcBucketList) { + for (org.jclouds.aws.s3.domain.S3Bucket.MetaData jcBucket : jcBucketList) { org.jets3t.service.model.S3Bucket jsBucket = new org.jets3t.service.model.S3Bucket( jcBucket.getName()); jsBucket.setOwner(new org.jets3t.service.model.S3Owner(jcBucket - .getMetaData().getCanonicalUser().getId(), jcBucket - .getMetaData().getCanonicalUser().getDisplayName())); + .getCanonicalUser().getId(), jcBucket + .getCanonicalUser().getDisplayName())); jsBucketList.add(jsBucket); } return (org.jets3t.service.model.S3Bucket[]) jsBucketList diff --git a/extensions/jets3t/src/test/java/org/jclouds/aws/s3/jets3t/JCloudsS3ServiceTest.java b/extensions/jets3t/src/test/java/org/jclouds/aws/s3/jets3t/JCloudsS3ServiceTest.java index 4f4538b781..8e79254b4b 100644 --- a/extensions/jets3t/src/test/java/org/jclouds/aws/s3/jets3t/JCloudsS3ServiceTest.java +++ b/extensions/jets3t/src/test/java/org/jclouds/aws/s3/jets3t/JCloudsS3ServiceTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one @@ -101,19 +101,13 @@ public class JCloudsS3ServiceTest extends S3IntegrationTest { public void testDeleteBucketImplString() throws S3ServiceException, InterruptedException, ExecutionException, TimeoutException { String bucketName = bucketPrefix + ".testDeleteBucketImplString"; - org.jclouds.aws.s3.domain.S3Bucket jcloudsBucket = createBucket(bucketName); - - service.deleteBucket(new S3Bucket(bucketName)); - - assert !client.bucketExists(jcloudsBucket).get(10, TimeUnit.SECONDS); + service.deleteBucket(bucketName); + assert !client.bucketExists(bucketName).get(10, TimeUnit.SECONDS); } - private org.jclouds.aws.s3.domain.S3Bucket createBucket(String bucketName) - throws InterruptedException, ExecutionException, TimeoutException { - org.jclouds.aws.s3.domain.S3Bucket jcloudsBucket = new org.jclouds.aws.s3.domain.S3Bucket( - bucketName); - client.createBucketIfNotExists(jcloudsBucket).get(10, TimeUnit.SECONDS); - return jcloudsBucket; + private void createBucket(String bucketName) throws InterruptedException, + ExecutionException, TimeoutException { + client.createBucketIfNotExists(bucketName).get(10, TimeUnit.SECONDS); } @Test @@ -123,25 +117,21 @@ public class JCloudsS3ServiceTest extends S3IntegrationTest { String objectKey = "key"; String objectValue = "test"; - org.jclouds.aws.s3.domain.S3Bucket jcloudsBucket = addNewObject( - bucketName, objectKey, objectValue); + addNewObject(bucketName, objectKey, objectValue); service.deleteObject(bucketName, objectKey); - assertEquals(client.getObjectMetaData(jcloudsBucket, objectKey).get(10, + assertEquals(client.getObjectMetaData(bucketName, objectKey).get(10, TimeUnit.SECONDS), org.jclouds.aws.s3.domain.S3Object.NOT_FOUND); } - private org.jclouds.aws.s3.domain.S3Bucket addNewObject(String name, - String objectKey, String objectValue) throws InterruptedException, - ExecutionException, TimeoutException { - org.jclouds.aws.s3.domain.S3Bucket jcloudsBucket = createBucket(name); + private void addNewObject(String name, String objectKey, String objectValue) + throws InterruptedException, ExecutionException, TimeoutException { + createBucket(name); org.jclouds.aws.s3.domain.S3Object jcloudsObject = new org.jclouds.aws.s3.domain.S3Object( objectKey); jcloudsObject.setData(objectValue); - client.addObject(jcloudsBucket, jcloudsObject) - .get(10, TimeUnit.SECONDS); - return jcloudsBucket; + client.addObject(name, jcloudsObject).get(10, TimeUnit.SECONDS); } @Test @@ -189,29 +179,30 @@ public class JCloudsS3ServiceTest extends S3IntegrationTest { ExecutionException, TimeoutException, S3ServiceException { // Ensure there is at least 1 bucket in S3 account to list and compare. String bucketName = bucketPrefix + ".testListAllBucketsImplString"; - org.jclouds.aws.s3.domain.S3Bucket jcloudsBucket = createBucket(bucketName); + createBucket(bucketName); S3Bucket[] jsBuckets = service.listAllBuckets(); - List jcBuckets = client - .getBuckets().get(10, TimeUnit.SECONDS); + List jcBuckets = client + .getMetaDataOfOwnedBuckets().get(10, TimeUnit.SECONDS); assert jsBuckets.length == jcBuckets.size(); - Iterator jcBucketsIter = jcBuckets + Iterator jcBucketsIter = jcBuckets .iterator(); for (S3Bucket jsBucket : jsBuckets) { assert jcBucketsIter.hasNext(); - org.jclouds.aws.s3.domain.S3Bucket jcBucket = jcBucketsIter.next(); + org.jclouds.aws.s3.domain.S3Bucket.MetaData jcBucket = jcBucketsIter + .next(); assert jsBucket.getName().equals(jcBucket.getName()); assert jsBucket.getOwner().getId().equals( - jcBucket.getMetaData().getCanonicalUser().getId()); + jcBucket.getCanonicalUser().getId()); assert jsBucket.getOwner().getDisplayName().equals( - jcBucket.getMetaData().getCanonicalUser().getDisplayName()); + jcBucket.getCanonicalUser().getDisplayName()); } - client.deleteBucket(jcloudsBucket); + client.deleteBucketIfNotEmpty(bucketName); } @Test diff --git a/extensions/log4j/src/main/java/org/jclouds/logging/log4j/Log4JLogger.java b/extensions/log4j/src/main/java/org/jclouds/logging/log4j/Log4JLogger.java index 320bcd4fa9..b2e9b8a1d8 100644 --- a/extensions/log4j/src/main/java/org/jclouds/logging/log4j/Log4JLogger.java +++ b/extensions/log4j/src/main/java/org/jclouds/logging/log4j/Log4JLogger.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/log4j/src/main/java/org/jclouds/logging/log4j/config/Log4JLoggingModule.java b/extensions/log4j/src/main/java/org/jclouds/logging/log4j/config/Log4JLoggingModule.java index be5dbe4321..b2e4ee98ec 100644 --- a/extensions/log4j/src/main/java/org/jclouds/logging/log4j/config/Log4JLoggingModule.java +++ b/extensions/log4j/src/main/java/org/jclouds/logging/log4j/config/Log4JLoggingModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/log4j/src/test/java/org/jclouds/logging/log4j/config/Log4JLoggingModuleTest.java b/extensions/log4j/src/test/java/org/jclouds/logging/log4j/config/Log4JLoggingModuleTest.java index 2da43672b1..d159bab68f 100644 --- a/extensions/log4j/src/test/java/org/jclouds/logging/log4j/config/Log4JLoggingModuleTest.java +++ b/extensions/log4j/src/test/java/org/jclouds/logging/log4j/config/Log4JLoggingModuleTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandler.java b/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandler.java index 8e30327091..12435ce0dd 100644 --- a/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandler.java +++ b/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandler.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModule.java b/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModule.java index 557bf16321..cf67e3cbf3 100644 --- a/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModule.java +++ b/extensions/s3nio/src/main/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3InputStreamMapTest.java b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3InputStreamMapTest.java index d596475b65..0db0a9efba 100644 --- a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3InputStreamMapTest.java +++ b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3InputStreamMapTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3ObjectMapTest.java b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3ObjectMapTest.java index c9ca16a8df..ea5905ac7e 100644 --- a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3ObjectMapTest.java +++ b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/NioS3ObjectMapTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandlerTest.java b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandlerTest.java index 5aa2072c2a..b99fe71ae3 100644 --- a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandlerTest.java +++ b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/S3HttpNioFutureCommandExecutionHandlerTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModuleTest.java b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModuleTest.java index 7721deb47b..1bb13af8ec 100644 --- a/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModuleTest.java +++ b/extensions/s3nio/src/test/java/org/jclouds/aws/s3/nio/config/S3HttpNioConnectionPoolClientModuleTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/gae/src/main/java/org/jclouds/gae/URLFetchServiceClient.java b/gae/src/main/java/org/jclouds/gae/URLFetchServiceClient.java index 509ea1d836..2148bd11c4 100644 --- a/gae/src/main/java/org/jclouds/gae/URLFetchServiceClient.java +++ b/gae/src/main/java/org/jclouds/gae/URLFetchServiceClient.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/gae/src/main/java/org/jclouds/gae/config/URLFetchServiceClientModule.java b/gae/src/main/java/org/jclouds/gae/config/URLFetchServiceClientModule.java index 220780dc7a..d7014b0589 100644 --- a/gae/src/main/java/org/jclouds/gae/config/URLFetchServiceClientModule.java +++ b/gae/src/main/java/org/jclouds/gae/config/URLFetchServiceClientModule.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientIntegrationTest.java b/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientIntegrationTest.java index 04ee91fd57..9316b5595e 100644 --- a/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientIntegrationTest.java +++ b/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientIntegrationTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientTest.java b/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientTest.java index f3fc1ce46c..0d9300473c 100644 --- a/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientTest.java +++ b/gae/src/test/java/org/jclouds/gae/URLFetchServiceClientTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/gae/src/test/java/org/jclouds/gae/config/URLFetchServiceClientModuleTest.java b/gae/src/test/java/org/jclouds/gae/config/URLFetchServiceClientModuleTest.java index f4b3837c8a..01ce944dd5 100644 --- a/gae/src/test/java/org/jclouds/gae/config/URLFetchServiceClientModuleTest.java +++ b/gae/src/test/java/org/jclouds/gae/config/URLFetchServiceClientModuleTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2009 Adrian Cole + * Copyright (C) 2009 Adrian Cole * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one diff --git a/project/LICENSE.txt b/project/LICENSE.txt index 59daa90f51..8945f9f802 100644 --- a/project/LICENSE.txt +++ b/project/LICENSE.txt @@ -1,6 +1,6 @@ ==== - Copyright (C) 2009 Adrian Cole + Copyright (C) 2009 Adrian Cole ==================================================================== Licensed to the Apache Software Foundation (ASF) under one diff --git a/project/src/etc/header.txt b/project/src/etc/header.txt index 42851dfcb2..834cd7a07d 100644 --- a/project/src/etc/header.txt +++ b/project/src/etc/header.txt @@ -1,5 +1,5 @@ -Copyright (C) ${year} Adrian Cole +Copyright (C) ${year} Adrian Cole ==================================================================== Licensed to the Apache Software Foundation (ASF) under one diff --git a/repo/com/google/appengine/appengine-api-stubs/maven-metadata-local.xml b/repo/com/google/appengine/appengine-api-stubs/maven-metadata-local.xml index 37707c1300..b57b790e1a 100644 --- a/repo/com/google/appengine/appengine-api-stubs/maven-metadata-local.xml +++ b/repo/com/google/appengine/appengine-api-stubs/maven-metadata-local.xml @@ -2,7 +2,7 @@