jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1698305 - in /jmeter/trunk: src/core/org/apache/jmeter/engine/ src/jorphan/org/apache/jorphan/collections/ test/src/org/apache/jmeter/ test/src/org/apache/jmeter/control/ test/src/org/apache/jmeter/engine/ test/src/org/apache/jmeter/engine...
Date Fri, 28 Aug 2015 11:07:46 GMT
Author: sebb
Date: Fri Aug 28 11:07:45 2015
New Revision: 1698305

URL: http://svn.apache.org/r1698305
Log:
Require a minimum of Java 7
Redundant specification of type arguments
Bugzilla Id: 57981

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
    jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
    jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java
    jmeter/trunk/test/src/org/apache/jmeter/control/TestLoopController.java
    jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java
    jmeter/trunk/test/src/org/apache/jmeter/control/TestSwitchController.java
    jmeter/trunk/test/src/org/apache/jmeter/engine/DistributedRunnerTest.java
    jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java
    jmeter/trunk/test/src/org/apache/jmeter/engine/util/TestValueReplacer.java
    jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java
    jmeter/trunk/test/src/org/apache/jmeter/functions/TestJexlFunction.java
    jmeter/trunk/test/src/org/apache/jmeter/functions/TestRegexFunction.java
    jmeter/trunk/test/src/org/apache/jmeter/functions/TestTimeFunction.java
    jmeter/trunk/test/src/org/apache/jmeter/gui/action/TestLoad.java
    jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java
    jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTest.java
    jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java
    jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java
    jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java
    jmeter/trunk/test/src/org/apache/jorphan/exec/TestKeyToolUtils.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java Fri Aug 28 11:07:45
2015
@@ -335,7 +335,7 @@ public class StandardJMeterEngine implem
         test.traverse(new TurnElementsOn());
         if (startListenersLater) { notifyTestListenersOfStart(testListeners); }
 
-        List<?> testLevelElements = new LinkedList<Object>(test.list(test.getArray()[0]));
+        List<?> testLevelElements = new LinkedList<>(test.list(test.getArray()[0]));
         removeThreadGroups(testLevelElements);
 
         SearchByClass<SetupThreadGroup> setupSearcher = new SearchByClass<>(SetupThreadGroup.class);

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java Fri Aug 28 11:07:45
2015
@@ -731,7 +731,7 @@ public class HashTree implements Seriali
         if (temp != null) {
             return temp.list();
         }
