jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] [JCLOUDS-1010] use a lightweight image as a base for Docker build test (#208)
Date Wed, 21 Oct 2015 09:34:29 GMT
> +    */
> +   private static void consumeStreamSilently(InputStream is) {
> +      char[] tmpBuff = new char[8 * 1024];
> +      // throw everything away
> +      InputStreamReader isr = new InputStreamReader(is);
> +
> +      try {
> +         try {
> +            while (isr.read(tmpBuff) > -1) {
> +               // empty
> +            }
> +         } finally {
> +            isr.close();
> +         }
> +      } catch (IOException e) {
> +         e.printStackTrace();

Propagate the exception or use the `java.util.Logger.getAnonymousLogger()` to log test errors.

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