/*
 * Copyright 2017 Google, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License")
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.netflix.spinnaker.clouddriver.appengine.artifacts;

import com.netflix.spinnaker.clouddriver.appengine.artifacts.config.StorageConfigurationProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.io.IOException;
import java.security.GeneralSecurityException;


@Configuration
@ConditionalOnProperty("artifacts.gcs.enabled")
@EnableConfigurationProperties(StorageConfigurationProperties.class)
@EnableScheduling
class StorageConfiguration {
  @Autowired
  StorageConfigurationProperties storageAccountInfo;

  @Bean
  GcsStorageService.Factory storageServiceFactory(String clouddriverUserAgentApplicationName) {
    try {
      return new GcsStorageService.Factory(clouddriverUserAgentApplicationName);
    } catch (IOException ioex) {
      throw new IllegalStateException(ioex);
    } catch (GeneralSecurityException secex) {
      throw new IllegalStateException(secex);
    }
  }
}

@@ -1383,16 +1383,23 @@
 eduling%0A
+public 
 class St
@@ -1710,74 +1710,10 @@
 ion 
-ioex) %7B%0A      throw new IllegalStateException(ioex);%0A    %7D catch (
+%7C 
 Gene
@@ -1733,19 +1733,16 @@
 ception 
-sec
 ex) %7B%0A  
@@ -1777,19 +1777,16 @@
 ception(
-sec
 ex);%0A   

fix compiler warnings