poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1808516 [5/10] - in /poi/trunk/src: examples/src/org/apache/poi/hpsf/examples/ examples/src/org/apache/poi/hssf/eventusermodel/examples/ examples/src/org/apache/poi/hssf/usermodel/examples/ examples/src/org/apache/poi/hssf/view/brush/ exam...
Date Sat, 16 Sep 2017 08:27:33 GMT
Modified: poi/trunk/src/java/org/apache/poi/sl/draw/geom/Context.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/geom/Context.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/geom/Context.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/geom/Context.java Sat Sep 16 08:27:23 2017
@@ -24,7 +24,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 public class Context {
-    final Map<String, Double> _ctx = new HashMap<String, Double>();
+    final Map<String, Double> _ctx = new HashMap<>();
     final IAdjustableShape _props;
     final Rectangle2D _anchor;
     

Modified: poi/trunk/src/java/org/apache/poi/sl/draw/geom/CustomGeometry.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/geom/CustomGeometry.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/geom/CustomGeometry.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/geom/CustomGeometry.java Sat Sep 16 08:27:23 2017
@@ -34,9 +34,9 @@ import org.apache.poi.sl.draw.binding.CT
  * Definition of a custom geometric shape
  */
 public class CustomGeometry implements Iterable<Path>{
-    final List<Guide> adjusts = new ArrayList<Guide>();
-    final List<Guide> guides = new ArrayList<Guide>();
-    final List<Path> paths = new ArrayList<Path>();
+    final List<Guide> adjusts = new ArrayList<>();
+    final List<Guide> guides = new ArrayList<>();
+    final List<Path> paths = new ArrayList<>();
     Path textBounds;
 
     public CustomGeometry(CTCustomGeometry2D geom) {

Modified: poi/trunk/src/java/org/apache/poi/sl/draw/geom/Path.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/geom/Path.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/geom/Path.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/geom/Path.java Sat Sep 16 08:27:23 2017
@@ -49,7 +49,7 @@ public class Path {
     }
 
     public Path(boolean fill, boolean stroke){
-        commands = new ArrayList<PathCommand>();
+        commands = new ArrayList<>();
         _w = -1;
         _h = -1;
         _fill = (fill) ? PaintModifier.NORM : PaintModifier.NONE;
@@ -70,7 +70,7 @@ public class Path {
         _w = spPath.isSetW() ? spPath.getW() : -1;
         _h = spPath.isSetH() ? spPath.getH() : -1;
 
-        commands = new ArrayList<PathCommand>();
+        commands = new ArrayList<>();
 
         for(Object ch : spPath.getCloseOrMoveToOrLnTo()){
             if(ch instanceof CTPath2DMoveTo){

Modified: poi/trunk/src/java/org/apache/poi/sl/usermodel/PresetColor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/usermodel/PresetColor.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/usermodel/PresetColor.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/usermodel/PresetColor.java Sat Sep 16 08:27:23 2017
@@ -260,7 +260,7 @@ public enum PresetColor {
     private static final Map<String,PresetColor> lookupOoxmlId;
 
     static {
-        lookupOoxmlId = new HashMap<String,PresetColor>();
+        lookupOoxmlId = new HashMap<>();
         for(PresetColor pc : PresetColor.values()) {
             if (pc.ooxmlId != null) {
                 lookupOoxmlId.put(pc.ooxmlId, pc);

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellElapsedFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellElapsedFormatter.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellElapsedFormatter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellElapsedFormatter.java Sat Sep 16 08:27:23 2017
@@ -132,7 +132,7 @@ public class CellElapsedFormatter extend
     public CellElapsedFormatter(String pattern) {
         super(pattern);
 
-        specs = new ArrayList<TimeSpec>();
+        specs = new ArrayList<>();
 
         StringBuffer desc = CellFormatPart.parseFormat(pattern,
                 CellFormatType.ELAPSED, new ElapsedPartHandler());

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java Sat Sep 16 08:27:23 2017
@@ -129,7 +129,7 @@ public class CellFormat {
 
     /** Maps a format string to its parsed version for efficiencies sake. */
     private static final Map<Locale, Map<String, CellFormat>> formatCache =
-            new WeakHashMap<Locale, Map<String, CellFormat>>();
+            new WeakHashMap<>();
 
     /**
      * Returns a {@link CellFormat} that applies the given format.  Two calls
@@ -155,7 +155,7 @@ public class CellFormat {
     public static synchronized CellFormat getInstance(Locale locale, String format) {
         Map<String, CellFormat> formatMap = formatCache.get(locale);
         if (formatMap == null) {
-            formatMap = new WeakHashMap<String, CellFormat>();
+            formatMap = new WeakHashMap<>();
             formatCache.put(locale, formatMap);
         }
         CellFormat fmt = formatMap.get(format);
@@ -179,7 +179,7 @@ public class CellFormat {
         this.format = format;
         CellFormatPart defaultTextFormat = new CellFormatPart(locale, "@");
         Matcher m = ONE_PART.matcher(format);
-        List<CellFormatPart> parts = new ArrayList<CellFormatPart>();
+        List<CellFormatPart> parts = new ArrayList<>();
 
         while (m.find()) {
             try {

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellFormatCondition.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellFormatCondition.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellFormatCondition.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellFormatCondition.java Sat Sep 16 08:27:23 2017
@@ -35,7 +35,7 @@ public abstract class CellFormatConditio
     private static final Map<String, Integer> TESTS;
 
     static {
-        TESTS = new HashMap<String, Integer>();
+        TESTS = new HashMap<>();
         TESTS.put("<", LT);
         TESTS.put("<=", LE);
         TESTS.put(">", GT);

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellFormatPart.java Sat Sep 16 08:27:23 2017
@@ -56,7 +56,7 @@ public class CellFormatPart {
     private static final Map<String, Color> NAMED_COLORS;
 
     static {
-        NAMED_COLORS = new TreeMap<String, Color>(
+        NAMED_COLORS = new TreeMap<>(
                 String.CASE_INSENSITIVE_ORDER);
 
         Map<Integer,HSSFColor> colors = HSSFColor.getIndexHash();

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellNumberFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellNumberFormatter.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellNumberFormatter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellNumberFormatter.java Sat Sep 16 08:27:23 2017
@@ -50,13 +50,13 @@ public class CellNumberFormatter extends
     private final Special afterInteger;
     private final Special afterFractional;
     private final boolean showGroupingSeparator;
-    private final List<Special> specials =  new ArrayList<Special>();
-    private final List<Special> integerSpecials = new ArrayList<Special>();
-    private final List<Special> fractionalSpecials = new ArrayList<Special>();
-    private final List<Special> numeratorSpecials = new ArrayList<Special>();
-    private final List<Special> denominatorSpecials = new ArrayList<Special>();
-    private final List<Special> exponentSpecials = new ArrayList<Special>();
-    private final List<Special> exponentDigitSpecials = new ArrayList<Special>();
+    private final List<Special> specials = new ArrayList<>();
+    private final List<Special> integerSpecials = new ArrayList<>();
+    private final List<Special> fractionalSpecials = new ArrayList<>();
+    private final List<Special> numeratorSpecials = new ArrayList<>();
+    private final List<Special> denominatorSpecials = new ArrayList<>();
+    private final List<Special> exponentSpecials = new ArrayList<>();
+    private final List<Special> exponentDigitSpecials = new ArrayList<>();
     private final int maxDenominator;
     private final String numeratorFmt;
     private final String denominatorFmt;
@@ -448,7 +448,7 @@ public class CellNumberFormatter extends
             }
         }
 
-        Set<CellNumberStringMod> mods = new TreeSet<CellNumberStringMod>();
+        Set<CellNumberStringMod> mods = new TreeSet<>();
         StringBuffer output = new StringBuffer(localiseFormat(desc));
 
         if (exponent != null) {

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellNumberPartHandler.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellNumberPartHandler.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellNumberPartHandler.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellNumberPartHandler.java Sat Sep 16 08:27:23 2017
@@ -36,7 +36,7 @@ public class CellNumberPartHandler imple
     private Special slash;
     private Special exponent;
     private Special numerator;
-    private final List<Special> specials = new LinkedList<Special>();
+    private final List<Special> specials = new LinkedList<>();
     private boolean improperFraction;
 
     public String handlePart(Matcher m, String part, CellFormatType type, StringBuffer descBuf) {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/CellEvaluationFrame.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/CellEvaluationFrame.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/CellEvaluationFrame.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/CellEvaluationFrame.java Sat Sep 16 08:27:23 2017
@@ -33,7 +33,7 @@ final class CellEvaluationFrame {
 
 	public CellEvaluationFrame(FormulaCellCacheEntry cce) {
 		_cce = cce;
-		_sensitiveInputCells = new HashSet<CellCacheEntry>();
+		_sensitiveInputCells = new HashSet<>();
 	}
 	public CellCacheEntry getCCE() {
 		return _cce;

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java Sat Sep 16 08:27:23 2017
@@ -75,7 +75,7 @@ public final class CollaboratingWorkbook
         new CollaboratingWorkbooksEnvironment(evaluatorsByName, evaluators);
     }
     public static void setupFormulaEvaluator(Map<String,FormulaEvaluator> evaluators) {
-        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<String, WorkbookEvaluator>(evaluators.size());
+        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<>(evaluators.size());
         for (Map.Entry<String,FormulaEvaluator> swb : evaluators.entrySet()) {
             String wbName = swb.getKey();
             FormulaEvaluator eval = swb.getValue();
@@ -93,7 +93,7 @@ public final class CollaboratingWorkbook
         this(toUniqueMap(workbookNames, evaluators, nItems), evaluators);
     }
     private static Map<String, WorkbookEvaluator> toUniqueMap(String[] workbookNames, WorkbookEvaluator[] evaluators, int nItems) {
-        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<String, WorkbookEvaluator>(nItems * 3 / 2);
+        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<>(nItems * 3 / 2);
         for(int i=0; i<nItems; i++) {
             String wbName = workbookNames[i];
             WorkbookEvaluator wbEval = evaluators[i];
@@ -105,7 +105,7 @@ public final class CollaboratingWorkbook
         return evaluatorsByName;
     }
     private CollaboratingWorkbooksEnvironment(Map<String, WorkbookEvaluator> evaluatorsByName, WorkbookEvaluator[] evaluators) {
-        IdentityHashMap<WorkbookEvaluator, String> uniqueEvals = new IdentityHashMap<WorkbookEvaluator, String>(evaluators.length);
+        IdentityHashMap<WorkbookEvaluator, String> uniqueEvals = new IdentityHashMap<>(evaluators.length);
         for (Map.Entry<String, WorkbookEvaluator> me : evaluatorsByName.entrySet()) {
             String uniEval = uniqueEvals.put(me.getValue(), me.getKey());
             if (uniEval != null) {
@@ -144,7 +144,7 @@ public final class CollaboratingWorkbook
      * Completely dismantles all workbook environments that the supplied evaluators are part of
      */
     private void unhookOldEnvironments(WorkbookEvaluator[] evaluators) {
-        Set<CollaboratingWorkbooksEnvironment> oldEnvs = new HashSet<CollaboratingWorkbooksEnvironment>();
+        Set<CollaboratingWorkbooksEnvironment> oldEnvs = new HashSet<>();
         for(int i=0; i<evaluators.length; i++) {
             oldEnvs.add(evaluators[i].getEnvironment());
         }

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java Sat Sep 16 08:27:23 2017
@@ -60,7 +60,7 @@ public class ConditionalFormattingEvalua
      * there's no guarantee instances won't be recreated on the fly by some implementation.
      * So we use sheet name.
      */
-    private final Map<String, List<EvaluationConditionalFormatRule>> formats = new HashMap<String, List<EvaluationConditionalFormatRule>>();
+    private final Map<String, List<EvaluationConditionalFormatRule>> formats = new HashMap<>();
     
     /**
      * Evaluating rules for cells in their region(s) is expensive, so we want to cache them,
@@ -70,7 +70,7 @@ public class ConditionalFormattingEvalua
      * <p>
      * CellReference implements equals().
      */
-    private final Map<CellReference, List<EvaluationConditionalFormatRule>> values = new HashMap<CellReference, List<EvaluationConditionalFormatRule>>();
+    private final Map<CellReference, List<EvaluationConditionalFormatRule>> values = new HashMap<>();
 
     public ConditionalFormattingEvaluator(Workbook wb, WorkbookEvaluatorProvider provider) {
         this.workbook = wb;
@@ -115,7 +115,7 @@ public class ConditionalFormattingEvalua
             }
             final SheetConditionalFormatting scf = sheet.getSheetConditionalFormatting();
             final int count = scf.getNumConditionalFormattings();
-            rules = new ArrayList<EvaluationConditionalFormatRule>(count);
+            rules = new ArrayList<>(count);
             formats.put(sheetName, rules);
             for (int i=0; i < count; i++) {
                 ConditionalFormatting f = scf.getConditionalFormattingAt(i);
@@ -154,7 +154,7 @@ public class ConditionalFormattingEvalua
         
         if (rules == null) {
             // compute and cache them
-            rules = new ArrayList<EvaluationConditionalFormatRule>();
+            rules = new ArrayList<>();
             
             Sheet sheet = null;
             if (cellRef.getSheetName() != null) sheet = workbook.getSheet(cellRef.getSheetName());
@@ -252,7 +252,7 @@ public class ConditionalFormattingEvalua
      * @return unmodifiable List of all cells in the rule's region matching the rule's condition
      */
     public List<Cell> getMatchingCells(EvaluationConditionalFormatRule rule) {
-        final List<Cell> cells = new ArrayList<Cell>();
+        final List<Cell> cells = new ArrayList<>();
         final Sheet sheet = rule.getSheet();
         
         for (CellRangeAddress region : rule.getRegions()) {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java Sat Sep 16 08:27:23 2017
@@ -63,7 +63,7 @@ public class DataValidationEvaluator {
      * there's no guarantee instances won't be recreated on the fly by some implementation.
      * So we use sheet name.
      */
-    private final Map<String, List<? extends DataValidation>> validations = new HashMap<String, List<? extends DataValidation>>();
+    private final Map<String, List<? extends DataValidation>> validations = new HashMap<>();
 
     private final Workbook workbook;
     private final WorkbookEvaluator workbookEvaluator;
@@ -187,7 +187,7 @@ public class DataValidationEvaluator {
         
         String formula = val.getFormula1();
         
-        final List<ValueEval> values = new ArrayList<ValueEval>();
+        final List<ValueEval> values = new ArrayList<>();
         
         if (val.getExplicitListValues() != null && val.getExplicitListValues().length > 0) {
             // assumes parsing interprets the overloaded property right for XSSF

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java Sat Sep 16 08:27:23 2017
@@ -78,7 +78,7 @@ public class EvaluationConditionalFormat
      * Depending on the rule type, it may want to know about certain values in the region when evaluating {@link #matches(Cell)},
      * such as top 10, unique, duplicate, average, etc.  This collection stores those if needed so they are not repeatedly calculated
      */
-    private final Map<CellRangeAddress, Set<ValueAndFormat>> meaningfulRegionValues = new HashMap<CellRangeAddress, Set<ValueAndFormat>>();
+    private final Map<CellRangeAddress, Set<ValueAndFormat>> meaningfulRegionValues = new HashMap<>();
     
     private final int priority;
     private final int formattingIndex;
@@ -435,10 +435,10 @@ public class EvaluationConditionalFormat
                         limit = allValues.size() * limit / 100;
                     }
                     if (allValues.size() <= limit) {
-                        return new HashSet<ValueAndFormat>(allValues);
+                        return new HashSet<>(allValues);
                     }
 
-                    return new HashSet<ValueAndFormat>(allValues.subList(0, limit));
+                    return new HashSet<>(allValues.subList(0, limit));
                 }
             }).contains(cv);
         case UNIQUE_VALUES:
@@ -450,7 +450,7 @@ public class EvaluationConditionalFormat
                     List<ValueAndFormat> values = allValues;
                     Collections.sort(values);
                     
-                    final Set<ValueAndFormat> unique = new HashSet<ValueAndFormat>();
+                    final Set<ValueAndFormat> unique = new HashSet<>();
                     
                     for (int i=0; i < values.size(); i++) {
                         final ValueAndFormat v = values.get(i);
@@ -475,7 +475,7 @@ public class EvaluationConditionalFormat
                     List<ValueAndFormat> values = allValues;
                     Collections.sort(values);
                     
-                    final Set<ValueAndFormat> dup = new HashSet<ValueAndFormat>();
+                    final Set<ValueAndFormat> dup = new HashSet<>();
                     
                     for (int i=0; i < values.size(); i++) {
                         final ValueAndFormat v = values.get(i);
@@ -496,21 +496,21 @@ public class EvaluationConditionalFormat
             final ConditionFilterData conf = rule.getFilterConfiguration();
 
             // actually ordered, so iteration order is predictable
-            List<ValueAndFormat> values = new ArrayList<ValueAndFormat>(getMeaningfulValues(region, false, new ValueFunction() {
+            List<ValueAndFormat> values = new ArrayList<>(getMeaningfulValues(region, false, new ValueFunction() {
                 @Override
                 public Set<ValueAndFormat> evaluate(List<ValueAndFormat> allValues) {
                     List<ValueAndFormat> values = allValues;
                     double total = 0;
                     ValueEval[] pop = new ValueEval[values.size()];
-                    for (int i=0; i < values.size(); i++) {
+                    for (int i = 0; i < values.size(); i++) {
                         ValueAndFormat v = values.get(i);
                         total += v.value.doubleValue();
                         pop[i] = new NumberEval(v.value.doubleValue());
                     }
-                    
-                    final Set<ValueAndFormat> avgSet = new LinkedHashSet<ValueAndFormat>(1);
+
+                    final Set<ValueAndFormat> avgSet = new LinkedHashSet<>(1);
                     avgSet.add(new ValueAndFormat(new Double(values.size() == 0 ? 0 : total / values.size()), null));
-                    
+
                     final double stdDev = values.size() <= 1 ? 0 : ((NumberEval) AggregateFunction.STDEV.evaluate(pop, 0, 0)).getNumberValue();
                     avgSet.add(new ValueAndFormat(new Double(stdDev), null));
                     return avgSet;
@@ -603,7 +603,7 @@ public class EvaluationConditionalFormat
             return values;
         }
         
-        List<ValueAndFormat> allValues = new ArrayList<ValueAndFormat>((region.getLastColumn() - region.getFirstColumn()+1) * (region.getLastRow() - region.getFirstRow() + 1));
+        List<ValueAndFormat> allValues = new ArrayList<>((region.getLastColumn() - region.getFirstColumn() + 1) * (region.getLastRow() - region.getFirstRow() + 1));
         
         for (int r=region.getFirstRow(); r <= region.getLastRow(); r++) {
             final Row row = sheet.getRow(r);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationTracker.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationTracker.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationTracker.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationTracker.java Sat Sep 16 08:27:23 2017
@@ -43,8 +43,8 @@ final class EvaluationTracker {
 
 	public EvaluationTracker(EvaluationCache cache) {
 		_cache = cache;
-		_evaluationFrames = new ArrayList<CellEvaluationFrame>();
-		_currentlyEvaluatingCells = new HashSet<FormulaCellCacheEntry>();
+		_evaluationFrames = new ArrayList<>();
+		_currentlyEvaluatingCells = new HashSet<>();
 	}
 
 	/**

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCache.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCache.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCache.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCache.java Sat Sep 16 08:27:23 2017
@@ -35,7 +35,7 @@ final class FormulaCellCache {
 
 	public FormulaCellCache() {
 		// assumes the object returned by EvaluationCell.getIdentityKey() has a well behaved hashCode+equals
-		_formulaEntriesByCell = new HashMap<Object, FormulaCellCacheEntry>();
+		_formulaEntriesByCell = new HashMap<>();
 	}
 
 	public CellCacheEntry[] getCacheEntries() {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCacheEntry.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCacheEntry.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCacheEntry.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/FormulaCellCacheEntry.java Sat Sep 16 08:27:23 2017
@@ -93,7 +93,7 @@ final class FormulaCellCacheEntry extend
 		if (nUsed < 1) {
 			usedSet = Collections.emptySet();
 		} else {
-			usedSet = new HashSet<CellCacheEntry>(nUsed * 3 / 2);
+			usedSet = new HashSet<>(nUsed * 3 / 2);
 			for (int i = 0; i < nUsed; i++) {
 				usedSet.add(usedCells[i]);
 			}

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java Sat Sep 16 08:27:23 2017
@@ -1448,7 +1448,7 @@ public final class FormulaParser {
     /** get arguments to a function */
     private ParseNode[] Arguments() {
         //average 2 args per function
-        List<ParseNode> temp = new ArrayList<ParseNode>(2);
+        List<ParseNode> temp = new ArrayList<>(2);
         SkipWhite();
         if(look == ')') {
             return ParseNode.EMPTY_ARRAY;
@@ -1576,7 +1576,7 @@ public final class FormulaParser {
     }
 
     private ParseNode parseArray() {
-        List<Object[]> rowsData = new ArrayList<Object[]>();
+        List<Object[]> rowsData = new ArrayList<>();
         while(true) {
             Object[] singleRowData = parseArrayRow();
             rowsData.add(singleRowData);
@@ -1607,7 +1607,7 @@ public final class FormulaParser {
     }
 
     private Object[] parseArrayRow() {
-        List<Object> temp = new ArrayList<Object>();
+        List<Object> temp = new ArrayList<>();
         while (true) {
             temp.add(parseArrayItem());
             SkipWhite();

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/FormulaRenderer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaRenderer.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/FormulaRenderer.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/FormulaRenderer.java Sat Sep 16 08:27:23 2017
@@ -47,7 +47,7 @@ public class FormulaRenderer {
         if (ptgs == null || ptgs.length == 0) {
             throw new IllegalArgumentException("ptgs must not be null");
         }
-        Stack<String> stack = new Stack<String>();
+        Stack<String> stack = new Stack<>();
 
         for (Ptg ptg : ptgs) {
             // TODO - what about MemNoMemPtg?

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/FormulaUsedBlankCellSet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaUsedBlankCellSet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/FormulaUsedBlankCellSet.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/FormulaUsedBlankCellSet.java Sat Sep 16 08:27:23 2017
@@ -59,7 +59,7 @@ final class FormulaUsedBlankCellSet {
 		private BlankCellRectangleGroup _currentRectangleGroup;
 
 		public BlankCellSheetGroup() {
-			_rectangleGroups = new ArrayList<BlankCellRectangleGroup>();
+			_rectangleGroups = new ArrayList<>();
 			_currentRowIndex = -1;
 		}
 
@@ -164,7 +164,7 @@ final class FormulaUsedBlankCellSet {
 	private final Map<BookSheetKey, BlankCellSheetGroup> _sheetGroupsByBookSheet;
 
 	public FormulaUsedBlankCellSet() {
-		_sheetGroupsByBookSheet = new HashMap<BookSheetKey, BlankCellSheetGroup>();
+		_sheetGroupsByBookSheet = new HashMap<>();
 	}
 
 	public void addCell(int bookIndex, int sheetIndex, int rowIndex, int columnIndex) {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java Sat Sep 16 08:27:23 2017
@@ -71,7 +71,7 @@ final class OperationEvaluatorFactory {
 	}
 
 	private static Map<OperationPtg, Function> initialiseInstancesMap() {
-		Map<OperationPtg, Function> m = new HashMap<OperationPtg, Function>(32);
+		Map<OperationPtg, Function> m = new HashMap<>(32);
 
 		put(m, EqualPtg.instance, RelationalOperationEval.EqualEval);
 		put(m, GreaterEqualPtg.instance, RelationalOperationEval.GreaterEqualEval);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/PlainCellCache.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/PlainCellCache.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/PlainCellCache.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/PlainCellCache.java Sat Sep 16 08:27:23 2017
@@ -78,7 +78,7 @@ final class PlainCellCache {
 	private Map<Loc, PlainValueCellCacheEntry> _plainValueEntriesByLoc;
 
 	public PlainCellCache() {
-		_plainValueEntriesByLoc = new HashMap<Loc, PlainValueCellCacheEntry>();
+		_plainValueEntriesByLoc = new HashMap<>();
 	}
 	public void put(Loc key, PlainValueCellCacheEntry cce) {
 		_plainValueEntriesByLoc.put(key, cce);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java Sat Sep 16 08:27:23 2017
@@ -95,8 +95,8 @@ public final class WorkbookEvaluator {
         _workbook = workbook;
         _evaluationListener = evaluationListener;
         _cache = new EvaluationCache(evaluationListener);
-        _sheetIndexesBySheet = new IdentityHashMap<EvaluationSheet, Integer>();
-        _sheetIndexesByName = new IdentityHashMap<String, Integer>();
+        _sheetIndexesBySheet = new IdentityHashMap<>();
+        _sheetIndexesByName = new IdentityHashMap<>();
         _collaboratingWorkbookEnvironment = CollaboratingWorkbooksEnvironment.EMPTY;
         _workbookIx = 0;
         _stabilityClassifier = stabilityClassifier;
@@ -401,7 +401,7 @@ public final class WorkbookEvaluator {
             dbgEvaluationOutputIndent++;
         }
 
-        Stack<ValueEval> stack = new Stack<ValueEval>();
+        Stack<ValueEval> stack = new Stack<>();
         for (int i = 0, iSize = ptgs.length; i < iSize; i++) {
             // since we don't know how to handle these yet :(
             Ptg ptg = ptgs[i];
@@ -928,7 +928,7 @@ public final class WorkbookEvaluator {
      * @return names of functions supported by POI
      */
     public static Collection<String> getSupportedFunctionNames(){
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         lst.addAll(FunctionEval.getSupportedFunctionNames());
         lst.addAll(AnalysisToolPak.getSupportedFunctionNames());
         return Collections.unmodifiableCollection(lst);
@@ -940,7 +940,7 @@ public final class WorkbookEvaluator {
      * @return names of functions NOT supported by POI
      */
     public static Collection<String> getNotSupportedFunctionNames(){
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         lst.addAll(FunctionEval.getNotSupportedFunctionNames());
         lst.addAll(AnalysisToolPak.getNotSupportedFunctionNames());
         return Collections.unmodifiableCollection(lst);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java Sat Sep 16 08:27:23 2017
@@ -78,7 +78,7 @@ public final class AnalysisToolPak imple
     }
 
     private Map<String, FreeRefFunction> createFunctionsMap() {
-        Map<String, FreeRefFunction> m = new HashMap<String, FreeRefFunction>(108);
+        Map<String, FreeRefFunction> m = new HashMap<>(108);
 
         r(m, "ACCRINT", null);
         r(m, "ACCRINTM", null);
@@ -211,7 +211,7 @@ public final class AnalysisToolPak imple
      */
     public static Collection<String> getSupportedFunctionNames(){
         AnalysisToolPak inst = (AnalysisToolPak)instance;
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for(Map.Entry<String, FreeRefFunction> me : inst._functionsByName.entrySet()){
             FreeRefFunction func = me.getValue();
             if(func != null && !(func instanceof NotImplemented)){
@@ -229,7 +229,7 @@ public final class AnalysisToolPak imple
      */
     public static Collection<String> getNotSupportedFunctionNames(){
         AnalysisToolPak inst = (AnalysisToolPak)instance;
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for(Map.Entry<String, FreeRefFunction> me : inst._functionsByName.entrySet()){
             FreeRefFunction func = me.getValue();
             if (func instanceof NotImplemented) {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/atp/ArgumentsEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/atp/ArgumentsEvaluator.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/atp/ArgumentsEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/atp/ArgumentsEvaluator.java Sat Sep 16 08:27:23 2017
@@ -82,7 +82,7 @@ final class ArgumentsEvaluator {
         if (arg instanceof StringEval) {
             return new double[]{ evaluateDateArg(arg, srcCellRow, srcCellCol) };
         } else if (arg instanceof AreaEvalBase) {
-            List<Double> valuesList = new ArrayList<Double>();
+            List<Double> valuesList = new ArrayList<>();
             AreaEvalBase area = (AreaEvalBase) arg;
             for (int i = area.getFirstRow(); i <= area.getLastRow(); i++) {
                 for (int j = area.getFirstColumn(); j <= area.getLastColumn(); j++) {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java Sat Sep 16 08:27:23 2017
@@ -26,7 +26,7 @@ import org.apache.poi.ss.usermodel.Formu
  * Evaluations for formula errors
  */
 public final class ErrorEval implements ValueEval {
-    private static final Map<FormulaError,ErrorEval> evals = new HashMap<FormulaError, ErrorEval>();
+    private static final Map<FormulaError,ErrorEval> evals = new HashMap<>();
     
     /** <b>#NULL!</b>  - Intersection of two cell ranges is empty */
     public static final ErrorEval NULL_INTERSECTION = new ErrorEval(FormulaError.NULL);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Sat Sep 16 08:27:23 2017
@@ -395,7 +395,7 @@ public final class FunctionEval {
      * @since 3.8 beta6
      */
     public static Collection<String> getSupportedFunctionNames() {
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for (int i = 0; i < functions.length; i++) {
             Function func = functions[i];
             FunctionMetadata metaData = FunctionMetadataRegistry.getFunctionByIndex(i);
@@ -414,7 +414,7 @@ public final class FunctionEval {
      * @since 3.8 beta6
      */
     public static Collection<String> getNotSupportedFunctionNames() {
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for (int i = 0; i < functions.length; i++) {
             Function func = functions[i];
             if (func != null && (func instanceof NotImplementedFunction)) {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefListEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefListEval.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefListEval.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefListEval.java Sat Sep 16 08:27:23 2017
@@ -24,7 +24,7 @@ import java.util.List;
  * Handling of a list of values, e.g. the 2nd argument in RANK(A1,(B1,B2,B3),1)
  */
 public class RefListEval implements ValueEval {
-    private final List<ValueEval> list = new ArrayList<ValueEval>();
+    private final List<ValueEval> list = new ArrayList<>();
 
     public RefListEval(ValueEval v1, ValueEval v2) {
         add(v1);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java Sat Sep 16 08:27:23 2017
@@ -49,7 +49,7 @@ final class ForkedEvaluationSheet implem
 
     public ForkedEvaluationSheet(EvaluationSheet masterSheet) {
         _masterSheet = masterSheet;
-        _sharedCellsByRowCol = new HashMap<RowColKey, ForkedEvaluationCell>();
+        _sharedCellsByRowCol = new HashMap<>();
     }
 
     @Override

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java Sat Sep 16 08:27:23 2017
@@ -47,7 +47,7 @@ final class ForkedEvaluationWorkbook imp
 
     public ForkedEvaluationWorkbook(EvaluationWorkbook master) {
         _masterBook = master;
-        _sharedSheetsByName = new HashMap<String, ForkedEvaluationSheet>();
+        _sharedSheetsByName = new HashMap<>();
     }
 
     public ForkedEvaluationCell getOrCreateUpdatableCell(String sheetName, int rowIndex,

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java Sat Sep 16 08:27:23 2017
@@ -37,9 +37,9 @@ final class FunctionDataBuilder {
 
 	public FunctionDataBuilder(int sizeEstimate) {
 		_maxFunctionIndex = -1;
-		_functionDataByName = new HashMap<String,FunctionMetadata>(sizeEstimate * 3 / 2);
-		_functionDataByIndex = new HashMap<Integer,FunctionMetadata>(sizeEstimate * 3 / 2);
-		_mutatingFunctionIndexes = new HashSet<Integer>();
+		_functionDataByName = new HashMap<>(sizeEstimate * 3 / 2);
+		_functionDataByIndex = new HashMap<>(sizeEstimate * 3 / 2);
+		_mutatingFunctionIndexes = new HashSet<>();
 	}
 
 	public void add(int functionIndex, String functionName, int minParams, int maxParams,

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java Sat Sep 16 08:27:23 2017
@@ -50,7 +50,7 @@ final class FunctionMetadataReader {
 		// except in these cases
 		"LOG10", "ATAN2", "DAYS360", "SUMXMY2", "SUMX2MY2", "SUMX2PY2",
 	};
-	private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<String>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
+	private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
 
 	public static FunctionMetadataRegistry createRegistry() {
 	    try {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/FactDouble.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/FactDouble.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/FactDouble.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/FactDouble.java Sat Sep 16 08:27:23 2017
@@ -46,7 +46,7 @@ public class FactDouble extends Fixed1Ar
     public static final FreeRefFunction instance = new FactDouble();
 
     //Caching of previously calculated factorial for speed
-    static HashMap<Integer, BigInteger> cache = new HashMap<Integer, BigInteger>();
+    static HashMap<Integer, BigInteger> cache = new HashMap<>();
 
     public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE) {
         int number;

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java Sat Sep 16 08:27:23 2017
@@ -76,7 +76,7 @@ public final class Mode implements Funct
 	public ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol) {
 		double result;
 		try {
-			List<Double> temp = new ArrayList<Double>();
+			List<Double> temp = new ArrayList<>();
 			for (int i = 0; i < args.length; i++) {
 				collectValues(args[i], temp);
 			}

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Subtotal.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Subtotal.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Subtotal.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Subtotal.java Sat Sep 16 08:27:23 2017
@@ -102,7 +102,7 @@ public class Subtotal implements Functio
 		}
 
 		// ignore the first arg, this is the function-type, we check for the length above
-		final List<ValueEval> list = new ArrayList<ValueEval>(Arrays.asList(args).subList(1, args.length));
+		final List<ValueEval> list = new ArrayList<>(Arrays.asList(args).subList(1, args.length));
 
 		Iterator<ValueEval> it = list.iterator();
 

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/ptg/Ptg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/ptg/Ptg.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/ptg/Ptg.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/ptg/Ptg.java Sat Sep 16 08:27:23 2017
@@ -44,7 +44,7 @@ public abstract class Ptg {
 	 * Extra data (beyond <tt>size</tt>) may be read if and <tt>ArrayPtg</tt>s are present.
 	 */
 	public static Ptg[] readTokens(int size, LittleEndianInput in) {
-		List<Ptg> temp = new ArrayList<Ptg>(4 + size / 2);
+		List<Ptg> temp = new ArrayList<>(4 + size / 2);
 		int pos = 0;
 		boolean hasArrayPtgs = false;
 		while (pos < size) {
@@ -205,7 +205,7 @@ public abstract class Ptg {
 			ptg.write(out);
 			if (ptg instanceof ArrayPtg) {
 				if (arrayPtgs == null) {
-					arrayPtgs = new ArrayList<Ptg>(5);
+					arrayPtgs = new ArrayList<>(5);
 				}
 				arrayPtgs.add(ptg);
 			}

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/udf/AggregatingUDFFinder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/udf/AggregatingUDFFinder.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/udf/AggregatingUDFFinder.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/udf/AggregatingUDFFinder.java Sat Sep 16 08:27:23 2017
@@ -39,7 +39,7 @@ public class AggregatingUDFFinder implem
     private final Collection<UDFFinder> _usedToolPacks;
 
     public AggregatingUDFFinder(UDFFinder ... usedToolPacks) {
-        _usedToolPacks = new ArrayList<UDFFinder>(usedToolPacks.length);
+        _usedToolPacks = new ArrayList<>(usedToolPacks.length);
         _usedToolPacks.addAll(Arrays.asList(usedToolPacks));
     }
 

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/udf/DefaultUDFFinder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/udf/DefaultUDFFinder.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/udf/DefaultUDFFinder.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/udf/DefaultUDFFinder.java Sat Sep 16 08:27:23 2017
@@ -37,7 +37,7 @@ public final class DefaultUDFFinder impl
             throw new IllegalArgumentException(
                     "Mismatch in number of function names and implementations");
         }
-        HashMap<String, FreeRefFunction> m = new HashMap<String, FreeRefFunction>(nFuncs * 3 / 2);
+        HashMap<String, FreeRefFunction> m = new HashMap<>(nFuncs * 3 / 2);
         for (int i = 0; i < functionImpls.length; i++) {
             m.put(functionNames[i].toUpperCase(Locale.ROOT), functionImpls[i]);
         }

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java Sat Sep 16 08:27:23 2017
@@ -32,7 +32,7 @@ public class IndexedUDFFinder extends Ag
 
     public IndexedUDFFinder(UDFFinder... usedToolPacks) {
         super(usedToolPacks);
-        _funcMap = new HashMap<Integer, String>();
+        _funcMap = new HashMap<>();
     }
 
     @Override

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionType.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionType.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ConditionType.java Sat Sep 16 08:27:23 2017
@@ -26,7 +26,7 @@ import java.util.Map;
  * Represents a type of a conditional formatting rule
  */
 public class ConditionType {
-    private static Map<Integer,ConditionType> lookup = new HashMap<Integer, ConditionType>();
+    private static Map<Integer,ConditionType> lookup = new HashMap<>();
     
     /**
      * This conditional formatting rule compares a cell value

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java Sat Sep 16 08:27:23 2017
@@ -202,7 +202,7 @@ public class DataFormatter implements Ob
      * A map to cache formats.
      *  Map<String,Format> formats
      */
-    private final Map<String,Format> formats = new HashMap<String,Format>();
+    private final Map<String,Format> formats = new HashMap<>();
 
     private final boolean emulateCSV;
 
@@ -508,7 +508,7 @@ public class DataFormatter implements Ob
         StringBuilder sb = new StringBuilder();
         char[] chars = formatStr.toCharArray();
         boolean mIsMonth = true;
-        List<Integer> ms = new ArrayList<Integer>();
+        List<Integer> ms = new ArrayList<>();
         boolean isElapsed = false;
         for(int j=0; j<chars.length; j++) {
             char c = chars[j];

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java [UTF-8] (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java [UTF-8] Sat Sep 16 08:27:23 2017
@@ -333,8 +333,8 @@ public class DateUtil {
             return -1;
         }
     };
-    private static ThreadLocal<String> lastFormatString = new ThreadLocal<String>();
-    private static ThreadLocal<Boolean> lastCachedResult = new ThreadLocal<Boolean>();
+    private static ThreadLocal<String> lastFormatString = new ThreadLocal<>();
+    private static ThreadLocal<Boolean> lastCachedResult = new ThreadLocal<>();
     
     private static boolean isCached(String formatString, int formatIndex) {
         String cachedFormatString = lastFormatString.get();

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaError.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaError.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaError.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaError.java Sat Sep 16 08:27:23 2017
@@ -147,9 +147,9 @@ public enum FormulaError {
         return repr;
     }
 
-    private static final Map<String, FormulaError> smap = new HashMap<String, FormulaError>();
-    private static final Map<Byte, FormulaError> bmap = new HashMap<Byte, FormulaError>();
-    private static final Map<Integer, FormulaError> imap = new HashMap<Integer, FormulaError>();
+    private static final Map<String, FormulaError> smap = new HashMap<>();
+    private static final Map<Byte, FormulaError> bmap = new HashMap<>();
+    private static final Map<Integer, FormulaError> imap = new HashMap<>();
     static{
         for (FormulaError error : values()) {
             bmap.put(error.getCode(), error);

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java Sat Sep 16 08:27:23 2017
@@ -35,7 +35,7 @@ public class DataSources {
     }
 
     public static <T> ChartDataSource<T> fromArray(T[] elements) {
-        return new ArrayDataSource<T>(elements);
+        return new ArrayDataSource<>(elements);
     }
 
     public static ChartDataSource<Number> fromNumericCellRange(Sheet sheet, CellRangeAddress cellRangeAddress) {

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/helpers/RowShifter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/helpers/RowShifter.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/helpers/RowShifter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/helpers/RowShifter.java Sat Sep 16 08:27:23 2017
@@ -50,8 +50,8 @@ public abstract class RowShifter {
      * @return an array of affected merged regions, doesn't contain deleted ones
      */
     public List<CellRangeAddress> shiftMergedRegions(int startRow, int endRow, int n) {
-        List<CellRangeAddress> shiftedRegions = new ArrayList<CellRangeAddress>();
-        Set<Integer> removedIndices = new HashSet<Integer>();
+        List<CellRangeAddress> shiftedRegions = new ArrayList<>();
+        Set<Integer> removedIndices = new HashSet<>();
         //move merged regions completely if they fall within the new region boundaries when they are shifted
         int size = sheet.getNumMergedRegions();
         for (int i = 0; i < size; i++) {

Modified: poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java Sat Sep 16 08:27:23 2017
@@ -236,7 +236,7 @@ public class AreaReference {
         if (null == version) {
             version = DEFAULT_SPREADSHEET_VERSION; // how the code used to behave. 
         }
-        List<AreaReference> refs = new ArrayList<AreaReference>();
+        List<AreaReference> refs = new ArrayList<>();
         StringTokenizer st = new StringTokenizer(reference, ",");
         while(st.hasMoreTokens()) {
             refs.add(
@@ -287,7 +287,7 @@ public class AreaReference {
         int maxCol = Math.max(_firstCell.getCol(), _lastCell.getCol());
         String sheetName = _firstCell.getSheetName();
         
-        List<CellReference> refs = new ArrayList<CellReference>();
+        List<CellReference> refs = new ArrayList<>();
         for(int row=minRow; row<=maxRow; row++) {
             for(int col=minCol; col<=maxCol; col++) {
                 CellReference ref = new CellReference(sheetName, row, col, _firstCell.isRowAbsolute(), _firstCell.isColAbsolute());

Modified: poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressList.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressList.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressList.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressList.java Sat Sep 16 08:27:23 2017
@@ -45,7 +45,7 @@ public class CellRangeAddressList {
 	protected final List<CellRangeAddress> _list;
 
 	public CellRangeAddressList() {
-		_list = new ArrayList<CellRangeAddress>();
+		_list = new ArrayList<>();
 	}
 	/**
 	 * Convenience constructor for creating a <tt>CellRangeAddressList</tt> with a single 

Modified: poi/trunk/src/java/org/apache/poi/ss/util/CellRangeUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellRangeUtil.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/CellRangeUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/CellRangeUtil.java Sat Sep 16 08:27:23 2017
@@ -171,7 +171,7 @@ public final class CellRangeUtil {
         return result;
     }
     private static List<CellRangeAddress> toList(CellRangeAddress[] temp) {
-        List<CellRangeAddress> result = new ArrayList<CellRangeAddress>(temp.length);
+        List<CellRangeAddress> result = new ArrayList<>(temp.length);
         for (CellRangeAddress range : temp) {
             result.add(range);
         }

Modified: poi/trunk/src/java/org/apache/poi/ss/util/CellUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellUtil.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/CellUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/CellUtil.java Sat Sep 16 08:27:23 2017
@@ -75,7 +75,7 @@ public final class CellUtil {
     public static final String WRAP_TEXT = "wrapText";
     
     private static final Set<String> shortValues = Collections.unmodifiableSet(
-            new HashSet<String>(Arrays.asList(
+            new HashSet<>(Arrays.asList(
                     BOTTOM_BORDER_COLOR,
                     LEFT_BORDER_COLOR,
                     RIGHT_BORDER_COLOR,
@@ -86,20 +86,20 @@ public final class CellUtil {
                     DATA_FORMAT,
                     FONT,
                     ROTATION
-    )));
+            )));
     private static final Set<String> booleanValues = Collections.unmodifiableSet(
-            new HashSet<String>(Arrays.asList(
+            new HashSet<>(Arrays.asList(
                     LOCKED,
                     HIDDEN,
                     WRAP_TEXT
-    )));
+            )));
     private static final Set<String> borderTypeValues = Collections.unmodifiableSet(
-            new HashSet<String>(Arrays.asList(
+            new HashSet<>(Arrays.asList(
                     BORDER_BOTTOM,
                     BORDER_LEFT,
                     BORDER_RIGHT,
                     BORDER_TOP
-    )));
+            )));
     
 
 
@@ -334,7 +334,7 @@ public final class CellUtil {
      * @see #setFormatProperties(org.apache.poi.ss.usermodel.CellStyle, org.apache.poi.ss.usermodel.Workbook, java.util.Map)
      */
     private static Map<String, Object> getFormatProperties(CellStyle style) {
-        Map<String, Object> properties = new HashMap<String, Object>();
+        Map<String, Object> properties = new HashMap<>();
         put(properties, ALIGNMENT, style.getAlignmentEnum());
         put(properties, VERTICAL_ALIGNMENT, style.getVerticalAlignmentEnum());
         put(properties, BORDER_BOTTOM, style.getBorderBottomEnum());

Modified: poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java Sat Sep 16 08:27:23 2017
@@ -81,7 +81,7 @@ public class DateFormatConverter  {
 		}
 		
 		public static String[] tokenize( String format ) {
-			List<String> result = new ArrayList<String>();
+			List<String> result = new ArrayList<>();
 			
 			DateFormatTokenizer tokenizer = new DateFormatTokenizer(format);
 			String token;
@@ -113,7 +113,7 @@ public class DateFormatConverter  {
 	private static Map<String,String> localePrefixes = prepareLocalePrefixes();
 	
 	private static Map<String,String> prepareTokenConversions() {
-		Map<String,String> result = new HashMap<String,String>();
+		Map<String,String> result = new HashMap<>();
 		
 		result.put( "EEEE", "dddd" );
 		result.put( "EEE", "ddd" );
@@ -135,7 +135,7 @@ public class DateFormatConverter  {
 	}
 	
 	private static Map<String,String> prepareLocalePrefixes() {
-		Map<String,String> result = new HashMap<String,String>();
+		Map<String,String> result = new HashMap<>();
 		
 		result.put( "af", "[$-0436]" );
 		result.put( "am", "[$-45E]" );

Modified: poi/trunk/src/java/org/apache/poi/ss/util/PropertyTemplate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/PropertyTemplate.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/PropertyTemplate.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/PropertyTemplate.java Sat Sep 16 08:27:23 2017
@@ -63,7 +63,7 @@ public final class PropertyTemplate {
      * Create a PropertyTemplate object
      */
     public PropertyTemplate() {
-        _propertyTemplate = new HashMap<CellAddress, Map<String, Object>>();
+        _propertyTemplate = new HashMap<>();
     }
     
     /**
@@ -83,7 +83,7 @@ public final class PropertyTemplate {
     }
     
     private static Map<String, Object> cloneCellProperties(Map<String, Object> properties) {
-        Map<String, Object> newProperties = new HashMap<String, Object>(); 
+        Map<String, Object> newProperties = new HashMap<>();
         for(Map.Entry<String, Object> entry : properties.entrySet()) {
             newProperties.put(entry.getKey(), entry.getValue());
         }
@@ -411,7 +411,7 @@ public final class PropertyTemplate {
      * @parm range - {@link CellRangeAddress} range of cells to remove borders.
      */
     private void removeBorders(CellRangeAddress range) {
-        Set<String> properties = new HashSet<String>();
+        Set<String> properties = new HashSet<>();
         properties.add(CellUtil.BORDER_TOP);
         properties.add(CellUtil.BORDER_BOTTOM);
         properties.add(CellUtil.BORDER_LEFT);
@@ -758,7 +758,7 @@ public final class PropertyTemplate {
      * @parm range - {@link CellRangeAddress} range of cells to remove borders.
      */
     private void removeBorderColors(CellRangeAddress range) {
-        Set<String> properties = new HashSet<String>();
+        Set<String> properties = new HashSet<>();
         properties.add(CellUtil.TOP_BORDER_COLOR);
         properties.add(CellUtil.BOTTOM_BORDER_COLOR);
         properties.add(CellUtil.LEFT_BORDER_COLOR);
@@ -795,7 +795,7 @@ public final class PropertyTemplate {
         CellAddress cell = new CellAddress(row, col);
         Map<String, Object> cellProperties = _propertyTemplate.get(cell);
         if (cellProperties == null) {
-            cellProperties = new HashMap<String, Object>();
+            cellProperties = new HashMap<>();
         }
         cellProperties.put(property, value);
         _propertyTemplate.put(cell, cellProperties);

Modified: poi/trunk/src/java/org/apache/poi/ss/util/SSCellRange.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/SSCellRange.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/SSCellRange.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/SSCellRange.java Sat Sep 16 08:27:23 2017
@@ -57,7 +57,7 @@ public final class SSCellRange<K extends
 		@SuppressWarnings("unchecked")
 		B[] flattenedArray = (B[]) Array.newInstance(cellClass, nItems);
 		flattenedList.toArray(flattenedArray);
-		return new SSCellRange<B>(firstRow, firstColumn, height, width, flattenedArray);
+		return new SSCellRange<>(firstRow, firstColumn, height, width, flattenedArray);
 	}
 
 	public int getHeight() {
@@ -109,7 +109,7 @@ public final class SSCellRange<K extends
 		return result;
 	}
 	public Iterator<K> iterator() {
-		return new ArrayIterator<K>(_flattenedArray);
+		return new ArrayIterator<>(_flattenedArray);
 	}
 	private static final class ArrayIterator<D> implements Iterator<D> {
 

Modified: poi/trunk/src/java/org/apache/poi/util/BitFieldFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/BitFieldFactory.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/BitFieldFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/BitFieldFactory.java Sat Sep 16 08:27:23 2017
@@ -24,7 +24,7 @@ import java.util.*;
  * Returns immutable Bitfield instances.
  */
 public class BitFieldFactory {
-    private static Map<Integer, BitField> instances = new HashMap<Integer, BitField>();
+    private static Map<Integer, BitField> instances = new HashMap<>();
 
     public static BitField getInstance(int mask) {
       BitField f = instances.get(Integer.valueOf(mask));

Modified: poi/trunk/src/java/org/apache/poi/util/HexRead.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/HexRead.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/HexRead.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/HexRead.java Sat Sep 16 08:27:23 2017
@@ -95,7 +95,7 @@ public class HexRead {
     {
         int characterCount = 0;
         byte b = (byte) 0;
-        List<Byte> bytes = new ArrayList<Byte>();
+        List<Byte> bytes = new ArrayList<>();
         final char a = 'a' - 10;
         final char A = 'A' - 10;
         while ( true ) {

Modified: poi/trunk/src/java/org/apache/poi/util/IntMapper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/IntMapper.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/IntMapper.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/IntMapper.java Sat Sep 16 08:27:23 2017
@@ -52,8 +52,8 @@ public class IntMapper<T>
 
     public IntMapper(final int initialCapacity)
     {
-        elements = new ArrayList<T>(initialCapacity);
-        valueKeyMap = new HashMap<T,Integer>(initialCapacity);
+        elements = new ArrayList<>(initialCapacity);
+        valueKeyMap = new HashMap<>(initialCapacity);
     }
 
     /**

Modified: poi/trunk/src/java/org/apache/poi/util/LocaleUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/LocaleUtil.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/LocaleUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/LocaleUtil.java Sat Sep 16 08:27:23 2017
@@ -52,8 +52,8 @@ public final class LocaleUtil {
      */
     public static final Charset CHARSET_1252 = Charset.forName("CP1252");
 
-    private static final ThreadLocal<TimeZone> userTimeZone = new ThreadLocal<TimeZone>();
-    private static final ThreadLocal<Locale> userLocale = new ThreadLocal<Locale>();
+    private static final ThreadLocal<TimeZone> userTimeZone = new ThreadLocal<>();
+    private static final ThreadLocal<Locale> userLocale = new ThreadLocal<>();
     
     /**
      * As time zone information is not stored in any format, it can be

Modified: poi/trunk/src/java/org/apache/poi/util/POILogFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/POILogFactory.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/POILogFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/POILogFactory.java Sat Sep 16 08:27:23 2017
@@ -35,7 +35,7 @@ public final class POILogFactory {
     /**
      * Map of POILogger instances, with classes as keys
      */
-    private static final Map<String,POILogger> _loggers = new HashMap<String,POILogger>();
+    private static final Map<String,POILogger> _loggers = new HashMap<>();
 
     /**
      * A common instance of NullLogger, as it does nothing

Modified: poi/trunk/src/java/org/apache/poi/util/StringUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/StringUtil.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/StringUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/StringUtil.java Sat Sep 16 08:27:23 2017
@@ -370,7 +370,7 @@ public class StringUtil {
    
    private static synchronized void initMsCodepointMap() {
        if (msCodepointToUnicode != null) return;
-       msCodepointToUnicode = new HashMap<Integer,Integer>();
+       msCodepointToUnicode = new HashMap<>();
        int i=0xF020;
        for (int ch : symbolMap_f020) {
            msCodepointToUnicode.put(i++, ch);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocument.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocument.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocument.java Sat Sep 16 08:27:23 2017
@@ -159,7 +159,7 @@ public abstract class POIXMLDocument ext
     public abstract List<PackagePart> getAllEmbedds() throws OpenXML4JException;
 
     protected final void load(POIXMLFactory factory) throws IOException {
-        Map<PackagePart, POIXMLDocumentPart> context = new HashMap<PackagePart, POIXMLDocumentPart>();
+        Map<PackagePart, POIXMLDocumentPart> context = new HashMap<>();
         try {
             read(factory, context);
         } catch (OpenXML4JException e){
@@ -216,7 +216,7 @@ public abstract class POIXMLDocument ext
         
         //force all children to commit their changes into the underlying OOXML Package
         // TODO Shouldn't they be committing to the new one instead?
-        Set<PackagePart> context = new HashSet<PackagePart>();
+        Set<PackagePart> context = new HashSet<>();
         onSave(context);
         context.clear();
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java Sat Sep 16 08:27:23 2017
@@ -54,7 +54,7 @@ public class POIXMLDocumentPart {
     private String coreDocumentRel = PackageRelationshipTypes.CORE_DOCUMENT;
     private PackagePart packagePart;
     private POIXMLDocumentPart parent;
-    private Map<String,RelationPart> relations = new LinkedHashMap<String,RelationPart>();
+    private Map<String,RelationPart> relations = new LinkedHashMap<>();
 
     /**
      * The RelationPart is a cached relationship between the document, which contains the RelationPart,
@@ -202,7 +202,7 @@ public class POIXMLDocumentPart {
      * @return child relations
      */
     public final List<POIXMLDocumentPart> getRelations(){
-        List<POIXMLDocumentPart> l = new ArrayList<POIXMLDocumentPart>();
+        List<POIXMLDocumentPart> l = new ArrayList<>();
         for (RelationPart rp : relations.values()) {
             l.add(rp.getDocumentPart());
         }
@@ -215,7 +215,7 @@ public class POIXMLDocumentPart {
      * @return child relations
      */
     public final List<RelationPart> getRelationParts() {
-        List<RelationPart> l = new ArrayList<RelationPart>(relations.values());
+        List<RelationPart> l = new ArrayList<>(relations.values());
         return Collections.unmodifiableList(l);
     }
 
@@ -554,7 +554,7 @@ public class POIXMLDocumentPart {
         if (!pp.hasRelationships()) return;
 
         PackageRelationshipCollection rels = packagePart.getRelationships();
-        List<POIXMLDocumentPart> readLater = new ArrayList<POIXMLDocumentPart>();
+        List<POIXMLDocumentPart> readLater = new ArrayList<>();
 
         // scan breadth-first, so parent-relations are hopefully the shallowest element
         for (PackageRelationship rel : rels) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java Sat Sep 16 08:27:23 2017
@@ -50,7 +50,7 @@ import org.xml.sax.SAXException;
 @SuppressWarnings("deprecation")
 public class POIXMLTypeLoader {
 
-    private static ThreadLocal<SchemaTypeLoader> typeLoader = new ThreadLocal<SchemaTypeLoader>();
+    private static ThreadLocal<SchemaTypeLoader> typeLoader = new ThreadLocal<>();
 
     // TODO: Do these have a good home like o.a.p.openxml4j.opc.PackageNamespaces and PackageRelationshipTypes?
     // These constants should be common to all of POI and easy to use by other applications such as Tika
@@ -76,7 +76,7 @@ public class POIXMLTypeLoader {
         // when reading properties in separate workbooks in multiple threads
         // DEFAULT_XML_OPTIONS.setUnsynchronized();
 
-        Map<String, String> map = new HashMap<String, String>();
+        Map<String, String> map = new HashMap<>();
         map.put("http://schemas.openxmlformats.org/drawingml/2006/main", "a");
         map.put("http://schemas.openxmlformats.org/drawingml/2006/chart", "c");
         map.put("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", "wp");

Modified: poi/trunk/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java Sat Sep 16 08:27:23 2017
@@ -326,9 +326,9 @@ public class ExtractorFactory {
      */
     public static POITextExtractor[] getEmbededDocsTextExtractors(POIOLE2TextExtractor ext) throws IOException, OpenXML4JException, XmlException {
         // All the embedded directories we spotted
-        ArrayList<Entry> dirs = new ArrayList<Entry>();
+        ArrayList<Entry> dirs = new ArrayList<>();
         // For anything else not directly held in as a POIFS directory
-        ArrayList<InputStream> nonPOIFS = new ArrayList<InputStream>();
+        ArrayList<InputStream> nonPOIFS = new ArrayList<>();
 
         // Find all the embedded directories
         DirectoryEntry root = ext.getRoot();
@@ -381,7 +381,7 @@ public class ExtractorFactory {
             return new POITextExtractor[0];
         }
 
-        ArrayList<POITextExtractor> textExtractors = new ArrayList<POITextExtractor>();
+        ArrayList<POITextExtractor> textExtractors = new ArrayList<>();
         for (Entry dir : dirs) {
             textExtractors.add(createExtractor((DirectoryNode) dir));
         }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java Sat Sep 16 08:27:23 2017
@@ -146,8 +146,8 @@ public abstract class OPCPackage impleme
 	 * Initialize the package instance.
 	 */
 	private void init() {
-		this.partMarshallers = new HashMap<ContentType, PartMarshaller>(5);
-		this.partUnmarshallers = new HashMap<ContentType, PartUnmarshaller>(2);
+		this.partMarshallers = new HashMap<>(5);
+		this.partUnmarshallers = new HashMap<>(2);
 
 		try {
 			// Add 'default' unmarshaller
@@ -417,7 +417,7 @@ public abstract class OPCPackage impleme
 			pkg.packageProperties = new PackagePropertiesPart(pkg,
 					PackagingURIHelper.CORE_PROPERTIES_PART_NAME);
 			pkg.packageProperties.setCreatorProperty("Generated by Apache POI OpenXML4J");
-			pkg.packageProperties.setCreatedProperty(new Nullable<Date>(new Date()));
+			pkg.packageProperties.setCreatedProperty(new Nullable<>(new Date()));
 		} catch (InvalidFormatException e) {
 			// Should never happen
 			throw new IllegalStateException(e);
@@ -648,7 +648,7 @@ public abstract class OPCPackage impleme
 	 * @return All part associated to the specified content type.
 	 */
 	public ArrayList<PackagePart> getPartsByContentType(String contentType) {
-		ArrayList<PackagePart> retArr = new ArrayList<PackagePart>();
+		ArrayList<PackagePart> retArr = new ArrayList<>();
 		for (PackagePart part : partList.sortedValues()) {
 			if (part.getContentType().equals(contentType)) {
 				retArr.add(part);
@@ -671,7 +671,7 @@ public abstract class OPCPackage impleme
 		if (relationshipType == null) {
 			throw new IllegalArgumentException("relationshipType");
 		}
-		ArrayList<PackagePart> retArr = new ArrayList<PackagePart>();
+		ArrayList<PackagePart> retArr = new ArrayList<>();
 		for (PackageRelationship rel : getRelationshipsByType(relationshipType)) {
 			PackagePart part = getPart(rel);
 			if (part != null) {
@@ -695,7 +695,7 @@ public abstract class OPCPackage impleme
 	        throw new IllegalArgumentException("name pattern must not be null");
 	    }
 	    Matcher matcher = namePattern.matcher("");
-	    ArrayList<PackagePart> result = new ArrayList<PackagePart>();
+	    ArrayList<PackagePart> result = new ArrayList<>();
 	    for (PackagePart part : partList.sortedValues()) {
 	        PackagePartName partName = part.getPartName();
 	        if (matcher.reset(partName.getName()).matches()) {
@@ -811,7 +811,7 @@ public abstract class OPCPackage impleme
 				}
 			}
 		}
-		return new ArrayList<PackagePart>(partList.sortedValues());
+		return new ArrayList<>(partList.sortedValues());
 	}
 
 	/**

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePartCollection.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePartCollection.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePartCollection.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePartCollection.java Sat Sep 16 08:27:23 2017
@@ -36,10 +36,10 @@ public final class PackagePartCollection
 	 * HashSet use to store this collection part names as string for rule
 	 * M1.11 optimized checking.
 	 */
-	private HashSet<String> registerPartNameStr = new HashSet<String>();
+	private HashSet<String> registerPartNameStr = new HashSet<>();
 
 
-	private final HashMap<PackagePartName, PackagePart> packagePartLookup = new HashMap<PackagePartName, PackagePart>();
+	private final HashMap<PackagePartName, PackagePart> packagePartLookup = new HashMap<>();
 
 
 	/**
@@ -79,7 +79,7 @@ public final class PackagePartCollection
 	 * avoids paying the high cost of Natural Ordering per insertion.
 	 */
 	public Collection<PackagePart> sortedValues() {
-		ArrayList<PackagePart> packageParts = new ArrayList<PackagePart>(packagePartLookup.values());
+		ArrayList<PackagePart> packageParts = new ArrayList<>(packagePartLookup.values());
 		Collections.sort(packageParts);
 		return packageParts;
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java Sat Sep 16 08:27:23 2017
@@ -55,7 +55,7 @@ public final class PackageRelationshipCo
     /**
      * A lookup of internal relationships to avoid
      */
-    private HashMap<String, PackageRelationship> internalRelationshipsByTargetName = new HashMap<String, PackageRelationship>();
+    private HashMap<String, PackageRelationship> internalRelationshipsByTargetName = new HashMap<>();
 
 
     /**
@@ -88,8 +88,8 @@ public final class PackageRelationshipCo
      * Constructor.
      */
     PackageRelationshipCollection() {
-        relationshipsByID = new TreeMap<String, PackageRelationship>();
-        relationshipsByType = new TreeMap<String, PackageRelationship>();
+        relationshipsByID = new TreeMap<>();
+        relationshipsByType = new TreeMap<>();
     }
 
     /**
@@ -392,7 +392,7 @@ public final class PackageRelationshipCo
      *         specified type contain in this collection.
      */
     public Iterator<PackageRelationship> iterator(String typeFilter) {
-        ArrayList<PackageRelationship> retArr = new ArrayList<PackageRelationship>();
+        ArrayList<PackageRelationship> retArr = new ArrayList<>();
         for (PackageRelationship rel : relationshipsByID.values()) {
             if (rel.getRelationshipType().equals(typeFilter))
                 retArr.add(rel);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java Sat Sep 16 08:27:23 2017
@@ -162,7 +162,7 @@ public final class ContentType {
 			this.subType = mMediaType.group(2);
 			
 			// Parameters
-			this.parameters = new HashMap<String, String>();
+			this.parameters = new HashMap<>();
 			// Java RegExps are unhelpful, and won't do multiple group captures
 			// See http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#cg
 			if (mMediaType.groupCount() >= 5) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java Sat Sep 16 08:27:23 2017
@@ -94,7 +94,7 @@ public abstract class ContentTypeManager
 	public ContentTypeManager(InputStream in, OPCPackage pkg)
 			throws InvalidFormatException {
 		this.container = pkg;
-		this.defaultContentType = new TreeMap<String, String>();
+		this.defaultContentType = new TreeMap<>();
 		if (in != null) {
 			try {
 				parseContentTypesFile(in);
@@ -167,7 +167,7 @@ public abstract class ContentTypeManager
 	private void addOverrideContentType(PackagePartName partName,
 			String contentType) {
 		if (overrideContentType == null)
-			overrideContentType = new TreeMap<PackagePartName, String>();
+			overrideContentType = new TreeMap<>();
 		overrideContentType.put(partName, contentType);
 	}
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message