diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java index 7c60f8a6cc..6475a333d2 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java @@ -22,9 +22,7 @@ import static com.google.common.collect.FluentIterable.from; import java.util.Map; import java.util.Set; -import javax.annotation.Resource; import javax.inject.Inject; -import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.collect.Memoized; @@ -34,15 +32,12 @@ import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.NodeMetadata.Status; import org.jclouds.compute.domain.NodeMetadataBuilder; import org.jclouds.compute.functions.GroupNamingConvention; -import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.domain.Location; import org.jclouds.location.predicates.LocationPredicates; -import org.jclouds.logging.Logger; import org.jclouds.softlayer.SoftLayerApi; import org.jclouds.softlayer.domain.ProductItem; import org.jclouds.softlayer.domain.ProductOrder; import org.jclouds.softlayer.domain.VirtualGuest; -import org.jclouds.softlayer.exceptions.SoftLayerOrderItemDuplicateException; import org.jclouds.softlayer.predicates.ProductItemPredicates; import com.google.common.base.Function; @@ -136,10 +131,6 @@ public class VirtualGuestToNodeMetadata implements Function items = Iterables.transform(order.getPrices(), ProductItems.item()); diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/exceptions/SoftLayerOrderItemDuplicateException.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/exceptions/SoftLayerOrderItemDuplicateException.java deleted file mode 100644 index a08a61b84d..0000000000 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/exceptions/SoftLayerOrderItemDuplicateException.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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 org.jclouds.softlayer.exceptions; - -public class SoftLayerOrderItemDuplicateException extends RuntimeException { - - public SoftLayerOrderItemDuplicateException(String message, Exception exception) { - super(message, exception); - } - -} diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java index e2d7092d41..129e051041 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java @@ -26,7 +26,6 @@ import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponseException; import org.jclouds.rest.AuthorizationException; import org.jclouds.rest.ResourceNotFoundException; -import org.jclouds.softlayer.exceptions.SoftLayerOrderItemDuplicateException; import org.jclouds.util.Strings2; import com.google.common.base.Throwables; @@ -65,8 +64,6 @@ public class SoftLayerErrorHandler implements HttpErrorHandler { exception = new ResourceNotFoundException(message, exception); } else if (message.indexOf("currently an active transaction") != -1) { exception = new IllegalStateException(message, exception); - } else if (message.indexOf("SoftLayer_Exception_Order_Item_Duplicate") != -1) { - exception = new SoftLayerOrderItemDuplicateException(message, exception); } } }