freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject incubator-freemarker git commit: Use Java 7 diamonds where possible
Date Fri, 17 Feb 2017 14:14:50 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 a5d9575f3 -> ac6626753


Use Java 7 diamonds where possible


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/ac662675
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/ac662675
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/ac662675

Branch: refs/heads/3
Commit: ac66267536cab34cd4a26c2f86dc3f920e611548
Parents: a5d9575
Author: ddekany <ddekany@apache.org>
Authored: Fri Feb 17 15:14:33 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Fri Feb 17 15:14:33 2017 +0100

----------------------------------------------------------------------
 .../apache/freemarker/core/Configuration.java   | 10 ++++----
 .../org/apache/freemarker/core/ast/BuiltIn.java |  4 +--
 .../freemarker/core/ast/Configurable.java       |  6 ++---
 .../apache/freemarker/core/ast/Environment.java |  6 ++---
 .../core/ast/ExtendedDecimalFormatParser.java   |  2 +-
 .../core/ast/JavaTemplateDateFormatFactory.java |  2 +-
 .../ast/JavaTemplateNumberFormatFactory.java    |  2 +-
 .../core/ast/TemplateConfiguration.java         |  2 +-
 .../model/impl/DefaultObjectWrapperBuilder.java |  5 ++--
 .../core/model/impl/beans/ArgumentTypes.java    |  4 +--
 .../core/model/impl/beans/BeanModel.java        |  4 +--
 .../core/model/impl/beans/BeansWrapper.java     |  4 +--
 .../model/impl/beans/BeansWrapperBuilder.java   |  5 ++--
 .../model/impl/beans/ClassIntrospector.java     | 22 ++++++++---------
 .../core/model/impl/beans/ModelCache.java       |  4 +--
 .../core/model/impl/beans/_BeansAPI.java        |  8 +++---
 .../core/model/impl/dom/NodeOutputter.java      |  2 +-
 .../impl/DefaultTemplateResolver.java           |  2 +-
 .../impl/MultiTemplateLoader.java               |  2 +-
 .../freemarker/servlet/jsp/TaglibFactory.java   |  2 +-
 .../freemarker/core/ConfigurationTest.java      | 14 +++++------
 .../freemarker/core/ast/CamelCaseTest.java      |  2 +-
 .../freemarker/core/ast/ConfigurableTest.java   |  8 +++---
 .../core/ast/DirectiveCallPlaceTest.java        |  2 +-
 .../core/ast/TemplateConfigurationTest.java     | 16 ++++++------
 .../model/impl/DefaultObjectWrapperTest.java    | 24 +++++++++---------
 .../impl/beans/AlphabeticalMethodSorter.java    |  2 +-
 .../impl/beans/BeansWrapperSingletonsTest.java  |  6 ++---
 .../beans/Java7MembersOnlyBeansWrapper.java     |  2 +-
 .../manualtest/CustomFormatsExample.java        |  8 +++---
 .../test/MonitoredTemplateLoader.java           |  2 +-
 .../apache/freemarker/test/TemplateTest.java    |  2 +-
 .../freemarker/test/servlet/WebAppTestCase.java |  2 +-
 .../test/templatesuite/TemplateTestCase.java    | 26 ++++++++++----------
 .../test/templatesuite/TemplateTestSuite.java   | 10 ++++----
 .../test/templatesuite/models/Listables.java    | 14 +++++------
 .../models/OverloadedMethods2.java              |  6 ++---
 37 files changed, 121 insertions(+), 123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/Configuration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/Configuration.java b/src/main/java/org/apache/freemarker/core/Configuration.java
