Improved: Fix or Silence various warnings

(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2018-12-11 13:33:49 +00:00
parent 13f8b82f51
commit bbfc62d47a
129 changed files with 346 additions and 572 deletions
@@ -224,7 +224,7 @@ public class FindServices {
* condition grouped by an {@link EntityOperator.OR}
* That will allow union of search criteria, instead of default intersection.
*/
Map<String, List<EntityCondition>> savedGroups = new LinkedHashMap();
Map<String, List<EntityCondition>> savedGroups = new LinkedHashMap<>();
for (ModelField modelField : fieldList) {
fieldMap.put(modelField.getName(), modelField);
}
@@ -30,8 +30,7 @@ import org.apache.ofbiz.entity.condition.EntityExpr;
import org.apache.ofbiz.entity.condition.EntityOperator;
public final class PeriodWorker {
private final static String module = PeriodWorker.class.getName();
public final static String module = PeriodWorker.class.getName();
private PeriodWorker() {}
@@ -156,7 +156,9 @@ public class QRCodeServices {
typeMap.put("height", logoImageMaxHeight.toString());
Map<String, Map<String, String>> dimensionMap = new HashMap<>();
dimensionMap.put("QRCode", typeMap);
Map<String, Object> logoImageResult = ImageTransform.scaleImage(logoBufferedImage, (double) logoBufferedImage.getWidth(), (double) logoBufferedImage.getHeight(), dimensionMap, "QRCode", locale);
Map<String, Object> logoImageResult =
ImageTransform.scaleImage(logoBufferedImage, logoBufferedImage.getWidth(),
logoBufferedImage.getHeight(), dimensionMap, "QRCode", locale);
logoBufferedImage = (BufferedImage) logoImageResult.get("bufferedImage");
}
BitMatrix newBitMatrix = bitMatrix.clone();