-        return new HashSet<Object>();
+        return new HashSet<>();
     }
 
     /**
@@ -778,7 +778,7 @@ public class HashTree implements Seriali
         if (tree != null) {
             return tree.list();
         }
-        return new HashSet<Object>();
+        return new HashSet<>();
     }
 
     /**

Modified: jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java Fri Aug 28 11:07:45 2015
@@ -43,7 +43,7 @@ import org.apache.jmeter.util.JMeterUtil
 public class JMeterVersionTest extends JMeterTestCase {
 
     // Convert between eclipse jar name and build.properties name
-    private static Map<String, String> JAR_TO_BUILD_PROP = new HashMap<String, String>();
+    private static Map<String, String> JAR_TO_BUILD_PROP = new HashMap<>();
     static {
         JAR_TO_BUILD_PROP.put("bsf", "apache-bsf");
         JAR_TO_BUILD_PROP.put("bsh", "beanshell");
@@ -66,8 +66,8 @@ public class JMeterVersionTest extends J
         super(arg0);
     }
 
-    private final Map<String, String> versions = new HashMap<String, String>();
-    private final Set<String> propNames = new HashSet<String>();
+    private final Map<String, String> versions = new HashMap<>();
+    private final Set<String> propNames = new HashSet<>();
 
     private File getFileFromHome(String relativeFile) {
         return new File(JMETER_HOME, relativeFile);
@@ -112,7 +112,7 @@ public class JMeterVersionTest extends J
         final Pattern p = Pattern.compile("\\s+<classpathentry kind=\"lib\" path=\"lib/(?:api/)?(.+?)-([^-]+(-b\\d+|-BETA\\d)?)\\.jar\"/>");
         final Pattern versionPat = Pattern.compile("\\$\\{(.+)\\.version\\}");
         String line;
-        final ArrayList<String> toRemove = new ArrayList<String>();
+        final ArrayList<String> toRemove = new ArrayList<>();
         while((line=eclipse.readLine()) != null){
             final Matcher m = p.matcher(line);
             if (m.matches()) {
@@ -191,7 +191,7 @@ public class JMeterVersionTest extends J
    }
 
     public void testLicences() {
-        Set<String> liceNames = new HashSet<String>();
+        Set<String> liceNames = new HashSet<>();
         for (Map.Entry<String, String> me : versions.entrySet()) {
         final String key = me.getKey();
             liceNames.add(key+"-"+me.getValue()+".txt");

Modified: jmeter/trunk/test/src/org/apache/jmeter/control/TestLoopController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/control/TestLoopController.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/control/TestLoopController.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/control/TestLoopController.java Fri Aug 28 11:07:45
2015
@@ -94,7 +94,7 @@ public class TestLoopController extends
         public void testBug54467() throws Exception {
             JMeterContext jmctx = JMeterContextService.getContext();
             LoopController loop = new LoopController();
-            Map<String, String> variables = new HashMap<String, String>();
+            Map<String, String> variables = new HashMap<>();
             ReplaceStringWithFunctions transformer = new ReplaceStringWithFunctions(new CompoundVariable(),
variables);
             jmctx.setVariables(new JMeterVariables());
 

Modified: jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java Fri Aug
28 11:07:45 2015
@@ -37,7 +37,7 @@ public class TestRandomOrderController e
             roc.addTestElement(new TestSampler("two"));
             roc.addTestElement(new TestSampler("three"));
             TestElement sampler = null;
-            List<String> usedSamplers = new ArrayList<String>();
+            List<String> usedSamplers = new ArrayList<>();
             roc.initialize();
             while ((sampler = roc.next()) != null) {
                 String samplerName = sampler.getName();
@@ -59,7 +59,7 @@ public class TestRandomOrderController e
             RandomOrderController roc = new RandomOrderController();
             roc.addTestElement(new TestSampler("zero"));
             TestElement sampler = null;
-            List<String> usedSamplers = new ArrayList<String>();
+            List<String> usedSamplers = new ArrayList<>();
             roc.initialize();
             while ((sampler = roc.next()) != null) {
                 String samplerName = sampler.getName();

Modified: jmeter/trunk/test/src/org/apache/jmeter/control/TestSwitchController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/control/TestSwitchController.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/control/TestSwitchController.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/control/TestSwitchController.java Fri Aug 28 11:07:45
2015
@@ -252,7 +252,7 @@ public class TestSwitchController extend
         */
         public void testFunction() throws Exception {
             JMeterContext jmctx = JMeterContextService.getContext();
-            Map<String, String> variables = new HashMap<String, String>();
+            Map<String, String> variables = new HashMap<>();
             ReplaceStringWithFunctions transformer = new ReplaceStringWithFunctions(new CompoundVariable(),
variables);
             jmctx.setVariables(new JMeterVariables());
             JMeterVariables jmvars = jmctx.getVariables();

Modified: jmeter/trunk/test/src/org/apache/jmeter/engine/DistributedRunnerTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/engine/DistributedRunnerTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/engine/DistributedRunnerTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/engine/DistributedRunnerTest.java Fri Aug 28 11:07:45
2015
@@ -116,7 +116,7 @@ public class DistributedRunnerTest exten
     }
 
     private static class DistributedRunnerEmul extends DistributedRunner {
-        public List<EmulatorEngine> engines = new LinkedList<EmulatorEngine>();
+        public List<EmulatorEngine> engines = new LinkedList<>();
 
         @Override
         protected JMeterEngine createEngine(String address) throws RemoteException, NotBoundException,
MalformedURLException {

Modified: jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java Fri Aug 28 11:07:45
2015
@@ -48,7 +48,7 @@ public class PackageTest extends JMeterT
     @Override
     public void setUp() {
         jmctx = JMeterContextService.getContext();
-        Map<String, String> variables = new HashMap<String, String>();
+        Map<String, String> variables = new HashMap<>();
         variables.put("my_regex", ".*");
         variables.put("server", "jakarta.apache.org");
         SampleResult result = new SampleResult();

Modified: jmeter/trunk/test/src/org/apache/jmeter/engine/util/TestValueReplacer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/engine/util/TestValueReplacer.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/engine/util/TestValueReplacer.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/engine/util/TestValueReplacer.java Fri Aug 28
11:07:45 2015
@@ -61,7 +61,7 @@ public class TestValueReplacer extends J
             assertTrue(replacer.containsKey("server"));
             TestElement element = new TestPlan();
             element.setProperty(new StringProperty("domain", "jakarta.apache.org"));
-            List<Object> argsin = new ArrayList<Object>();
+            List<Object> argsin = new ArrayList<>();
             argsin.add("username is jack");
             argsin.add("his_password");
             element.setProperty(new CollectionProperty("args", argsin));
@@ -81,7 +81,7 @@ public class TestValueReplacer extends J
             assertTrue(replacer.containsKey("normal_regex"));
             TestElement element = new TestPlan();
             element.setProperty(new StringProperty("domain", "<this><is>xml</this></is>"));
-            List<Object> argsin = new ArrayList<Object>();
+            List<Object> argsin = new ArrayList<>();
             argsin.add("<this><is>xml</this></is>");
             argsin.add("And I say: Hello World.");
             element.setProperty(new CollectionProperty("args", argsin));

Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java Fri Aug 28 11:07:45
2015
@@ -64,7 +64,7 @@ public class PackageTest extends JMeterT
     // Create the CSVRead function and set its parameters.
     private static CSVRead setCSVReadParams(String p1, String p2) throws Exception {
         CSVRead cr = new CSVRead();
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         if (p1 != null) {
             parms.add(new CompoundVariable(p1));
         }
@@ -78,7 +78,7 @@ public class PackageTest extends JMeterT
     // Create the StringFromFile function and set its parameters.
     private static StringFromFile SFFParams(String p1, String p2, String p3, String p4) throws
Exception {
         StringFromFile sff = new StringFromFile();
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         if (p1 != null) {
             parms.add(new CompoundVariable(p1));
         }
@@ -98,7 +98,7 @@ public class PackageTest extends JMeterT
     // Create the SplitFile function and set its parameters.
     private static SplitFunction splitParams(String p1, String p2, String p3) throws Exception
{
         SplitFunction split = new SplitFunction();
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         parms.add(new CompoundVariable(p1));
         if (p2 != null) {
             parms.add(new CompoundVariable(p2));
@@ -118,7 +118,7 @@ public class PackageTest extends JMeterT
     }
 
     private static Collection<CompoundVariable> makeParams(String p1, String p2, String
p3) {
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         if (p1 != null) {
             parms.add(new CompoundVariable(p1));
         }
@@ -823,7 +823,7 @@ public class PackageTest extends JMeterT
     }
 
     private XPath setupXPath(String file, String expr) throws Exception{
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         parms.add(new CompoundVariable(file));
         parms.add(new CompoundVariable(expr));
         XPath xp = new XPath();
@@ -961,7 +961,7 @@ public class PackageTest extends JMeterT
     
     // Perform a sum and check the results
     private void checkSum(AbstractFunction func, String value, String [] addends)  throws
Exception {
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         for (int i=0; i< addends.length; i++){
             parms.add(new CompoundVariable(addends[i]));
         }
@@ -972,7 +972,7 @@ public class PackageTest extends JMeterT
     }
     // Perform a sum and check the results
     private void checkSumNoVar(AbstractFunction func, String value, String [] addends)  throws
Exception {
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         for (int i=0; i< addends.length; i++){
             parms.add(new CompoundVariable(addends[i]));
         }

Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestJexlFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/functions/TestJexlFunction.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/functions/TestJexlFunction.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/functions/TestJexlFunction.java Fri Aug 28 11:07:45
2015
@@ -53,7 +53,7 @@ public class TestJexlFunction extends JM
         vars = new JMeterVariables();
         jmctx.setVariables(vars);
         jmctx.setPreviousResult(result);
-        params = new LinkedList<CompoundVariable>();
+        params = new LinkedList<>();
     }
 
     public void testParameterCount() throws Exception {

Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestRegexFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/functions/TestRegexFunction.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/functions/TestRegexFunction.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/functions/TestRegexFunction.java Fri Aug 28 11:07:45
2015
@@ -66,7 +66,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtraction() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$2$"));
             params.add(new CompoundVariable("2"));
@@ -77,7 +77,7 @@ public class TestRegexFunction extends J
 
         // Test with output variable name
         public void testVariableExtraction1a() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$2$")); // template
             params.add(new CompoundVariable("2")); // match number
@@ -96,7 +96,7 @@ public class TestRegexFunction extends J
 
         // Test with empty output variable name
         public void testVariableExtraction1b() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$2$")); // template
             params.add(new CompoundVariable("2")); // match number
@@ -110,7 +110,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("$2$")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -129,7 +129,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable2() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("$1$$2$")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -148,7 +148,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable3() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("pre$2$post")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -167,7 +167,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable4() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("pre$2$")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -186,7 +186,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable5() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("$2$post")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -205,7 +205,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable6() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("$2$$2$")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -224,7 +224,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable7() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("pre$1$mid$2$post")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -243,7 +243,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable8() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("pre$1$mid$2$")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -262,7 +262,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtractionFromVariable9() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("(\\d+)\\s+(\\w+)"));
             params.add(new CompoundVariable("$1$mid$2$post")); // template
             params.add(new CompoundVariable("1")); // match number
@@ -281,7 +281,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtraction2() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$1$"));
             params.add(new CompoundVariable("3"));
@@ -291,7 +291,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtraction5() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$1$"));
             params.add(new CompoundVariable("ALL"));
@@ -302,7 +302,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtraction6() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$2$"));
             params.add(new CompoundVariable("4"));
@@ -314,7 +314,7 @@ public class TestRegexFunction extends J
         }
 
         public void testComma() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value,? field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$1$"));
             params.add(new CompoundVariable("3"));
@@ -324,7 +324,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtraction3() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("_$1$"));
             params.add(new CompoundVariable("2"));
@@ -334,7 +334,7 @@ public class TestRegexFunction extends J
         }
 
         public void testVariableExtraction4() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$2$, "));
             params.add(new CompoundVariable(".333"));
@@ -344,7 +344,7 @@ public class TestRegexFunction extends J
         }
 
         public void testDefaultValue() throws Exception {
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             params.add(new CompoundVariable("<value,, field=\"(pinposition\\d+)\">(\\d+)</value>"));
             params.add(new CompoundVariable("$2$, "));
             params.add(new CompoundVariable(".333"));

Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestTimeFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/functions/TestTimeFunction.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/functions/TestTimeFunction.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/functions/TestTimeFunction.java Fri Aug 28 11:07:45
2015
@@ -52,7 +52,7 @@ public class TestTimeFunction extends JM
             vars = new JMeterVariables();
             jmctx.setVariables(vars);
             jmctx.setPreviousResult(result);
-            params = new LinkedList<CompoundVariable>();
+            params = new LinkedList<>();
             result = new SampleResult();
             variable = new TimeFunction();
         }

Modified: jmeter/trunk/test/src/org/apache/jmeter/gui/action/TestLoad.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/gui/action/TestLoad.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/gui/action/TestLoad.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/gui/action/TestLoad.java Fri Aug 28 11:07:45 2015
@@ -39,7 +39,7 @@ public class TestLoad extends JMeterTest
     private static final File testfiledir = new File(basedir,"bin/testfiles");
     private static final File demofiledir = new File(basedir,"xdocs/demos");
     
-    private static final Set<String> notTestPlan = new HashSet<String>();// not
full test plans
+    private static final Set<String> notTestPlan = new HashSet<>();// not full
test plans
     
     static{
         notTestPlan.add("load_bug_list.jmx");// used by TestAnchorModifier

Modified: jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java Fri Aug 28 11:07:45
2015
@@ -42,7 +42,7 @@ public class JSyntaxTextAreaTest extends
   
     public void testSyntaxNames() throws IllegalArgumentException,
             IllegalAccessException {
-        HashSet<String> values = new HashSet<String>();
+        HashSet<String> values = new HashSet<>();
         for (Field field : SyntaxConstants.class.getFields()) {
             int modifiers = field.getModifiers();
             if (field.getType().equals(String.class)

Modified: jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTest.java Fri Aug 28 11:07:45 2015
@@ -161,7 +161,7 @@ public class JMeterTest extends JMeterTe
      * Extract titles from component_reference.xml
      */
     public void createTitleSet() throws Exception {
-        guiTitles = new HashMap<String, Boolean>(90);
+        guiTitles = new HashMap<>(90);
 
         String compref = "../xdocs/usermanual/component_reference.xml";
         SAXBuilder bldr = new SAXBuilder();
@@ -191,7 +191,7 @@ public class JMeterTest extends JMeterTe
      * Extract titles from component_reference.xml
      */
     public void createTagSet() throws Exception {
-        guiTags = new HashMap<String, Boolean>(90);
+        guiTags = new HashMap<>(90);
 
         String compref = "../xdocs/usermanual/component_reference.xml";
         SAXBuilder bldr = new SAXBuilder();
@@ -215,7 +215,7 @@ public class JMeterTest extends JMeterTe
      * Extract titles from functions.xml
      */
     public void createFunctionSet() throws Exception {
-        funcTitles = new HashMap<String, Boolean>(20);
+        funcTitles = new HashMap<>(20);
 
         String compref = "../xdocs/usermanual/functions.xml";
         SAXBuilder bldr = new SAXBuilder();
@@ -559,7 +559,7 @@ public class JMeterTest extends JMeterTe
         Object myThis = "";
         Iterator<String> classes = ClassFinder
                 .findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { extendsClass
}).iterator();
-        List<Object> objects = new LinkedList<Object>();
+        List<Object> objects = new LinkedList<>();
         String n = "";
         boolean caughtError = true;
         Throwable caught = null;

Modified: jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java Fri Aug 28 11:07:45
2015
@@ -137,7 +137,7 @@ public abstract class JMeterTestCase ext
 
     protected void checkInvalidParameterCounts(AbstractFunction func, int minimum)
             throws Exception {
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         for (int c = 0; c < minimum; c++) {
             try {
                 func.setParameters(parms);
@@ -152,7 +152,7 @@ public abstract class JMeterTestCase ext
     
     protected void checkInvalidParameterCounts(AbstractFunction func, int min,
             int max) throws Exception {
-        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
+        Collection<CompoundVariable> parms = new LinkedList<>();
         for (int count = 0; count < min; count++) {
             try {
                 func.setParameters(parms);

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java Fri
Aug 28 11:07:45 2015
@@ -126,12 +126,12 @@ public class TestCacheManager extends JM
         
         public HttpURLConnectionStub(HttpMethod method, URL url) {
             super(method, url);
-            this.properties = new HashMap<String, List<String>>();
+            this.properties = new HashMap<>();
         }
         
         @Override
         public void addRequestProperty(String key, String value) {
-            List<String> list = new ArrayList<String>();
+            List<String> list = new ArrayList<>();
             list.add(value);
             this.properties.put(key, list);
         }

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java Fri Aug
28 11:07:45 2015
@@ -402,8 +402,8 @@ public class TestHTMLParser extends JMet
                 expected = getFile(resultFile).iterator();
             } else {
                 // Convert both to Sets
-                expected = new TreeSet<String>(getFile(resultFile)).iterator();
-                TreeSet<URL> temp = new TreeSet<URL>(new Comparator<Object>()
{
+                expected = new TreeSet<>(getFile(resultFile)).iterator();
+                TreeSet<URL> temp = new TreeSet<>(new Comparator<Object>()
{
                     @Override
                     public int compare(Object o1, Object o2) {
                         return (o1.toString().compareTo(o2.toString()));
@@ -429,7 +429,7 @@ public class TestHTMLParser extends JMet
 
         // Get expected results as a List
         private static List<String> getFile(String file) throws Exception {
-            ArrayList<String> al = new ArrayList<String>();
+            ArrayList<String> al = new ArrayList<>();
             if (file != null && file.length() > 0) {
                 BufferedReader br = new BufferedReader(new FileReader(findTestFile(file)));
                 String line = br.readLine();

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java Fri
Aug 28 11:07:45 2015
@@ -892,7 +892,7 @@ public class PostWriterTest extends Test
      */
     private static class StubURLConnection extends HttpURLConnection {
         private ByteArrayOutputStream output = new ByteArrayOutputStream();
-        private Map<String, String> properties = new HashMap<String, String>();
+        private Map<String, String> properties = new HashMap<>();
         
         public StubURLConnection(String url) throws MalformedURLException {
             super(new URL(url));

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java Fri Aug
28 11:07:45 2015
@@ -55,7 +55,7 @@ public class TestHTTPFileArgs extends Te
     }
 
     public void testSetHTTPFileArgs() throws Exception {
-        List<HTTPFileArg> newHTTPFileArgs = new LinkedList<HTTPFileArg>();
+        List<HTTPFileArg> newHTTPFileArgs = new LinkedList<>();
         newHTTPFileArgs.add(new HTTPFileArg("hede"));
         HTTPFileArgs files = new HTTPFileArgs();
         files.setHTTPFileArgs(newHTTPFileArgs);

Modified: jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java Fri Aug 28 11:07:45
2015
@@ -177,7 +177,7 @@ public class PackageTest extends TestCas
      * 
      */
     private void check(String resname, boolean checkUnexpected) throws Exception {
-        ArrayList<String> alf = new ArrayList<String>(500);// holds keys from
file
+        ArrayList<String> alf = new ArrayList<>(500);// holds keys from file
         String res = getResName(resname);
         subTestFailures += readRF(res, alf);
         Collections.sort(alf);
@@ -238,7 +238,7 @@ public class PackageTest extends TestCas
      * @return list of properties files subject to I18N
      */
     public static final String[] getResources(File srcFiledir) {
-        Set<String> set = new TreeSet<String>();
+        Set<String> set = new TreeSet<>();
         findFile(srcFiledir, set, new FilenameFilter() {
             @Override
             public boolean accept(File dir, String name) {
@@ -336,7 +336,7 @@ public class PackageTest extends TestCas
      * @throws Exception if something fails
      */
     public void checkI18n() throws Exception {
-        Map<String, Map<String,String>> missingLabelsPerBundle = new HashMap<String,
Map<String,String>>();
+        Map<String, Map<String,String>> missingLabelsPerBundle = new HashMap<>();
         for (String prefix : prefixList) {
             Properties messages = new Properties();
             messages.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(prefix.substring(1)+".properties"));
@@ -360,7 +360,7 @@ public class PackageTest extends TestCas
         String languageBundle = bundlePath+"_"+language+ ".properties";
         InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(languageBundle);
         if(inputStream == null) {
-            Map<String, String> messagesAsProperties = new HashMap<String, String>();
+            Map<String, String> messagesAsProperties = new HashMap<>();
             for (Iterator<Map.Entry<Object, Object>> iterator = messages.entrySet().iterator();
iterator.hasNext();) {
                 Map.Entry<Object, Object> entry = iterator.next();
                 messagesAsProperties.put((String) entry.getKey(), (String) entry.getValue());

@@ -370,7 +370,7 @@ public class PackageTest extends TestCas
         }
         messagesFr.load(inputStream);
     
-        Map<String, String> missingLabels = new TreeMap<String,String>();
+        Map<String, String> missingLabels = new TreeMap<>();
         for (Iterator<Map.Entry<Object,Object>> iterator =  messages.entrySet().iterator();
iterator.hasNext();) {
             Map.Entry<Object,Object> entry = iterator.next();
             String key = (String)entry.getKey();

Modified: jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java Fri Aug 28 11:07:45
2015
@@ -162,7 +162,7 @@ public class PackageTest extends TestCas
 
         public void testSearch() throws Exception {
             ListedHashTree tree = new ListedHashTree();
-            SearchByClass<Integer> searcher = new SearchByClass<Integer>(Integer.class);
+            SearchByClass<Integer> searcher = new SearchByClass<>(Integer.class);
             String one = "one";
             String two = "two";
             Integer o = Integer.valueOf(1);

Modified: jmeter/trunk/test/src/org/apache/jorphan/exec/TestKeyToolUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jorphan/exec/TestKeyToolUtils.java?rev=1698305&r1=1698304&r2=1698305&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jorphan/exec/TestKeyToolUtils.java (original)
+++ jmeter/trunk/test/src/org/apache/jorphan/exec/TestKeyToolUtils.java Fri Aug 28 11:07:45
2015
@@ -45,7 +45,7 @@ public class TestKeyToolUtils extends Te
      */
     public void testCheckKeytool() throws Exception {
         SystemCommand sc = new SystemCommand(null, null);
-        List<String> arguments = new ArrayList<String>();
+        List<String> arguments = new ArrayList<>();
         arguments.add("xyzqwas"); // should not exist
         try {
             int status = sc.run(arguments);



Mime
View raw message