ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [02/32] ambari git commit: AMBARI-21723. Redundant type arguments (Java 8)
Date Thu, 17 Aug 2017 10:16:08 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/test/java/org/apache/ambari/server/view/ViewSubResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewSubResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewSubResourceProviderTest.java
index 18f3492..e6a6213 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewSubResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewSubResourceProviderTest.java
@@ -212,9 +212,9 @@ public class ViewSubResourceProviderTest {
           datapointsArray[i][0] = temporalInfo.getStartTime() + i * temporalInfo.getStep();
           datapointsArray[i][1] = value;
         }
-        return Collections.<String, Object>singletonMap(metricName, datapointsArray);
+        return Collections.singletonMap(metricName, datapointsArray);
       }
-      return Collections.<String, Object>singletonMap(metricName, value);
+      return Collections.singletonMap(metricName, value);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/test/java/org/apache/ambari/server/view/events/EventImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/events/EventImplTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/view/events/EventImplTest.java
index 299c646..2a2d216 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/view/events/EventImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/view/events/EventImplTest.java
@@ -43,7 +43,7 @@ public class EventImplTest {
 
   @Test
   public void testGetId() throws Exception {
-    EventImpl event = getEvent("MyEvent", Collections.<String, String>emptyMap(), view_xml);
+    EventImpl event = getEvent("MyEvent", Collections.emptyMap(), view_xml);
     Assert.assertEquals("MyEvent", event.getId());
   }
 
@@ -59,7 +59,7 @@ public class EventImplTest {
 
   @Test
   public void testGetViewSubject() throws Exception {
-    EventImpl event = getEvent("MyEvent", Collections.<String, String>emptyMap(), view_xml);
+    EventImpl event = getEvent("MyEvent", Collections.emptyMap(), view_xml);
 
     Assert.assertEquals("MY_VIEW", event.getViewSubject().getViewName());
     Assert.assertEquals("My View!", event.getViewSubject().getLabel());
@@ -68,11 +68,11 @@ public class EventImplTest {
 
   @Test
   public void testGetViewInstanceSubject() throws Exception {
-    EventImpl event = getEvent("MyEvent", Collections.<String, String>emptyMap(), view_xml);
+    EventImpl event = getEvent("MyEvent", Collections.emptyMap(), view_xml);
     Assert.assertNull(event.getViewInstanceSubject());
 
     ViewInstanceEntity viewInstanceEntity = ViewInstanceEntityTest.getViewInstanceEntity();
-    event = getEvent("MyEvent", Collections.<String, String>emptyMap(), viewInstanceEntity);
+    event = getEvent("MyEvent", Collections.emptyMap(), viewInstanceEntity);
     Assert.assertEquals(viewInstanceEntity, event.getViewInstanceSubject());
   }
 


Mime
View raw message