@@ -0,0 +1,1482 @@
+/**%0A * Copyright 2014 Google Inc. All Rights Reserved.%0A *%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file except%0A * in compliance with the License. You may obtain a copy of the License at%0A *%0A *  http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software distributed under the%0A * License is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either%0A * express or implied. See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.google.cloud.hadoop.util;%0A%0Aimport com.google.common.base.Function;%0A%0Aimport java.io.IOException;%0Aimport java.util.concurrent.ExecutionException;%0A%0A/**%0A * Converter function from %7B@link Exception%7D to %7B@link IOException%7D.%0A */%0Apublic class ExceptionToIoExceptionFunction implements Function%3CException, IOException%3E %7B%0A%0A  public static final Function%3CException, IOException%3E INSTANCE%0A    = new ExceptionToIoExceptionFunction();%0A%0A  private ExceptionToIoExceptionFunction() %7B%0A    // Singleton.%0A  %7D%0A%0A  @Override%0A  public IOException apply(Exception exception) %7B%0A    if (exception instanceof ExecutionException) %7B%0A      if (exception.getCause() instanceof IOException) %7B%0A        return (IOException) exception.getCause();%0A      %7D%0A    %7D else if (exception instanceof IOException) %7B%0A      return (IOException) exception;%0A    %7D%0A    return new IOException(exception);%0A  %7D%0A%7D%0A

Validate GCS bucket name. Change on 2015/05/14 by sedov <sedov@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=93633326