commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1790899 [5/5] - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration2/ main/java/org/apache/commons/configuration2/beanutils/ main/java/org/apache/commons/configuration2/builder/ main/java/org/apache/commo...
Date Mon, 10 Apr 2017 21:56:48 GMT
Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationAttributePointer.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationAttributePointer.java?rev=1790899&r1=1790898&r2=1790899&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationAttributePointer.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationAttributePointer.java
Mon Apr 10 21:56:46 2017
@@ -60,10 +60,10 @@ public class TestConfigurationAttributeP
         ndBuilder.name("parent").addAttribute(ATTR_NAME, ATTR_VALUE);
         ImmutableNode nd = ndBuilder.create();
         parent =
-                new ConfigurationNodePointer<ImmutableNode>(nd, Locale.ENGLISH,
+                new ConfigurationNodePointer<>(nd, Locale.ENGLISH,
                         new InMemoryNodeModel(nd).getNodeHandler());
         pointer =
-                new ConfigurationAttributePointer<ImmutableNode>(parent,
+                new ConfigurationAttributePointer<>(parent,
                         ATTR_NAME);
     }
 

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationIteratorAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationIteratorAttributes.java?rev=1790899&r1=1790898&r2=1790899&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationIteratorAttributes.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationIteratorAttributes.java
Mon Apr 10 21:56:46 2017
@@ -61,7 +61,7 @@ public class TestConfigurationIteratorAt
                 orgNode.setAttribute(TEST_ATTR, "yes").setAttribute(NS_ATTR,
                         "configuration");
         pointer =
-                new ConfigurationNodePointer<ImmutableNode>(testNode,
+                new ConfigurationNodePointer<>(testNode,
                         Locale.getDefault(), handler);
     }
 
@@ -72,11 +72,11 @@ public class TestConfigurationIteratorAt
     public void testIterateAllAttributes()
     {
         ConfigurationNodeIteratorAttribute<ImmutableNode> it =
-                new ConfigurationNodeIteratorAttribute<ImmutableNode>(pointer,
+                new ConfigurationNodeIteratorAttribute<>(pointer,
                         new QName(null, "*"));
         assertEquals("Wrong number of attributes", 3, iteratorSize(it));
         List<NodePointer> attrs = iterationElements(it);
-        Set<String> attrNames = new HashSet<String>();
+        Set<String> attrNames = new HashSet<>();
         for (NodePointer np : attrs)
         {
             attrNames.add(np.getName().getName());
@@ -93,7 +93,7 @@ public class TestConfigurationIteratorAt
     public void testIterateSpecificAttribute()
     {
         ConfigurationNodeIteratorAttribute<ImmutableNode> it =
-                new ConfigurationNodeIteratorAttribute<ImmutableNode>(pointer,
+                new ConfigurationNodeIteratorAttribute<>(pointer,
                         new QName(null, TEST_ATTR));
         assertEquals("Wrong number of attributes", 1, iteratorSize(it));
         assertEquals("Wrong attribute", TEST_ATTR, iterationElements(it).get(0)
@@ -107,7 +107,7 @@ public class TestConfigurationIteratorAt
     public void testIterateUnknownAttribute()
     {
         ConfigurationNodeIteratorAttribute<ImmutableNode> it =
-                new ConfigurationNodeIteratorAttribute<ImmutableNode>(pointer,
+                new ConfigurationNodeIteratorAttribute<>(pointer,
                         new QName(null, "unknown"));
         assertEquals("Found attributes", 0, iteratorSize(it));
     }
@@ -119,7 +119,7 @@ public class TestConfigurationIteratorAt
     public void testIterateNamespaceUnknown()
     {
         ConfigurationNodeIteratorAttribute<ImmutableNode> it =
-                new ConfigurationNodeIteratorAttribute<ImmutableNode>(pointer,
+                new ConfigurationNodeIteratorAttribute<>(pointer,
                         new QName("test", "*"));
         assertEquals("Found attributes", 0, iteratorSize(it));
     }
@@ -131,7 +131,7 @@ public class TestConfigurationIteratorAt
     public void testIterateNamespaceAttribute()
     {
         ConfigurationNodeIteratorAttribute<ImmutableNode> it =
-                new ConfigurationNodeIteratorAttribute<ImmutableNode>(pointer,
+                new ConfigurationNodeIteratorAttribute<>(pointer,
                         new QName(NAMESPACE, "attr"));
         assertEquals("Wrong number of attributes", 1, iteratorSize(it));
         assertEquals("Wrong attribute", NS_ATTR, iterationElements(it).get(0)
@@ -145,7 +145,7 @@ public class TestConfigurationIteratorAt
     public void testIterateNamespaceWildcard()
     {
         ConfigurationNodeIteratorAttribute<ImmutableNode> it =
-                new ConfigurationNodeIteratorAttribute<ImmutableNode>(pointer,
+                new ConfigurationNodeIteratorAttribute<>(pointer,
                         new QName(NAMESPACE, "*"));
         assertEquals("Wrong number of attributes", 1, iteratorSize(it));
         assertEquals("Wrong attribute", NS_ATTR, iterationElements(it).get(0)

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodeIteratorChildren.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodeIteratorChildren.java?rev=1790899&r1=1790898&r2=1790899&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodeIteratorChildren.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodeIteratorChildren.java
Mon Apr 10 21:56:46 2017
@@ -69,7 +69,7 @@ public class TestConfigurationNodeIterat
     private ConfigurationNodePointer<ImmutableNode> createPointer(
             ImmutableNode node)
     {
-        return new ConfigurationNodePointer<ImmutableNode>(node,
+        return new ConfigurationNodePointer<>(node,
                 Locale.getDefault(), handler);
     }
 
@@ -80,7 +80,7 @@ public class TestConfigurationNodeIterat
     public void testIterateAllChildren()
     {
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, null, false, null);
         assertEquals("Wrong number of elements", CHILD_COUNT, iteratorSize(it));
         checkValues(it, 1, 2, 3, 4, 5);
@@ -93,7 +93,7 @@ public class TestConfigurationNodeIterat
     public void testIterateReverse()
     {
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, null, true, null);
         assertEquals("Wrong number of elements", CHILD_COUNT, iteratorSize(it));
         checkValues(it, 5, 4, 3, 2, 1);
@@ -107,7 +107,7 @@ public class TestConfigurationNodeIterat
     {
         NodeNameTest test = new NodeNameTest(new QName(null, "*"));
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, test, false, null);
         assertEquals("Wrong number of elements", CHILD_COUNT, iteratorSize(it));
     }
@@ -121,7 +121,7 @@ public class TestConfigurationNodeIterat
     {
         NodeNameTest test = new NodeNameTest(new QName("prefix", "*"));
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, test, false, null);
         assertNull("Undefined node pointer not returned", it.getNodePointer());
         assertEquals("Prefix was not evaluated", 0, iteratorSize(it));
@@ -135,7 +135,7 @@ public class TestConfigurationNodeIterat
     {
         NodeNameTest test = new NodeNameTest(new QName(null, CHILD_NAME2));
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, test, false, null);
         assertTrue("No children found", iteratorSize(it) > 0);
         for (NodePointer nd : iterationElements(it))
@@ -153,7 +153,7 @@ public class TestConfigurationNodeIterat
     {
         NodeTest test = new ProcessingInstructionTest("test");
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, test, false, null);
         assertEquals("Unknown test was not evaluated", 0, iteratorSize(it));
     }
@@ -166,7 +166,7 @@ public class TestConfigurationNodeIterat
     {
         NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_NODE);
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, test, false, null);
         assertEquals("Node type not evaluated", CHILD_COUNT, iteratorSize(it));
     }
@@ -180,7 +180,7 @@ public class TestConfigurationNodeIterat
     {
         NodeTypeTest test = new NodeTypeTest(Compiler.NODE_TYPE_COMMENT);
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, test, false, null);
         assertEquals("Unknown node type not evaluated", 0, iteratorSize(it));
     }
@@ -192,10 +192,10 @@ public class TestConfigurationNodeIterat
     public void testIterateStartsWith()
     {
         ConfigurationNodePointer<ImmutableNode> childPointer =
-                new ConfigurationNodePointer<ImmutableNode>(rootPointer, root
+                new ConfigurationNodePointer<>(rootPointer, root
                         .getChildren().get(2), handler);
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, null, false, childPointer);
         assertEquals("Wrong start position", 0, it.getPosition());
         List<NodePointer> nodes = iterationElements(it);
@@ -217,10 +217,10 @@ public class TestConfigurationNodeIterat
     public void testIterateStartsWithReverse()
     {
         ConfigurationNodePointer<ImmutableNode> childPointer =
-                new ConfigurationNodePointer<ImmutableNode>(rootPointer, root
+                new ConfigurationNodePointer<>(rootPointer, root
                         .getChildren().get(3), handler);
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, null, true, childPointer);
         int value = 3;
         for (int index = 1; it.setPosition(index); index++, value--)
@@ -240,11 +240,11 @@ public class TestConfigurationNodeIterat
     public void testIterateStartsWithInvalid()
     {
         ConfigurationNodePointer<ImmutableNode> childPointer =
-                new ConfigurationNodePointer<ImmutableNode>(rootPointer,
+                new ConfigurationNodePointer<>(rootPointer,
                         new ImmutableNode.Builder().name("newNode").create(),
                         handler);
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         rootPointer, null, false, childPointer);
         assertEquals("Wrong size of iteration", CHILD_COUNT, iteratorSize(it));
         it.setPosition(1);
@@ -278,7 +278,7 @@ public class TestConfigurationNodeIterat
     {
         NodeNameTest test = new NodeNameTest(new QName(PREFIX, "*"));
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         createPointerWithNamespace(), test, false, null);
         assertEquals("Wrong number of elements", 1, iteratorSize(it));
         for (NodePointer p : iterationElements(it))
@@ -296,7 +296,7 @@ public class TestConfigurationNodeIterat
     {
         NodeNameTest test = new NodeNameTest(new QName(PREFIX, PREFIX_NODE));
         ConfigurationNodeIteratorChildren<ImmutableNode> it =
-                new ConfigurationNodeIteratorChildren<ImmutableNode>(
+                new ConfigurationNodeIteratorChildren<>(
                         createPointerWithNamespace(), test, false, null);
         assertEquals("Wrong number of elements", 1, iteratorSize(it));
         for (NodePointer p : iterationElements(it))

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodePointer.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodePointer.java?rev=1790899&r1=1790898&r2=1790899&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodePointer.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/xpath/TestConfigurationNodePointer.java
Mon Apr 10 21:56:46 2017
@@ -45,7 +45,7 @@ public class TestConfigurationNodePointe
     {
         super.setUp();
         pointer =
-                new ConfigurationNodePointer<ImmutableNode>(root,
+                new ConfigurationNodePointer<>(root,
                         Locale.getDefault(), handler);
     }
 
@@ -55,9 +55,9 @@ public class TestConfigurationNodePointe
     @Test
     public void testCompareChildNodePointersChildren()
     {
-        NodePointer p1 = new ConfigurationNodePointer<ImmutableNode>(
+        NodePointer p1 = new ConfigurationNodePointer<>(
                 pointer, root.getChildren().get(1), handler);
-        NodePointer p2 = new ConfigurationNodePointer<ImmutableNode>(
+        NodePointer p2 = new ConfigurationNodePointer<>(
                 pointer, root.getChildren().get(3), handler);
         assertEquals("Incorrect order", -1, pointer.compareChildNodePointers(
                 p1, p2));
@@ -75,10 +75,10 @@ public class TestConfigurationNodePointe
         ImmutableNode n1 = new ImmutableNode.Builder().name("n1").create();
         ImmutableNode n2 = new ImmutableNode.Builder().name("n2").create();
         NodePointer p1 =
-                new ConfigurationNodePointer<ImmutableNode>(pointer, n1,
+                new ConfigurationNodePointer<>(pointer, n1,
                         handler);
         NodePointer p2 =
-                new ConfigurationNodePointer<ImmutableNode>(pointer, n2,
+                new ConfigurationNodePointer<>(pointer, n2,
                         handler);
         assertEquals("Incorrect order", 0,
                 pointer.compareChildNodePointers(p1, p2));
@@ -113,7 +113,7 @@ public class TestConfigurationNodePointe
         ImmutableNode leafNode =
                 new ImmutableNode.Builder().name("leafNode").create();
         pointer =
-                new ConfigurationNodePointer<ImmutableNode>(pointer, leafNode,
+                new ConfigurationNodePointer<>(pointer, leafNode,
                         handler);
         assertTrue("Not a leaf node", pointer.isLeaf());
     }

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java?rev=1790899&r1=1790898&r2=1790899&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java
Mon Apr 10 21:56:46 2017
@@ -70,7 +70,7 @@ public class TestServletRequestConfigura
             @Override
             public Map<?, ?> getParameterMap()
             {
-                return new HashMap<Object, Object>();
+                return new HashMap<>();
             }
         };
 



Mime
View raw message