index 023ea8b..94026ec 100644
--- a/src/main/java/org/apache/freemarker/core/Configuration.java
+++ b/src/main/java/org/apache/freemarker/core/Configuration.java
@@ -363,7 +363,7 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
     
     private static final Map<String, OutputFormat> STANDARD_OUTPUT_FORMATS;
     static {
-        STANDARD_OUTPUT_FORMATS = new HashMap<String, OutputFormat>();
+        STANDARD_OUTPUT_FORMATS = new HashMap<>();
         STANDARD_OUTPUT_FORMATS.put(UndefinedOutputFormat.INSTANCE.getName(), UndefinedOutputFormat.INSTANCE);
         STANDARD_OUTPUT_FORMATS.put(HTMLOutputFormat.INSTANCE.getName(), HTMLOutputFormat.INSTANCE);
         STANDARD_OUTPUT_FORMATS.put(XHTMLOutputFormat.INSTANCE.getName(), XHTMLOutputFormat.INSTANCE);
@@ -1918,7 +1918,7 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
                 sb.append(_StringUtil.jQuote(name));
                 sb.append(". The output formats registered in the Configuration are: ");
                 
-                Set<String> registeredNames = new TreeSet<String>();
+                Set<String> registeredNames = new TreeSet<>();
                 registeredNames.addAll(STANDARD_OUTPUT_FORMATS.keySet());
                 registeredNames.addAll(registeredCustomOutputFormats.keySet());
                 
@@ -1978,7 +1978,7 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
      */
     public void setRegisteredCustomOutputFormats(Collection<? extends OutputFormat> registeredCustomOutputFormats) {
         _NullArgumentException.check(registeredCustomOutputFormats);
-        Map<String, OutputFormat> m = new LinkedHashMap<String, OutputFormat>(
+        Map<String, OutputFormat> m = new LinkedHashMap<>(
                 registeredCustomOutputFormats.size() * 4 / 3, 1f);
         for (OutputFormat outputFormat : registeredCustomOutputFormats) {
             String name = outputFormat.getName();
@@ -2986,9 +2986,9 @@ public class Configuration extends Configurable implements Cloneable, ParserConf
      */
     @Override
     public Set<String> getSettingNames(boolean camelCase) {
-        return new _UnmodifiableCompositeSet<String>(
+        return new _UnmodifiableCompositeSet<>(
                 super.getSettingNames(camelCase),
-                new _SortedArraySet<String>(camelCase ? SETTING_NAMES_CAMEL_CASE : SETTING_NAMES_SNAKE_CASE)); 
+                new _SortedArraySet<>(camelCase ? SETTING_NAMES_CAMEL_CASE : SETTING_NAMES_SNAKE_CASE));
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java b/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
index c99438c..4845198 100644
--- a/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
+++ b/src/main/java/org/apache/freemarker/core/ast/BuiltIn.java
@@ -81,8 +81,8 @@ abstract class BuiltIn extends Expression implements Cloneable {
     protected Expression target;
     protected String key;
 
-    static final Set<String> CAMEL_CASE_NAMES = new TreeSet<String>();
-    static final Set<String> SNAKE_CASE_NAMES = new TreeSet<String>();
+    static final Set<String> CAMEL_CASE_NAMES = new TreeSet<>();
+    static final Set<String> SNAKE_CASE_NAMES = new TreeSet<>();
     static final int NUMBER_OF_BIS = 263;
     static final HashMap<String, BuiltIn> BUILT_INS_BY_NAME = new HashMap(NUMBER_OF_BIS * 3 / 2 + 1, 1f);
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/ast/Configurable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/Configurable.java b/src/main/java/org/apache/freemarker/core/ast/Configurable.java
index f31321a..ad73956 100644
--- a/src/main/java/org/apache/freemarker/core/ast/Configurable.java
+++ b/src/main/java/org/apache/freemarker/core/ast/Configurable.java
@@ -1645,7 +1645,7 @@ public class Configurable {
     }
 
     private void initAutoImportsMap() {
-        autoImports = new LinkedHashMap<String, String>(4);
+        autoImports = new LinkedHashMap<>(4);
     }
     
     /**
@@ -1785,7 +1785,7 @@ public class Configurable {
     }
 
     private void initAutoIncludesList() {
-        autoIncludes = new ArrayList<String>(4);
+        autoIncludes = new ArrayList<>(4);
     }
     
     /**
@@ -2431,7 +2431,7 @@ public class Configurable {
      * @since 2.3.24
      */
     public Set<String> getSettingNames(boolean camelCase) {
-        return new _SortedArraySet<String>(camelCase ? SETTING_NAMES_CAMEL_CASE : SETTING_NAMES_SNAKE_CASE); 
+        return new _SortedArraySet<>(camelCase ? SETTING_NAMES_CAMEL_CASE : SETTING_NAMES_SNAKE_CASE);
     }
 
     private TimeZone parseTimeZoneSettingValue(String value) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/ast/Environment.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/Environment.java b/src/main/java/org/apache/freemarker/core/ast/Environment.java
index 1400aad..8f473af 100644
--- a/src/main/java/org/apache/freemarker/core/ast/Environment.java
+++ b/src/main/java/org/apache/freemarker/core/ast/Environment.java
@@ -1236,7 +1236,7 @@ public final class Environment extends Configurable {
             throws TemplateValueFormatException {
         if (cachedTemplateNumberFormats == null) {
             if (cacheResult) {
-                cachedTemplateNumberFormats = new HashMap<String, TemplateNumberFormat>();
+                cachedTemplateNumberFormats = new HashMap<>();
             }
         } else {
             TemplateNumberFormat format = cachedTemplateNumberFormats.get(formatString);
@@ -1710,7 +1710,7 @@ public final class Environment extends Configurable {
                 cachedFormatsByFormatString = cachedTempDateFormatsByFmtStrArray[cacheArrIdx];
                 if (cachedFormatsByFormatString == null) {
                     if (cacheResult) {
-                        cachedFormatsByFormatString = new HashMap<String, TemplateDateFormat>(4);
+                        cachedFormatsByFormatString = new HashMap<>(4);
                         cachedTempDateFormatsByFmtStrArray[cacheArrIdx] = cachedFormatsByFormatString;
                         format = null;
                     } else {
@@ -2779,7 +2779,7 @@ public final class Environment extends Configurable {
     public Object setCustomState(Object identityKey, Object value) {
         IdentityHashMap<Object, Object> customStateVariables = this.customStateVariables;
         if (customStateVariables == null) {
-            customStateVariables = new IdentityHashMap<Object, Object>();
+            customStateVariables = new IdentityHashMap<>();
             this.customStateVariables = customStateVariables;
         }
         return customStateVariables.put(identityKey, value);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/ast/ExtendedDecimalFormatParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/ExtendedDecimalFormatParser.java b/src/main/java/org/apache/freemarker/core/ast/ExtendedDecimalFormatParser.java
index 11eb4d4..9fa399e 100644
--- a/src/main/java/org/apache/freemarker/core/ast/ExtendedDecimalFormatParser.java
+++ b/src/main/java/org/apache/freemarker/core/ast/ExtendedDecimalFormatParser.java
@@ -58,7 +58,7 @@ class ExtendedDecimalFormatParser {
     
     private static final HashMap<String, ? extends ParameterHandler> PARAM_HANDLERS;
     static {
-        HashMap<String, ParameterHandler> m = new HashMap<String, ParameterHandler>();
+        HashMap<String, ParameterHandler> m = new HashMap<>();
         m.put(PARAM_ROUNDING_MODE, new ParameterHandler() {
             @Override
             public void handle(ExtendedDecimalFormatParser parser, String value)

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/ast/JavaTemplateDateFormatFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/JavaTemplateDateFormatFactory.java b/src/main/java/org/apache/freemarker/core/ast/JavaTemplateDateFormatFactory.java
index 4c557b6..2ab48e4 100644
--- a/src/main/java/org/apache/freemarker/core/ast/JavaTemplateDateFormatFactory.java
+++ b/src/main/java/org/apache/freemarker/core/ast/JavaTemplateDateFormatFactory.java
@@ -37,7 +37,7 @@ class JavaTemplateDateFormatFactory extends TemplateDateFormatFactory {
     private static final Logger LOG = _CoreLogs.RUNTIME;
 
     private static final ConcurrentHashMap<CacheKey, DateFormat> GLOBAL_FORMAT_CACHE
-            = new ConcurrentHashMap<CacheKey, DateFormat>();
+            = new ConcurrentHashMap<>();
     private static final int LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE = 1024;
     
     private JavaTemplateDateFormatFactory() {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/ast/JavaTemplateNumberFormatFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/JavaTemplateNumberFormatFactory.java b/src/main/java/org/apache/freemarker/core/ast/JavaTemplateNumberFormatFactory.java
index 2b881de..dc26927 100644
--- a/src/main/java/org/apache/freemarker/core/ast/JavaTemplateNumberFormatFactory.java
+++ b/src/main/java/org/apache/freemarker/core/ast/JavaTemplateNumberFormatFactory.java
@@ -36,7 +36,7 @@ class JavaTemplateNumberFormatFactory extends TemplateNumberFormatFactory {
     private static final Logger LOG = _CoreLogs.RUNTIME;
 
     private static final ConcurrentHashMap<CacheKey, NumberFormat> GLOBAL_FORMAT_CACHE
-            = new ConcurrentHashMap<CacheKey, NumberFormat>();
+            = new ConcurrentHashMap<>();
     private static final int LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE = 1024;
     
     private JavaTemplateNumberFormatFactory() {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java b/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
index 78d7f44..b5695fd 100644
--- a/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
+++ b/src/main/java/org/apache/freemarker/core/ast/TemplateConfiguration.java
@@ -636,7 +636,7 @@ public final class TemplateConfiguration extends Configurable implements ParserC
         if (list1.isEmpty()) return list2 != null ? list2 : list1;
         if (list2.isEmpty()) return list1 != null ? list1 : list2;
         
-        ArrayList<String> mergedList = new ArrayList<String>(list1.size() + list2.size());
+        ArrayList<String> mergedList = new ArrayList<>(list1.size() + list2.size());
         mergedList.addAll(list1);
         mergedList.addAll(list2);
         return mergedList;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperBuilder.java b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperBuilder.java
index 1c21057..e9f3fab 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperBuilder.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperBuilder.java
@@ -40,10 +40,9 @@ import org.apache.freemarker.core.model.impl.beans._BeansAPI;
 public class DefaultObjectWrapperBuilder extends DefaultObjectWrapperConfiguration {
 
     private final static Map<ClassLoader, Map<DefaultObjectWrapperConfiguration, WeakReference<DefaultObjectWrapper>>>
-            INSTANCE_CACHE = new WeakHashMap<
-                    ClassLoader, Map<DefaultObjectWrapperConfiguration, WeakReference<DefaultObjectWrapper>>>();
+            INSTANCE_CACHE = new WeakHashMap<>();
     private final static ReferenceQueue<DefaultObjectWrapper> INSTANCE_CACHE_REF_QUEUE
-            = new ReferenceQueue<DefaultObjectWrapper>();
+            = new ReferenceQueue<>();
     
     /**
      * Creates a builder that creates a {@link DefaultObjectWrapper} with the given {@code incompatibleImprovements};

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/beans/ArgumentTypes.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/beans/ArgumentTypes.java b/src/main/java/org/apache/freemarker/core/model/impl/beans/ArgumentTypes.java
index a386c4c..c52294a 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/beans/ArgumentTypes.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/beans/ArgumentTypes.java
@@ -118,7 +118,7 @@ final class ArgumentTypes {
             return applicables.getFirst();
         }
         
-        LinkedList<CallableMemberDescriptor> maximals = new LinkedList<CallableMemberDescriptor>();
+        LinkedList<CallableMemberDescriptor> maximals = new LinkedList<>();
         for (CallableMemberDescriptor applicable : applicables) {
             boolean lessSpecific = false;
             for (Iterator<CallableMemberDescriptor> maximalsIter = maximals.iterator(); 
@@ -453,7 +453,7 @@ final class ArgumentTypes {
      */
     LinkedList<CallableMemberDescriptor> getApplicables(
             List<ReflectionCallableMemberDescriptor> memberDescs, boolean varArg) {
-        LinkedList<CallableMemberDescriptor> applicables = new LinkedList<CallableMemberDescriptor>();
+        LinkedList<CallableMemberDescriptor> applicables = new LinkedList<>();
         for (ReflectionCallableMemberDescriptor memberDesc : memberDescs) {
             int difficulty = isApplicable(memberDesc, varArg);
             if (difficulty != CONVERSION_DIFFICULTY_IMPOSSIBLE) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/beans/BeanModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/beans/BeanModel.java b/src/main/java/org/apache/freemarker/core/model/impl/beans/BeanModel.java
index 1095d7e..9ef62d0 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/beans/BeanModel.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/beans/BeanModel.java
@@ -249,7 +249,7 @@ implements
         if (cachedModel != null) {
             synchronized (this) {
                 if (memberCache == null) {
-                    memberCache = new HashMap<Object, TemplateModel>();
+                    memberCache = new HashMap<>();
                 }
                 memberCache.put(desc, cachedModel);
             }
@@ -331,7 +331,7 @@ implements
 
     @Override
     public TemplateCollectionModel values() throws TemplateModelException {
-        List<Object> values = new ArrayList<Object>(size());
+        List<Object> values = new ArrayList<>(size());
         TemplateModelIterator it = keys().iterator();
         while (it.hasNext()) {
             String key = ((TemplateScalarModel) it.next()).getAsString();

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapper.java b/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapper.java
index edff45f..3b4d3a8 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapper.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapper.java
@@ -1242,7 +1242,7 @@ public class BeansWrapper implements RichObjectWrapper, WriteProtectable {
                 return retval;
             }
         } else {
-            recursionStops = new IdentityHashMap<Object, Object>();
+            recursionStops = new IdentityHashMap<>();
         }
         Class<?> componentType = arrayClass.getComponentType();
         Object array = Array.newInstance(componentType, seq.size());
@@ -1287,7 +1287,7 @@ public class BeansWrapper implements RichObjectWrapper, WriteProtectable {
                 return retval;
             }
         } else {
-            recursionStops = new IdentityHashMap<Object, Object>();
+            recursionStops = new IdentityHashMap<>();
         }
         Class<?> componentType = arrayClass.getComponentType();
         Object array = Array.newInstance(componentType, list.size());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperBuilder.java b/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperBuilder.java
index 65766c8..55b5c96 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperBuilder.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperBuilder.java
@@ -111,9 +111,8 @@ import org.apache.freemarker.core.model.impl.DefaultObjectWrapperBuilder;
 public class BeansWrapperBuilder extends BeansWrapperConfiguration {
 
     private final static Map<ClassLoader, Map<BeansWrapperConfiguration, WeakReference<BeansWrapper>>>
-            INSTANCE_CACHE = new WeakHashMap<
-                    ClassLoader, Map<BeansWrapperConfiguration, WeakReference<BeansWrapper>>>();
-    private final static ReferenceQueue<BeansWrapper> INSTANCE_CACHE_REF_QUEUE = new ReferenceQueue<BeansWrapper>();
+            INSTANCE_CACHE = new WeakHashMap<>();
+    private final static ReferenceQueue<BeansWrapper> INSTANCE_CACHE_REF_QUEUE = new ReferenceQueue<>();
    
     private static class BeansWrapperFactory
             implements _BeansAPI._BeansWrapperSubclassFactory<BeansWrapper, BeansWrapperConfiguration> {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/beans/ClassIntrospector.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/beans/ClassIntrospector.java b/src/main/java/org/apache/freemarker/core/model/impl/beans/ClassIntrospector.java
index e793078..4805db4 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/beans/ClassIntrospector.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/beans/ClassIntrospector.java
@@ -141,13 +141,13 @@ class ClassIntrospector {
 
     private final Object sharedLock;
     private final Map<Class<?>, Map<Object, Object>> cache
-            = new ConcurrentHashMap<Class<?>, Map<Object, Object>>(0, 0.75f, 16);
-    private final Set<String> cacheClassNames = new HashSet<String>(0);
-    private final Set<Class<?>> classIntrospectionsInProgress = new HashSet<Class<?>>(0);
+            = new ConcurrentHashMap<>(0, 0.75f, 16);
+    private final Set<String> cacheClassNames = new HashSet<>(0);
+    private final Set<Class<?>> classIntrospectionsInProgress = new HashSet<>(0);
 
     private final List<WeakReference<Object/*ClassBasedModelFactory|ModelCache>*/>> modelFactories
-            = new LinkedList<WeakReference<Object>>();
-    private final ReferenceQueue<Object> modelFactoriesRefQueue = new ReferenceQueue<Object>();
+            = new LinkedList<>();
+    private final ReferenceQueue<Object> modelFactoriesRefQueue = new ReferenceQueue<>();
 
     private int clearingCounter;
 
@@ -258,7 +258,7 @@ class ClassIntrospector {
      * Creates a {@link Map} with the content as described for the return value of {@link #get(Class)}.
      */
     private Map<Object, Object> createClassIntrospectionData(Class<?> clazz) {
-        final Map<Object, Object> introspData = new HashMap<Object, Object>();
+        final Map<Object, Object> introspData = new HashMap<>();
 
         if (exposeFields) {
             addFieldsToClassIntrospectionData(introspData, clazz);
@@ -452,7 +452,7 @@ class ClassIntrospector {
      * interfaces. Basically upcasts every method to the nearest accessible method.
      */
     private static Map<MethodSignature, List<Method>> discoverAccessibleMethods(Class<?> clazz) {
-        Map<MethodSignature, List<Method>> accessibles = new HashMap<MethodSignature, List<Method>>();
+        Map<MethodSignature, List<Method>> accessibles = new HashMap<>();
         discoverAccessibleMethods(clazz, accessibles);
         return accessibles;
     }
@@ -478,7 +478,7 @@ class ClassIntrospector {
                     List<Method> methodList = accessibles.get(sig);
                     if (methodList == null) {
                      // TODO Collection.singletonList is more efficient, though read only.
-                        methodList = new LinkedList<Method>();
+                        methodList = new LinkedList<>();
                         accessibles.put(sig, methodList);
                     }
                     methodList.add(method);
@@ -541,7 +541,7 @@ class ClassIntrospector {
         @SuppressWarnings("unchecked")
         Map<Method, Class<?>[]> argTypes = (Map<Method, Class<?>[]>) classInfo.get(ARG_TYPES_BY_METHOD_KEY);
         if (argTypes == null) {
-            argTypes = new HashMap<Method, Class<?>[]>();
+            argTypes = new HashMap<>();
             classInfo.put(ARG_TYPES_BY_METHOD_KEY, argTypes);
         }
         return argTypes;
@@ -683,7 +683,7 @@ class ClassIntrospector {
     private void registerModelFactory(Object mf) {
         // Note that this `synchronized (sharedLock)` is also need for the BeansWrapper constructor to work safely.
         synchronized (sharedLock) {
-            modelFactories.add(new WeakReference<Object>(mf, modelFactoriesRefQueue));
+            modelFactories.add(new WeakReference<>(mf, modelFactoriesRefQueue));
             removeClearedModelFactoryReferences();
         }
     }
@@ -749,7 +749,7 @@ class ClassIntrospector {
      * interface.
      */
     Set<Object> keySet(Class<?> clazz) {
-        Set<Object> set = new HashSet<Object>(get(clazz).keySet());
+        Set<Object> set = new HashSet<>(get(clazz).keySet());
         set.remove(CONSTRUCTORS_KEY);
         set.remove(GENERIC_GET_KEY);
         set.remove(ARG_TYPES_BY_METHOD_KEY);

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/beans/ModelCache.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/beans/ModelCache.java b/src/main/java/org/apache/freemarker/core/model/impl/beans/ModelCache.java
index aee84a5..779441e 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/beans/ModelCache.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/beans/ModelCache.java
@@ -47,8 +47,8 @@ public abstract class ModelCache {
     public synchronized void setUseCache(boolean useCache) {
         this.useCache = useCache;
         if (useCache) {
-            modelCache = new IdentityHashMap<Object, ModelReference>();
-            refQueue = new ReferenceQueue<TemplateModel>();
+            modelCache = new IdentityHashMap<>();
+            refQueue = new ReferenceQueue<>();
         } else {
             modelCache = null;
             refQueue = null;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/beans/_BeansAPI.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/beans/_BeansAPI.java b/src/main/java/org/apache/freemarker/core/model/impl/beans/_BeansAPI.java
index 40a1595..bac89a5 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/beans/_BeansAPI.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/beans/_BeansAPI.java
@@ -62,9 +62,9 @@ public class _BeansAPI {
         
         final ArgumentTypes argTypes = new ArgumentTypes(args, true);
         final List<ReflectionCallableMemberDescriptor> fixedArgMemberDescs
-                = new ArrayList<ReflectionCallableMemberDescriptor>();
+                = new ArrayList<>();
         final List<ReflectionCallableMemberDescriptor> varArgsMemberDescs
-                = new ArrayList<ReflectionCallableMemberDescriptor>();
+                = new ArrayList<>();
         final Constructor<?>[] constrs = pClass.getConstructors();
         for (int i = 0; i < constrs.length; i++) {
             Constructor<?> constr = constrs[i];
@@ -151,7 +151,7 @@ public class _BeansAPI {
         synchronized (instanceCache) {
             tcclScopedCache = instanceCache.get(tccl);
             if (tcclScopedCache == null) {
-                tcclScopedCache = new HashMap<BWC, WeakReference<BW>>();
+                tcclScopedCache = new HashMap<>();
                 instanceCache.put(tccl, tcclScopedCache);
                 instanceRef = null;
             } else {
@@ -175,7 +175,7 @@ public class _BeansAPI {
             instanceRef = tcclScopedCache.get(settings);
             BW concurrentInstance = instanceRef != null ? instanceRef.get() : null;
             if (concurrentInstance == null) {
-                tcclScopedCache.put(settings, new WeakReference<BW>(instance, instanceCacheRefQue));
+                tcclScopedCache.put(settings, new WeakReference<>(instance, instanceCacheRefQue));
             } else {
                 instance = concurrentInstance;
             }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/model/impl/dom/NodeOutputter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/dom/NodeOutputter.java b/src/main/java/org/apache/freemarker/core/model/impl/dom/NodeOutputter.java
index fcd40bb..feed784 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/dom/NodeOutputter.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/dom/NodeOutputter.java
@@ -41,7 +41,7 @@ class NodeOutputter {
     private String defaultNS;
     private boolean hasDefaultNS;
     private boolean explicitDefaultNSPrefix;
-    private LinkedHashMap<String, String> namespacesToPrefixLookup = new LinkedHashMap<String, String>();
+    private LinkedHashMap<String, String> namespacesToPrefixLookup = new LinkedHashMap<>();
     private String namespaceDecl;
     int nextGeneratedPrefixNumber = 1;
     

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/templateresolver/impl/DefaultTemplateResolver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/templateresolver/impl/DefaultTemplateResolver.java b/src/main/java/org/apache/freemarker/core/templateresolver/impl/DefaultTemplateResolver.java
index 45e3508..225137f 100644
--- a/src/main/java/org/apache/freemarker/core/templateresolver/impl/DefaultTemplateResolver.java
+++ b/src/main/java/org/apache/freemarker/core/templateresolver/impl/DefaultTemplateResolver.java
@@ -971,7 +971,7 @@ public class DefaultTemplateResolver extends TemplateResolver {
             }
             StringTokenizer pathTokenizer = new StringTokenizer(path, "/");
             int lastAsterisk = -1;
-            List<String> pathSteps = new ArrayList<String>();
+            List<String> pathSteps = new ArrayList<>();
             while (pathTokenizer.hasMoreTokens()) {
                 String pathStep = pathTokenizer.nextToken();
                 if (pathStep.equals(ASTERISKSTR)) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/core/templateresolver/impl/MultiTemplateLoader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/templateresolver/impl/MultiTemplateLoader.java b/src/main/java/org/apache/freemarker/core/templateresolver/impl/MultiTemplateLoader.java
index d085aba..4767cad 100644
--- a/src/main/java/org/apache/freemarker/core/templateresolver/impl/MultiTemplateLoader.java
+++ b/src/main/java/org/apache/freemarker/core/templateresolver/impl/MultiTemplateLoader.java
@@ -44,7 +44,7 @@ import org.apache.freemarker.core.util._NullArgumentException;
 public class MultiTemplateLoader implements TemplateLoader {
 
     private final TemplateLoader[] templateLoaders;
-    private final Map<String, TemplateLoader> lastTemplateLoaderForName = new ConcurrentHashMap<String, TemplateLoader>();
+    private final Map<String, TemplateLoader> lastTemplateLoaderForName = new ConcurrentHashMap<>();
     
     private boolean sticky = false;
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java b/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
index 4c9ec46..096f2f3 100644
--- a/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
+++ b/src/main/java/org/apache/freemarker/servlet/jsp/TaglibFactory.java
@@ -1627,7 +1627,7 @@ public class TaglibFactory implements TemplateHashModel {
 
         private final BeansWrapper beansWrapper;
 
-        private final Map<String, TemplateModel> tagsAndFunctions = new HashMap<String, TemplateModel>();
+        private final Map<String, TemplateModel> tagsAndFunctions = new HashMap<>();
         private final List listeners = new ArrayList();
 
         private Locator locator;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ConfigurationTest.java b/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
index 3451dac..4a0d89e 100644
--- a/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
+++ b/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
@@ -1200,7 +1200,7 @@ public class ConfigurationTest extends TestCase {
         cfg.setSharedVariable("erased", "");
         assertNotNull(cfg.getSharedVariable("erased"));
         
-        Map<String, Object> vars = new HashMap<String, Object>(); 
+        Map<String, Object> vars = new HashMap<>();
         vars.put("a", "aa");
         vars.put("b", "bb");
         vars.put("c", new MyScalarModel());
@@ -1606,8 +1606,8 @@ public class ConfigurationTest extends TestCase {
     public void testGetSettingNamesAreSorted() throws Exception {
         Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
         for (boolean camelCase : new boolean[] { false, true }) {
-            List<String> names = new ArrayList<String>(cfg.getSettingNames(camelCase)); 
-            List<String> cfgableNames = new ArrayList<String>(new Template(null, "", cfg).getSettingNames(camelCase));
+            List<String> names = new ArrayList<>(cfg.getSettingNames(camelCase));
+            List<String> cfgableNames = new ArrayList<>(new Template(null, "", cfg).getSettingNames(camelCase));
             assertStartsWith(names, cfgableNames);
             
             String prevName = null;
@@ -1625,15 +1625,15 @@ public class ConfigurationTest extends TestCase {
     public void testGetSettingNamesNameConventionsContainTheSame() throws Exception {
         Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
         ConfigurableTest.testGetSettingNamesNameConventionsContainTheSame(
-                new ArrayList<String>(cfg.getSettingNames(false)),
-                new ArrayList<String>(cfg.getSettingNames(true)));
+                new ArrayList<>(cfg.getSettingNames(false)),
+                new ArrayList<>(cfg.getSettingNames(true)));
     }
 
     @Test
     public void testStaticFieldKeysCoverAllGetSettingNames() throws Exception {
         Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
-        List<String> names = new ArrayList<String>(cfg.getSettingNames(false)); 
-        List<String> cfgableNames = new ArrayList<String>(cfg.getSettingNames(false));
+        List<String> names = new ArrayList<>(cfg.getSettingNames(false));
+        List<String> cfgableNames = new ArrayList<>(cfg.getSettingNames(false));
         assertStartsWith(names, cfgableNames);
         
         for (int i = cfgableNames.size(); i < names.size(); i++) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/ast/CamelCaseTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/CamelCaseTest.java b/src/test/java/org/apache/freemarker/core/ast/CamelCaseTest.java
index 58c4b6d..6c82622 100644
--- a/src/test/java/org/apache/freemarker/core/ast/CamelCaseTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/CamelCaseTest.java
@@ -271,7 +271,7 @@ public class CamelCaseTest extends TemplateTest {
     }
 
     private void assertContainsBothNamingStyles(Set<String> names, NamePairAssertion namePairAssertion) {
-        Set<String> underscoredNamesWithCamelCasePair = new HashSet<String>();
+        Set<String> underscoredNamesWithCamelCasePair = new HashSet<>();
         for (String name : names) {
             if (_StringUtil.getIdentifierNamingConvention(name) == Configuration.CAMEL_CASE_NAMING_CONVENTION) {
                 String underscoredName = correctIsoBIExceptions(_StringUtil.camelCaseToUnderscored(name)); 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java b/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
index d484c1f..a4618a6 100644
--- a/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/ConfigurableTest.java
@@ -84,8 +84,8 @@ public class ConfigurableTest {
     public void testGetSettingNamesNameConventionsContainTheSame() throws Exception {
         Configurable cfgable = createConfigurable();
         ConfigurableTest.testGetSettingNamesNameConventionsContainTheSame(
-                new ArrayList<String>(cfgable.getSettingNames(false)),
-                new ArrayList<String>(cfgable.getSettingNames(true)));
+                new ArrayList<>(cfgable.getSettingNames(false)),
+                new ArrayList<>(cfgable.getSettingNames(true)));
     }
 
     public static void testKeyStaticFieldsHasAllVariationsAndCorrectFormat(
@@ -147,10 +147,10 @@ public class ConfigurableTest {
     }
     
     public static void testGetSettingNamesNameConventionsContainTheSame(List<String> namesSCList, List<String> namesCCList) {
-        Set<String> namesSC = new HashSet<String>(namesSCList);
+        Set<String> namesSC = new HashSet<>(namesSCList);
         assertEquals(namesSCList.size(), namesSC.size());
         
-        Set<String> namesCC = new HashSet<String>(namesCCList);
+        Set<String> namesCC = new HashSet<>(namesCCList);
         assertEquals(namesCCList.size(), namesCC.size());
 
         assertEquals(namesSC.size(), namesCC.size());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java b/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
index 563839f..4000e39 100644
--- a/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/DirectiveCallPlaceTest.java
@@ -103,7 +103,7 @@ public class DirectiveCallPlaceTest extends TemplateTest {
     @SuppressWarnings("boxing")
     @Override
     protected Object createDataModel() {
-        Map<String, Object> dm = new HashMap<String, Object>();
+        Map<String, Object> dm = new HashMap<>();
         dm.put("uc", new CachingUpperCaseDirective());
         dm.put("lc", new CachingLowerCaseDirective());
         dm.put("pa", new PositionAwareDirective());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/ast/TemplateConfigurationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ast/TemplateConfigurationTest.java b/src/test/java/org/apache/freemarker/core/ast/TemplateConfigurationTest.java
index 1f3bc31..2e41f21 100644
--- a/src/test/java/org/apache/freemarker/core/ast/TemplateConfigurationTest.java
+++ b/src/test/java/org/apache/freemarker/core/ast/TemplateConfigurationTest.java
@@ -157,7 +157,7 @@ public class TemplateConfigurationTest {
     private static final Map<String, Object> SETTING_ASSIGNMENTS;
 
     static {
-        SETTING_ASSIGNMENTS = new HashMap<String, Object>();
+        SETTING_ASSIGNMENTS = new HashMap<>();
 
         // "Configurable" settings:
         SETTING_ASSIGNMENTS.put("APIBuiltinEnabled", true);
@@ -210,7 +210,7 @@ public class TemplateConfigurationTest {
     public static List<PropertyDescriptor> getTemplateConfigurationSettingPropDescs(
             boolean includeCompilerSettings, boolean includeSpecialSettings)
             throws IntrospectionException {
-        List<PropertyDescriptor> settingPropDescs = new ArrayList<PropertyDescriptor>();
+        List<PropertyDescriptor> settingPropDescs = new ArrayList<>();
 
         BeanInfo beanInfo = Introspector.getBeanInfo(TemplateConfiguration.class);
         for (PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
@@ -250,7 +250,7 @@ public class TemplateConfigurationTest {
 
     private static final Set<String> CONFIGURABLE_PROP_NAMES;
     static {
-        CONFIGURABLE_PROP_NAMES = new HashSet<String>();
+        CONFIGURABLE_PROP_NAMES = new HashSet<>();
         try {
             for (PropertyDescriptor propDesc : Introspector.getBeanInfo(Configurable.class).getPropertyDescriptors()) {
                 String propName = propDesc.getName();
@@ -265,7 +265,7 @@ public class TemplateConfigurationTest {
     
     private static final Set<String> PARSER_PROP_NAMES;
     static {
-        PARSER_PROP_NAMES = new HashSet<String>();
+        PARSER_PROP_NAMES = new HashSet<>();
         // It's an interface; can't use standard Inrospector
         for (Method m : ParserConfiguration.class.getMethods()) {
             String propertyName;
@@ -287,7 +287,7 @@ public class TemplateConfigurationTest {
 
     private static final Set<String> SPECIAL_PROP_NAMES;
     static {
-        SPECIAL_PROP_NAMES = new HashSet<String>();
+        SPECIAL_PROP_NAMES = new HashSet<>();
         SPECIAL_PROP_NAMES.add("encoding");
     }
     
@@ -506,7 +506,7 @@ public class TemplateConfigurationTest {
         }
         assertEquals("Y,N", t.getBooleanFormat());
         assertEquals(ImmutableMap.of("a", "a.ftl", "b", "b.ftl", "c", "c.ftl"), t.getAutoImports());
-        assertEquals(ImmutableList.of("a", "b", "c"), new ArrayList<String>(t.getAutoImports().keySet()));
+        assertEquals(ImmutableList.of("a", "b", "c"), new ArrayList<>(t.getAutoImports().keySet()));
         assertEquals(ImmutableList.of("i1.ftl", "i2.ftl", "i3.ftl"), t.getAutoIncludes());
         
         {
@@ -523,7 +523,7 @@ public class TemplateConfigurationTest {
         }
         assertEquals("Y,N", t.getBooleanFormat());
         assertEquals(ImmutableMap.of("d", "d.ftl", "a", "a.ftl", "b", "b.ftl", "c", "c.ftl"), t.getAutoImports());
-        assertEquals(ImmutableList.of("d", "a", "b", "c"), new ArrayList<String>(t.getAutoImports().keySet()));
+        assertEquals(ImmutableList.of("d", "a", "b", "c"), new ArrayList<>(t.getAutoImports().keySet()));
         assertEquals(ImmutableList.of("i4.ftl", "i1.ftl", "i2.ftl", "i3.ftl"), t.getAutoIncludes());
         assertEquals(ImmutableMap.of( //
                 "b", LocaleSensitiveTemplateNumberFormatFactory.INSTANCE, //
@@ -593,7 +593,7 @@ public class TemplateConfigurationTest {
     
     @Test
     public void testConfigureParser() throws Exception {
-        Set<String> testedProps = new HashSet<String>();
+        Set<String> testedProps = new HashSet<>();
         
         {
             TemplateConfiguration tc = new TemplateConfiguration();

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperTest.java b/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperTest.java
index a19df45..4906d50 100644
--- a/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperTest.java
+++ b/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperTest.java
@@ -126,7 +126,7 @@ public class DefaultObjectWrapperTest {
     
     @Test
     public void testIncompatibleImprovementsVersionBreakPoints() throws Exception {
-        List<Version> expected = new ArrayList<Version>();
+        List<Version> expected = new ArrayList<>();
         for (int u = 0; u < 21; u++) {
             expected.add(Configuration.VERSION_2_3_0);
         }
@@ -138,7 +138,7 @@ public class DefaultObjectWrapperTest {
         expected.add(Configuration.VERSION_2_3_24); // no non-BC change in 2.3.26
         expected.add(Configuration.VERSION_3_0_0);
 
-        List<Version> actual = new ArrayList<Version>();
+        List<Version> actual = new ArrayList<>();
         int i = _TemplateAPI.VERSION_INT_2_3_0;
         while (i <= Configuration.getVersion().intValue()) {
             int major = i / 1000000;
@@ -473,8 +473,8 @@ public class DefaultObjectWrapperTest {
         {
             // Check custom TM usage and round trip:
             final TemplateModel mr = (TemplateModel) ((TemplateMethodModelEx) bean.get("incTupple"))
-                    .exec(Collections.singletonList(ow.wrap(new Tupple<Integer, Integer>(1, 2))));
-            assertEquals(new Tupple<Integer, Integer>(2, 3), ow.unwrap(mr));
+                    .exec(Collections.singletonList(ow.wrap(new Tupple<>(1, 2))));
+            assertEquals(new Tupple<>(2, 3), ow.unwrap(mr));
             assertTrue(TuppleAdapter.class.isInstance(mr));
         }
     }
@@ -528,7 +528,7 @@ public class DefaultObjectWrapperTest {
     @SuppressWarnings("boxing")
     @Test
     public void testMapAdapter() throws TemplateModelException {
-        HashMap<String, Object> testMap = new LinkedHashMap<String, Object>();
+        HashMap<String, Object> testMap = new LinkedHashMap<>();
         testMap.put("a", 1);
         testMap.put("b", null);
         testMap.put("c", "C");
@@ -595,7 +595,7 @@ public class DefaultObjectWrapperTest {
     @Test
     public void testListAdapter() throws TemplateModelException {
         {
-            List testList = new ArrayList<Object>();
+            List testList = new ArrayList<>();
             testList.add(1);
             testList.add(null);
             testList.add("c");
@@ -616,7 +616,7 @@ public class DefaultObjectWrapperTest {
         }
 
         {
-            List testList = new LinkedList<Object>();
+            List testList = new LinkedList<>();
             testList.add(1);
             testList.add(null);
             testList.add("c");
@@ -646,7 +646,7 @@ public class DefaultObjectWrapperTest {
         }
 
         {
-            List testList = new ArrayList<Object>();
+            List testList = new ArrayList<>();
             testList.add(null);
 
             final TemplateSequenceModel seq = (TemplateSequenceModel) OW22NM.wrap(testList);
@@ -943,13 +943,13 @@ public class DefaultObjectWrapperTest {
     @SuppressWarnings("boxing")
     @Test
     public void testCharKeyFallback() throws TemplateModelException {
-        Map hashMapS = new HashMap<String, Integer>();
+        Map hashMapS = new HashMap<>();
         hashMapS.put("a", 1);
-        Map sortedMapS = new TreeMap<String, Integer>();
+        Map sortedMapS = new TreeMap<>();
         sortedMapS.put("a", 1);
-        Map hashMapC = new HashMap<Character, Integer>();
+        Map hashMapC = new HashMap<>();
         hashMapC.put('a', 1);
-        Map sortedMapC = new TreeMap<Character, Integer>();
+        Map sortedMapC = new TreeMap<>();
         sortedMapC.put('a', 1);
         
         for (DefaultObjectWrapper ow : new DefaultObjectWrapper[] { OW0, OW22 } ) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/model/impl/beans/AlphabeticalMethodSorter.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/model/impl/beans/AlphabeticalMethodSorter.java b/src/test/java/org/apache/freemarker/core/model/impl/beans/AlphabeticalMethodSorter.java
index c77bb0b..357624b 100644
--- a/src/test/java/org/apache/freemarker/core/model/impl/beans/AlphabeticalMethodSorter.java
+++ b/src/test/java/org/apache/freemarker/core/model/impl/beans/AlphabeticalMethodSorter.java
@@ -36,7 +36,7 @@ class AlphabeticalMethodSorter implements MethodSorter {
     }
 
     public MethodDescriptor[] sortMethodDescriptors(MethodDescriptor[] methodDescriptors) {
-        ArrayList<MethodDescriptor> ls = new ArrayList<MethodDescriptor>(Arrays.asList(methodDescriptors));
+        ArrayList<MethodDescriptor> ls = new ArrayList<>(Arrays.asList(methodDescriptors));
         Collections.sort(ls, new Comparator<MethodDescriptor>() {
             public int compare(MethodDescriptor o1, MethodDescriptor o2) {
                 int res = o1.getMethod().toString().compareTo(o2.getMethod().toString());

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperSingletonsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperSingletonsTest.java b/src/test/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperSingletonsTest.java
index 2fb177b..2ed33cf 100644
--- a/src/test/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperSingletonsTest.java
+++ b/src/test/java/org/apache/freemarker/core/model/impl/beans/BeansWrapperSingletonsTest.java
@@ -140,7 +140,7 @@ public class BeansWrapperSingletonsTest extends TestCase {
     }
     
     public void testBeansWrapperFactoryProducts() throws Exception {
-        List<BeansWrapper> hardReferences = new LinkedList<BeansWrapper>();
+        List<BeansWrapper> hardReferences = new LinkedList<>();
         
         assertEquals(0, getBeansWrapperInstanceCacheSize());
         
@@ -344,7 +344,7 @@ public class BeansWrapperSingletonsTest extends TestCase {
     }
 
     public void testMultipleTCCLs() {
-        List<BeansWrapper> hardReferences = new LinkedList<BeansWrapper>();
+        List<BeansWrapper> hardReferences = new LinkedList<>();
         
         assertEquals(0, getBeansWrapperInstanceCacheSize());
         
@@ -402,7 +402,7 @@ public class BeansWrapperSingletonsTest extends TestCase {
         BeansWrapperBuilder.clearInstanceCache();
         checkClassIntrospectorCacheSize(0);
         
-        List<BeansWrapper> hardReferences = new LinkedList<BeansWrapper>();
+        List<BeansWrapper> hardReferences = new LinkedList<>();
         BeansWrapperBuilder factory;
         
         {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/core/model/impl/beans/Java7MembersOnlyBeansWrapper.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/model/impl/beans/Java7MembersOnlyBeansWrapper.java b/src/test/java/org/apache/freemarker/core/model/impl/beans/Java7MembersOnlyBeansWrapper.java
index 19fbed7..621fc8e 100644
--- a/src/test/java/org/apache/freemarker/core/model/impl/beans/Java7MembersOnlyBeansWrapper.java
+++ b/src/test/java/org/apache/freemarker/core/model/impl/beans/Java7MembersOnlyBeansWrapper.java
@@ -89,7 +89,7 @@ public class Java7MembersOnlyBeansWrapper extends BeansWrapper {
     }
 
     private static <T> Set<T> newHashSet(T... items) {
-        HashSet<T> r = new HashSet<T>();
+        HashSet<T> r = new HashSet<>();
         for (T item : items) {
             r.add(item);
         }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/manualtest/CustomFormatsExample.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/manualtest/CustomFormatsExample.java b/src/test/java/org/apache/freemarker/manualtest/CustomFormatsExample.java
index 93e8192..42a226d 100644
--- a/src/test/java/org/apache/freemarker/manualtest/CustomFormatsExample.java
+++ b/src/test/java/org/apache/freemarker/manualtest/CustomFormatsExample.java
@@ -41,13 +41,13 @@ public class CustomFormatsExample extends ExamplesTest {
         Configuration cfg = getConfiguration();
 
         Map<String, TemplateNumberFormatFactory> customNumberFormats
-                = new HashMap<String, TemplateNumberFormatFactory>();
+                = new HashMap<>();
         customNumberFormats.put("price", new AliasTemplateNumberFormatFactory(",000.00"));
         customNumberFormats.put("weight", new AliasTemplateNumberFormatFactory("0.##;; roundingMode=halfUp"));
         cfg.setCustomNumberFormats(customNumberFormats);
 
         Map<String, TemplateDateFormatFactory> customDateFormats
-                = new HashMap<String, TemplateDateFormatFactory>();
+                = new HashMap<>();
         customDateFormats.put("fileDate", new AliasTemplateDateFormatFactory("dd/MMM/yy hh:mm a"));
         customDateFormats.put("logEventTime", new AliasTemplateDateFormatFactory("iso ms u"));
         cfg.setCustomDateFormats(customDateFormats);
@@ -65,7 +65,7 @@ public class CustomFormatsExample extends ExamplesTest {
         Configuration cfg = getConfiguration();
 
         Map<String, TemplateNumberFormatFactory> customNumberFormats
-                = new HashMap<String, TemplateNumberFormatFactory>();
+                = new HashMap<>();
         customNumberFormats.put("base", BaseNTemplateNumberFormatFactory.INSTANCE);
         customNumberFormats.put("oct", new AliasTemplateNumberFormatFactory("@base 8"));
         cfg.setCustomNumberFormats(customNumberFormats);
@@ -78,7 +78,7 @@ public class CustomFormatsExample extends ExamplesTest {
         Configuration cfg = getConfiguration();
 
         Map<String, TemplateNumberFormatFactory> customNumberFormats
-                = new HashMap<String, TemplateNumberFormatFactory>();
+                = new HashMap<>();
         customNumberFormats.put("ua", UnitAwareTemplateNumberFormatFactory.INSTANCE);
         cfg.setCustomNumberFormats(customNumberFormats);
         cfg.setNumberFormat("@ua 0.####;; roundingMode=halfUp");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/test/MonitoredTemplateLoader.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/test/MonitoredTemplateLoader.java b/src/test/java/org/apache/freemarker/test/MonitoredTemplateLoader.java
index 47f3a96..5b79801 100644
--- a/src/test/java/org/apache/freemarker/test/MonitoredTemplateLoader.java
+++ b/src/test/java/org/apache/freemarker/test/MonitoredTemplateLoader.java
@@ -45,7 +45,7 @@ public class MonitoredTemplateLoader implements TemplateLoader {
             = Collections.synchronizedList(new ArrayList<AbstractTemplateLoader2Event>());
     
     private Map<String, StoredTemplate> templates
-            = new ConcurrentHashMap<String, MonitoredTemplateLoader.StoredTemplate>();
+            = new ConcurrentHashMap<>();
 
     @Override
     public TemplateLoaderSession createSession() {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/test/TemplateTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/test/TemplateTest.java b/src/test/java/org/apache/freemarker/test/TemplateTest.java
index 3957ee8..0575313 100644
--- a/src/test/java/org/apache/freemarker/test/TemplateTest.java
+++ b/src/test/java/org/apache/freemarker/test/TemplateTest.java
@@ -156,7 +156,7 @@ public abstract class TemplateTest {
     
     @SuppressWarnings("boxing")
     protected Map<String, Object> createCommonTestValuesDataModel() {
-        Map<String, Object> dataModel = new HashMap<String, Object>();
+        Map<String, Object> dataModel = new HashMap<>();
         dataModel.put("map", Collections.singletonMap("key", "value"));
         dataModel.put("list", Collections.singletonList("item"));
         dataModel.put("s", "text");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/test/servlet/WebAppTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/test/servlet/WebAppTestCase.java b/src/test/java/org/apache/freemarker/test/servlet/WebAppTestCase.java
index 2bdb074..e9ac109 100644
--- a/src/test/java/org/apache/freemarker/test/servlet/WebAppTestCase.java
+++ b/src/test/java/org/apache/freemarker/test/servlet/WebAppTestCase.java
@@ -60,7 +60,7 @@ public class WebAppTestCase {
 
     private static Server server;
     private static ContextHandlerCollection contextHandlers;
-    private static Map<String, WebAppContext> deployedWebApps = new HashMap<String, WebAppContext>();
+    private static Map<String, WebAppContext> deployedWebApps = new HashMap<>();
     private static volatile File testTempDirectory;
 
     @BeforeClass

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestCase.java b/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestCase.java
index d31a83f..8284f7d 100644
--- a/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestCase.java
+++ b/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestCase.java
@@ -119,7 +119,7 @@ public class TemplateTestCase extends FileTestCase {
     private final boolean noOutput;
     
     private final Configuration conf;
-    private final HashMap<String, Object> dataModel = new HashMap<String, Object>();
+    private final HashMap<String, Object> dataModel = new HashMap<>();
     
     public TemplateTestCase(String testName, String simpleTestName, String templateName, String expectedFileName, boolean noOutput,
             Version incompatibleImprovements) {
@@ -243,7 +243,7 @@ public class TemplateTestCase extends FileTestCase {
         } else if (simpleTestName.equals("beans")) {
             dataModel.put("array", new String[] { "array-0", "array-1"});
             dataModel.put("list", Arrays.asList(new String[] { "list-0", "list-1", "list-2"}));
-            Map<Object, Object> tmap = new HashMap<Object, Object>();
+            Map<Object, Object> tmap = new HashMap<>();
             tmap.put("key", "value");
             Object objKey = new Object();
             tmap.put(objKey, "objValue");
@@ -297,23 +297,23 @@ public class TemplateTestCase extends FileTestCase {
             dataModel.put("bigDecimal", new SimpleNumber(java.math.BigDecimal.valueOf(1)));
             dataModel.put("bigDecimal2", new SimpleNumber(java.math.BigDecimal.valueOf(1, 16)));
         } else if (simpleTestName.equals("simplehash-char-key")) {
-            HashMap<String, String> mStringC = new HashMap<String, String>();
+            HashMap<String, String> mStringC = new HashMap<>();
             mStringC.put("c", "string");
             dataModel.put("mStringC", mStringC);
             
-            HashMap<String, String> mStringCNull = new HashMap<String, String>();
+            HashMap<String, String> mStringCNull = new HashMap<>();
             mStringCNull.put("c", null);
             dataModel.put("mStringCNull", mStringCNull);
             
-            HashMap<Character, String> mCharC = new HashMap<Character, String>();
+            HashMap<Character, String> mCharC = new HashMap<>();
             mCharC.put(Character.valueOf('c'), "char");
             dataModel.put("mCharC", mCharC);
             
-            HashMap<String, String> mCharCNull = new HashMap<String, String>();
+            HashMap<String, String> mCharCNull = new HashMap<>();
             mCharCNull.put("c", null);
             dataModel.put("mCharCNull", mCharCNull);
             
-            HashMap<Object, String> mMixed = new HashMap<Object, String>();
+            HashMap<Object, String> mMixed = new HashMap<>();
             mMixed.put(Character.valueOf('c'), "char");
             mMixed.put("s", "string");
             mMixed.put("s2", "string2");
@@ -333,8 +333,8 @@ public class TemplateTestCase extends FileTestCase {
         } else if (simpleTestName.startsWith("type-builtins")) {
             dataModel.put("testmethod", new TestMethod());
             dataModel.put("testnode", new TestNode());
-            dataModel.put("testcollection", new SimpleCollection(new ArrayList<Object>()));
-            dataModel.put("testcollectionEx", DefaultNonListCollectionAdapter.adapt(new HashSet<Object>(), null));
+            dataModel.put("testcollection", new SimpleCollection(new ArrayList<>()));
+            dataModel.put("testcollectionEx", DefaultNonListCollectionAdapter.adapt(new HashSet<>(), null));
             dataModel.put("bean", new TestBean());
         } else if (simpleTestName.equals("date-type-builtins")) {
             GregorianCalendar cal = new GregorianCalendar(2003, 4 - 1, 5, 6, 7, 8);
@@ -376,20 +376,20 @@ public class TemplateTestCase extends FileTestCase {
             NodeModel nm = NodeModel.parse(is);
             dataModel.put("doc", nm);
         } else if (simpleTestName.startsWith("sequence-builtins")) {
-            Set<String> abcSet = new TreeSet<String>();
+            Set<String> abcSet = new TreeSet<>();
             abcSet.add("a");
             abcSet.add("b");
             abcSet.add("c");
             dataModel.put("abcSet", abcSet);
             dataModel.put("abcSetNonSeq", DefaultNonListCollectionAdapter.adapt(abcSet, beansWrapper));
             
-            List<String> listWithNull = new ArrayList<String>();
+            List<String> listWithNull = new ArrayList<>();
             listWithNull.add("a");
             listWithNull.add(null);
             listWithNull.add("c");
             dataModel.put("listWithNull", listWithNull);
             
-            List<String> listWithNullsOnly = new ArrayList<String>();
+            List<String> listWithNullsOnly = new ArrayList<>();
             listWithNull.add(null);
             listWithNull.add(null);
             listWithNull.add(null);
@@ -397,7 +397,7 @@ public class TemplateTestCase extends FileTestCase {
             
             dataModel.put("abcCollection", new SimpleCollection(abcSet));
             
-            Set<String> set = new HashSet<String>();
+            Set<String> set = new HashSet<>();
             set.add("a");
             set.add("b");
             set.add("c");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestSuite.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestSuite.java b/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestSuite.java
index 2733b79..4ec5e15 100644
--- a/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestSuite.java
+++ b/src/test/java/org/apache/freemarker/test/templatesuite/TemplateTestSuite.java
@@ -81,7 +81,7 @@ public class TemplateTestSuite extends TestSuite {
     public static final String INCOMPATIBLE_IMPROVEMENTS_PROPERTY_NAME
             = "freemareker.templateTestSuite.incompatibleImprovements";
     
-    private final Map<String, String> testSuiteSettings = new LinkedHashMap<String, String>();
+    private final Map<String, String> testSuiteSettings = new LinkedHashMap<>();
 
     private final ArrayList<Version> testSuiteIcis;
 
@@ -100,7 +100,7 @@ public class TemplateTestSuite extends TestSuite {
             System.out.println("Note: " + TEST_FILTER_PROPERTY_NAME + " is " + _StringUtil.jQuote(testCaseNameFilter));
         }
         
-        testSuiteIcis = new ArrayList<Version>();
+        testSuiteIcis = new ArrayList<>();
         String testedIcIsStr = System.getProperty(INCOMPATIBLE_IMPROVEMENTS_PROPERTY_NAME);
         if (testedIcIsStr != null) {
             for (String iciStr : testedIcIsStr.split(",")) {
@@ -228,7 +228,7 @@ public class TemplateTestSuite extends TestSuite {
             }
         }
 
-        List<TemplateTestCase> result = new ArrayList<TemplateTestCase>(); 
+        List<TemplateTestCase> result = new ArrayList<>();
         for (Version iciToTest : icisToTest) {
             TemplateTestCase testCase = new TemplateTestCase(
                     caseName + "(ici=" + iciToTest + ")", caseName,
@@ -247,7 +247,7 @@ public class TemplateTestSuite extends TestSuite {
     }
 
     private List<Version> parseVersionList(String versionsStr) {
-        List<Version> versions = new ArrayList<Version>();
+        List<Version> versions = new ArrayList<>();
         for (String versionStr : versionsStr.split(",")) {
             versionStr = versionStr.trim();
             if (versionStr.length() != 0) {
@@ -279,7 +279,7 @@ public class TemplateTestSuite extends TestSuite {
 
     private Map<String, String> getCaseFMSettings(Element e) {
         final Map<String, String> caseFMSettings;
-        caseFMSettings = new LinkedHashMap<String, String>();
+        caseFMSettings = new LinkedHashMap<>();
         NodeList settingElems = e.getElementsByTagName(ELEM_SETTING);
         for (int elemIdx = 0; elemIdx < settingElems.getLength(); elemIdx++) {
             NamedNodeMap attrs = settingElems.item(elemIdx).getAttributes();

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/test/templatesuite/models/Listables.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/test/templatesuite/models/Listables.java b/src/test/java/org/apache/freemarker/test/templatesuite/models/Listables.java
index 65172c8..9d7aec1 100644
--- a/src/test/java/org/apache/freemarker/test/templatesuite/models/Listables.java
+++ b/src/test/java/org/apache/freemarker/test/templatesuite/models/Listables.java
@@ -49,7 +49,7 @@ public class Listables {
     
     private static final List<Integer> LIST;
     static {
-        List<Integer> list = new ArrayList<Integer>();
+        List<Integer> list = new ArrayList<>();
         list.add(11);
         list.add(22);
         list.add(33);
@@ -58,7 +58,7 @@ public class Listables {
 
     private static final List<Integer> LINKED_LIST;
     static {
-        List<Integer> list = new LinkedList<Integer>();
+        List<Integer> list = new LinkedList<>();
         list.add(11);
         list.add(22);
         list.add(33);
@@ -67,13 +67,13 @@ public class Listables {
 
     private static final List<Integer> EMPTY_LINKED_LIST;
     static {
-        List<Integer> list = new LinkedList<Integer>();
+        List<Integer> list = new LinkedList<>();
         EMPTY_LINKED_LIST = list;
     }
     
     private static final Set<Integer> SET;
     static {
-        Set<Integer> set = new TreeSet<Integer>();
+        Set<Integer> set = new TreeSet<>();
         set.add(11);
         set.add(22);
         set.add(33);
@@ -114,7 +114,7 @@ public class Listables {
     
     public List<TemplateHashModelEx2> getHashEx2s() throws TemplateModelException {
         Map<Object, Object> map;
-        map = new LinkedHashMap<Object, Object>();
+        map = new LinkedHashMap<>();
         map.put("k1", "v1");
         map.put(2, "v2");
         map.put("k3", "v3");
@@ -126,7 +126,7 @@ public class Listables {
     }
 
     public List<? extends TemplateHashModelEx> getEmptyHashes() throws TemplateModelException {
-        List<TemplateHashModelEx> emptyMaps = new ArrayList<TemplateHashModelEx>();
+        List<TemplateHashModelEx> emptyMaps = new ArrayList<>();
         emptyMaps.addAll(getMapsWrappedAsEx2(Collections.emptyMap()));
         emptyMaps.add((TemplateHashModelEx) new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_24).build()
                 .wrap(Collections.emptyMap()));
@@ -137,7 +137,7 @@ public class Listables {
      * Returns the map wrapped on various ways.
      */
     private List<TemplateHashModelEx2> getMapsWrappedAsEx2(Map<?, ?> map) throws TemplateModelException {
-        List<TemplateHashModelEx2> maps = new ArrayList<TemplateHashModelEx2>();
+        List<TemplateHashModelEx2> maps = new ArrayList<>();
         
         maps.add((SimpleHash) new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_0).build().wrap(map));
         

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ac662675/src/test/java/org/apache/freemarker/test/templatesuite/models/OverloadedMethods2.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/test/templatesuite/models/OverloadedMethods2.java b/src/test/java/org/apache/freemarker/test/templatesuite/models/OverloadedMethods2.java
index 497631c..c89e54a 100644
--- a/src/test/java/org/apache/freemarker/test/templatesuite/models/OverloadedMethods2.java
+++ b/src/test/java/org/apache/freemarker/test/templatesuite/models/OverloadedMethods2.java
@@ -922,7 +922,7 @@ public class OverloadedMethods2 {
     
     @SuppressWarnings("boxing")
     public List<Integer> getJavaIntegerList() {
-        List<Integer> list = new ArrayList<Integer>();
+        List<Integer> list = new ArrayList<>();
         list.add(1);
         list.add(2);
         return list;
@@ -930,7 +930,7 @@ public class OverloadedMethods2 {
 
     @SuppressWarnings("boxing")
     public List<Byte> getJavaByteList() {
-        List<Byte> list = new ArrayList<Byte>();
+        List<Byte> list = new ArrayList<>();
         list.add((byte) 1);
         list.add((byte) 2);
         return list;
@@ -938,7 +938,7 @@ public class OverloadedMethods2 {
 
     @SuppressWarnings("boxing")
     public List<Character> getJavaCharacterList() {
-        List<Character> list = new ArrayList<Character>();
+        List<Character> list = new ArrayList<>();
         list.add('c');
         list.add('C');
         return list;


Mime
View raw message