myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject [myfaces-tobago] 01/04: TOBAGO-1795: Set Java Source to Java 8 * remove unneeded explicit type
Date Wed, 27 Sep 2017 13:00:59 GMT
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 9111da7f1b573c1e003aeaf2c5c4cd92c0baf689
Author: Udo Schnurpfeil <lofwyr@apache.org>
AuthorDate: Thu Sep 21 10:29:50 2017 +0200

    TOBAGO-1795: Set Java Source to Java 8
    * remove unneeded explicit type
---
 .../main/java/org/apache/myfaces/tobago/context/TobagoBundle.java    | 2 +-
 .../org/apache/myfaces/tobago/internal/behavior/EventBehavior.java   | 2 +-
 .../apache/myfaces/tobago/internal/component/AbstractUISheet.java    | 2 +-
 .../myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java    | 4 ++--
 .../myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java  | 2 +-
 .../myfaces/tobago/internal/config/AbstractTobagoTestBase.java       | 5 ++---
 .../java/org/apache/myfaces/tobago/example/data/SolarObject.java     | 2 +-
 .../tobago/example/demo/PrettyUrlForMenuNavigationHandler.java       | 3 +--
 8 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java
index 28c82a4..da7bd51 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoBundle.java
@@ -64,7 +64,7 @@ public class TobagoBundle extends ResourceBundle {
 
   @Override
   public Enumeration<String> getKeys() {
-    return Collections.enumeration(Collections.<String>emptyList());
+    return Collections.enumeration(Collections.emptyList());
   }
 
   public String getBundleName() {
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java
index 8e4468c..5faafbe 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/EventBehavior.java
@@ -274,7 +274,7 @@ public class EventBehavior extends ClientBehaviorBase {
   private Collection<String> evalForCollection(String attributeName) {
     Object value = getStateHelper().eval(attributeName);
     if (value == null) {
-      return Collections.<String>emptyList();
+      return Collections.emptyList();
     } else if (value instanceof Collection) {
       return (Collection<String>) value;
     } else if (value instanceof String) {
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
index 1d1d0d7..deed9bb 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
@@ -315,7 +315,7 @@ public abstract class AbstractUISheet extends AbstractUIData
     final SheetState state = getSheetState(context);
     if (state != null) {
       final List<Integer> list = (List<Integer>) ComponentUtils.getAttribute(this,
Attributes.selectedListString);
-      state.setSelectedRows(list != null ? list : Collections.<Integer>emptyList());
+      state.setSelectedRows(list != null ? list : Collections.emptyList());
       ComponentUtils.removeAttribute(this, Attributes.selectedListString);
       ComponentUtils.removeAttribute(this, Attributes.scrollPosition);
     }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
index c772096..e8e5ee9 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
@@ -227,11 +227,11 @@ public class SheetRenderer extends RendererBase {
     final List<AbstractUIColumnBase> columns = sheet.getAllColumns();
     final boolean autoLayout = sheet.isAutoLayout();
 
-    ensureColumnWidthsSize(columnWidths, columns, Collections.<Integer>emptyList());
+    ensureColumnWidthsSize(columnWidths, columns, Collections.emptyList());
 
     if (!autoLayout) {
       encodeHiddenInput(writer,
-          JsonUtils.encode(definedColumnWidths ? columnWidths : Collections.<Integer>emptyList()),
+          JsonUtils.encode(definedColumnWidths ? columnWidths : Collections.emptyList()),
           sheetId + SUFFIX_WIDTHS);
 
       final ArrayList<String> encodedRendered = new ArrayList<>();
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
index 98bce52..af90a8c 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SuggestRenderer.java
@@ -155,7 +155,7 @@ public class SuggestRenderer extends RendererBase {
             + "Elements needs to be " + String.class.getName() + " or " + AutoSuggestItem.class.getName());
       }
     } else {
-      autoSuggestItems.setItems(Collections.<AutoSuggestItem>emptyList());
+      autoSuggestItems.setItems(Collections.emptyList());
     }
     return autoSuggestItems;
   }
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
index beff44e..748d67b 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
@@ -29,7 +29,6 @@ import org.apache.myfaces.tobago.component.UIOut;
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIPopup;
 import org.apache.myfaces.tobago.config.TobagoConfig;
-import org.apache.myfaces.tobago.context.Theme;
 import org.apache.myfaces.tobago.context.ThemeImpl;
 import org.apache.myfaces.tobago.context.TobagoContext;
 import org.apache.myfaces.tobago.internal.mock.faces.MockTheme;
@@ -77,8 +76,8 @@ public abstract class AbstractTobagoTestBase extends AbstractJsfTestCase
{
     // Tobago specific extensions
 
     final TobagoConfigImpl tobagoConfig = TobagoConfigMergingUnitTest.loadAndMerge("tobago-config-for-unit-tests.xml");
-    final ThemeImpl theme = new MockTheme("default", "Default Mock Theme", Collections.<Theme>emptyList());
-    final ThemeImpl one = new MockTheme("one", "Mock Theme One", Collections.singletonList((Theme)
theme));
+    final ThemeImpl theme = new MockTheme("default", "Default Mock Theme", Collections.emptyList());
+    final ThemeImpl one = new MockTheme("one", "Mock Theme One", Collections.singletonList(theme));
     tobagoConfig.addAvailableTheme(theme);
     tobagoConfig.addAvailableTheme(one);
     tobagoConfig.resolveThemes();
diff --git a/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
b/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
index b8f12d8..4d77f56 100644
--- a/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
+++ b/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
@@ -183,7 +183,7 @@ public class SolarObject {
   }
 
   public List<Element> getChemicalComposition() {
-    return chemicalComposition != null ? chemicalComposition : Collections.<Element>emptyList();
+    return chemicalComposition != null ? chemicalComposition : Collections.emptyList();
   }
 
   public void setChemicalComposition(final List<Element> chemicalComposition) {
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java
b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java
index bbd7169..b766ad8 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java
@@ -28,7 +28,6 @@ import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
 import java.util.Collections;
-import java.util.List;
 
 public class PrettyUrlForMenuNavigationHandler extends NavigationHandler {
 
@@ -49,7 +48,7 @@ public class PrettyUrlForMenuNavigationHandler extends NavigationHandler
{
       try {
         externalContext.redirect(
             externalContext.encodeRedirectURL(externalContext.getRequestContextPath() + outcome,
-            Collections.<String, List<String>>emptyMap()));
+            Collections.emptyMap()));
       } catch (final IOException e) {
         // not nice?
         facesContext.renderResponse();

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <commits@myfaces.apache.org>.

Mime
View raw message