SonarLint fixes
This commit is contained in:
@@ -32,10 +32,10 @@ public class OfferProvisioner {
|
||||
private EbaySeller ebaySeller;
|
||||
|
||||
private void toSeller(final Offer offer) throws IllegalArgumentException {
|
||||
if (offer.getTargetProduct().getDataOrigin() == Webshop.eBay) {
|
||||
if (offer.getTargetProduct().getDataOrigin() == Webshop.EBAY) {
|
||||
this.ebaySeller.sellProduct(ProductMapper.mapProductToDTO(offer.getTargetProduct()));
|
||||
|
||||
} else if (offer.getTargetProduct().getDataOrigin().equals(Webshop.Amazon)) {
|
||||
} else if (offer.getTargetProduct().getDataOrigin().equals(Webshop.AMAZON)) {
|
||||
this.amazonSeller.sellProduct(ProductMapper.mapProductToDTO(offer.getTargetProduct()));
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported target plattform");
|
||||
|
||||
@@ -71,7 +71,9 @@ public class CatalogueRetriever {
|
||||
}
|
||||
|
||||
productCatalogues.add(newProductCatalogue);
|
||||
LOGGER.info("\nLoaded Catalogue: \n" + newProductCatalogue.toString());
|
||||
String catString = String.format(
|
||||
"%nLoaded Catalogue: %n%s", newProductCatalogue.toString());
|
||||
LOGGER.info(catString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,9 +94,9 @@ public class ProductRetriever {
|
||||
*/
|
||||
public Product getProductFromWebshop(final Webshop shop, final String productIdentifier) {
|
||||
switch (shop) {
|
||||
case Amazon:
|
||||
case AMAZON:
|
||||
return getProductFromAmazon(productIdentifier);
|
||||
case eBay:
|
||||
case EBAY:
|
||||
return getProductFromEbay(productIdentifier);
|
||||
default:
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user