alibazlamit commented on this pull request.
> + public static class ToZipStream implements Function<VPNConfig,
> ZipInputStream> {
+
+ @Inject
+ public ToZipStream() {
+ super();
+ }
+
+ @Override
+ public ZipInputStream apply(VPNConfig input) {
+ try {
+ byte[] decoded = base64().decode(input.content());
+ ZipInputStream zipStream = new ZipInputStream(new
ByteArrayInputStream(decoded));
+ return zipStream;
+ } catch (Exception ex) {
+
Logger.getLogger(VPNConfigParser.class.getName()).log(Level.SEVERE, null, ex);
+ return null;
Removed the try catch, if the API fails to return the config the fallback with
work as needed and return a null object, no need for a try catch in there, if
any other error should be returned from the API the error handler will do its
job.
Changes pushed
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/319