diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java b/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java index acaf02df98..3bfea7bdc3 100644 --- a/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java +++ b/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java @@ -323,6 +323,7 @@ public class ShoppingListEvents { quantity = new BigDecimal(quantityStr); } catch (NumberFormatException e) { // do nothing, just won't pass to service if it is null + Debug.logError(e, module); } Map serviceInMap = new HashMap(); diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java index 9a327b5ad6..8cb278cd74 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java @@ -118,7 +118,7 @@ public final class SSLUtil { ((X509TrustManager) mgr).checkClientTrusted(chain, authType); return true; } catch (CertificateException e) { - // do nothing; just loop + Debug.logError(e, module); } } } diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/ResourceBundleMapWrapper.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/ResourceBundleMapWrapper.java index d6222d1168..2da0219dc0 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/ResourceBundleMapWrapper.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/ResourceBundleMapWrapper.java @@ -257,6 +257,7 @@ public class ResourceBundleMapWrapper implements Map, Serializab value = this.resourceBundle.getObject((String) arg0); } catch (MissingResourceException mre) { // do nothing, this will be handled by recognition that the value is still null + Debug.logError(mre, module); } } } diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/qrcode/QRCodeServices.java b/framework/common/src/main/java/org/apache/ofbiz/common/qrcode/QRCodeServices.java index 5c5031250f..0e5427f1d3 100644 --- a/framework/common/src/main/java/org/apache/ofbiz/common/qrcode/QRCodeServices.java +++ b/framework/common/src/main/java/org/apache/ofbiz/common/qrcode/QRCodeServices.java @@ -155,10 +155,8 @@ public class QRCodeServices { try { logoImageResult = ImageTransform.getBufferedImage(FileUtil.getFile(logoImage).getAbsolutePath(), locale); logoBufferedImage = (BufferedImage) logoImageResult.get("bufferedImage"); - } catch (IllegalArgumentException e) { - // do nothing - } catch (IOException e) { - // do nothing + } catch (IllegalArgumentException | IOException e) { + Debug.logError(e, module); } } if (UtilValidate.isEmpty(logoBufferedImage)) { @@ -168,11 +166,11 @@ public class QRCodeServices { BufferedImage newBufferedImage = null; if (UtilValidate.isNotEmpty(logoBufferedImage)) { if (UtilValidate.isNotEmpty(logoImageMaxWidth) && UtilValidate.isNotEmpty(logoImageMaxHeight) && (logoBufferedImage.getWidth() > logoImageMaxWidth.intValue() || logoBufferedImage.getHeight() > logoImageMaxHeight.intValue())) { - Map typeMap = new HashMap<>(); - typeMap.put("width", logoImageMaxWidth.toString()); - typeMap.put("height", logoImageMaxHeight.toString()); - Map> dimensionMap = new HashMap<>(); - dimensionMap.put("QRCode", typeMap); + Map typeMap = new HashMap<>(); + typeMap.put("width", logoImageMaxWidth.toString()); + typeMap.put("height", logoImageMaxHeight.toString()); + Map> dimensionMap = new HashMap<>(); + dimensionMap.put("QRCode", typeMap); Map logoImageResult = ImageTransform.scaleImage(logoBufferedImage, (double) logoBufferedImage.getWidth(), (double) logoBufferedImage.getHeight(), dimensionMap, "QRCode", locale); logoBufferedImage = (BufferedImage) logoImageResult.get("bufferedImage"); } @@ -192,17 +190,13 @@ public class QRCodeServices { } DetectorResult detectorResult = null; if (UtilValidate.isNotEmpty(newBufferedImage)) { - BitMatrix newBitMatrix = createMatrixFromImage(newBufferedImage); + BitMatrix newBitMatrix = createMatrixFromImage(newBufferedImage); DecoderResult result = null; try { detectorResult = new Detector(newBitMatrix).detect(decodeHints); - result = decoder.decode(detectorResult.getBits(), decodeHints); - } catch (ChecksumException e) { - // do nothing - } catch (FormatException e) { - // do nothing - } catch (NotFoundException e) { - // do nothing + result = decoder.decode(detectorResult.getBits(), decodeHints); + } catch (ChecksumException | FormatException | NotFoundException e) { + Debug.logError(e, module); } if (UtilValidate.isNotEmpty(result) && !result.getText().equals(message)) { detectorResult = new Detector(bitMatrix).detect(decodeHints);