diff options
author | Alexander Kurtakov | 2016-02-22 09:21:07 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-02-22 09:21:07 +0000 |
commit | 791fa3a67592b11709284fb1c109ae60ecf86033 (patch) | |
tree | 3cca8eb3d98184a2317bfcf786b948b7cad4f6c6 /org.eclipse.help.webapp | |
parent | e39b66d631026d5041e0f9133ea988e6af2ab07c (diff) | |
download | eclipse.platform.ua-791fa3a67592b11709284fb1c109ae60ecf86033.tar.gz eclipse.platform.ua-791fa3a67592b11709284fb1c109ae60ecf86033.tar.xz eclipse.platform.ua-791fa3a67592b11709284fb1c109ae60ecf86033.zip |
Bug 488196 - Move o.e.help.webapp to Java 1.7
Bump the BREE to 1.7.
Remove redundant types as these are majority of new warnings.
Change-Id: I8c209ce8b3aff7773446d348a21a3599b1b481c3
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.help.webapp')
36 files changed, 106 insertions, 106 deletions
diff --git a/org.eclipse.help.webapp/.classpath b/org.eclipse.help.webapp/.classpath index ad32c83a7..098194ca4 100644 --- a/org.eclipse.help.webapp/.classpath +++ b/org.eclipse.help.webapp/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> diff --git a/org.eclipse.help.webapp/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.help.webapp/.settings/org.eclipse.jdt.core.prefs index b0192a3a1..6006e6364 100644 --- a/org.eclipse.help.webapp/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.help.webapp/.settings/org.eclipse.jdt.core.prefs @@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -98,7 +98,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/org.eclipse.help.webapp/META-INF/MANIFEST.MF b/org.eclipse.help.webapp/META-INF/MANIFEST.MF index d0f6166c5..1ee674d27 100644 --- a/org.eclipse.help.webapp/META-INF/MANIFEST.MF +++ b/org.eclipse.help.webapp/META-INF/MANIFEST.MF @@ -18,7 +18,7 @@ Export-Package: org.eclipse.help.internal.webapp;x-friends:="org.eclipse.ua.test org.eclipse.help.internal.webapp.servlet;x-friends:="org.eclipse.ua.tests,org.eclipse.ua.tests.doc", org.eclipse.help.internal.webapp.utils;x-friends:="org.eclipse.ua.tests", org.eclipse.help.webapp -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: com.ibm.icu.text;version="3.8.0", javax.servlet;version="3.1.0", javax.servlet.http;version="3.1.0", diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java index 48ddb833d..410597d2a 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,7 +31,7 @@ import org.osgi.framework.Bundle; public class WebappResources { // resource bundles indexed by locale - private static HashMap<Locale, ResourceBundle> resourceBundleTable = new HashMap<Locale, ResourceBundle>(); + private static HashMap<Locale, ResourceBundle> resourceBundleTable = new HashMap<>(); /** * Returns a string from a property file. It uses 'name' as a the key to diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ButtonData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ButtonData.java index ab53d0080..02e4fbdfd 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ButtonData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ButtonData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2015 IBM Corporation and others. + * Copyright (c) 2009, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ public class ButtonData extends RequestData { IConfigurationElement[] elements = registry .getConfigurationElementsFor(BUTTON_EXTENSION_POINT); if (allButtons == null) { - allButtons = new ArrayList<AbstractButton>(); + allButtons = new ArrayList<>(); for (IConfigurationElement element : elements) { Object obj = null; try { @@ -57,7 +57,7 @@ public class ButtonData extends RequestData { Collections.sort(allButtons); } - List<AbstractButton> buttonList = new ArrayList<AbstractButton>(); + List<AbstractButton> buttonList = new ArrayList<>(); for (AbstractButton button : allButtons) { //if (button.isVisible() && button.getLocation() == location) { buttonList.add(button); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java index ce8ee3b31..4dfaf9340 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -118,7 +118,7 @@ public class EnabledTopicUtils { public static IIndexEntry[] getEnabled(IIndexEntry[] entries) { for (int i=0;i<entries.length;++i) { if (!isEnabled(entries[i])) { - List<IIndexEntry> list = new ArrayList<IIndexEntry>(entries.length); + List<IIndexEntry> list = new ArrayList<>(entries.length); for (int j=0;j<entries.length;++j) { if (j < i || isEnabled(entries[j])) { list.add(entries[j]); @@ -138,7 +138,7 @@ public class EnabledTopicUtils { public static ITopic[] getEnabled(ITopic[] topics) { for (int i=0;i<topics.length;++i) { if (!isEnabled(topics[i])) { - List<ITopic> list = new ArrayList<ITopic>(topics.length); + List<ITopic> list = new ArrayList<>(topics.length); for (int j=0;j<topics.length;++j) { if (j < i || isEnabled(topics[j])) { list.add(topics[j]); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/FrameData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/FrameData.java index 27f2fc4d9..1370cfaec 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/FrameData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/FrameData.java @@ -41,7 +41,7 @@ public class FrameData extends RequestData { IConfigurationElement[] elements = registry .getConfigurationElementsFor(FRAME_EXTENSION_POINT); if (allFrames == null) { - allFrames = new ArrayList<AbstractFrame>(); + allFrames = new ArrayList<>(); for (IConfigurationElement element : elements) { Object obj = null; try { @@ -57,7 +57,7 @@ public class FrameData extends RequestData { Collections.sort(allFrames); } - List<AbstractFrame> frameList = new ArrayList<AbstractFrame>(); + List<AbstractFrame> frameList = new ArrayList<>(); for (AbstractFrame frame : allFrames) { if (frame.isVisible() && frame.getLocation() == location) { frameList.add(frame); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java index 658b9d8a2..5176d83cc 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2015 IBM Corporation and others. + * Copyright (c) 2008, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,8 +43,8 @@ public class IconFinder { private static void addIconPath(String IconKey, String IconPath) { if (IconPathMap == null) { - IconPathMap = new HashMap<String, String>(); - IconPathMap = new TreeMap<String, String>(); // sorted map + IconPathMap = new HashMap<>(); + IconPathMap = new TreeMap<>(); // sorted map } IconPathMap.put(IconKey, IconPath); } diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java index 552360ce0..86bece944 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -157,7 +157,7 @@ public class LayoutData extends RequestData { "", //$NON-NLS-1$ preferences.getImagesDirectory() + "/bookmarks_view.gif", (char)0, false); //$NON-NLS-1$ - ArrayList<AbstractView> viewList = new ArrayList<AbstractView>(); + ArrayList<AbstractView> viewList = new ArrayList<>(); viewList.add(tocview); if (indexview != null) { viewList.add(indexview); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java index 0f7554245..2cc7c6417 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -493,7 +493,7 @@ public class PrintData extends RequestData { } private String getCssIncludes() { - List<String> css = new ArrayList<String>(); + List<String> css = new ArrayList<>(); CssUtil.addCssFiles("topic_css", css); //$NON-NLS-1$ return CssUtil.createCssIncludes(css, "../"); //$NON-NLS-1$ } diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java index 3bcf6dc4f..02f346c6a 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2015 IBM Corporation and others. + * Copyright (c) 2010, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -67,7 +67,7 @@ public class RequestScope { HttpServletResponse resp, boolean isSearchFilter) { AbstractHelpScope[] scopeArray; String scopeString; - List<AbstractHelpScope> scopes = new ArrayList<AbstractHelpScope>(); + List<AbstractHelpScope> scopes = new ArrayList<>(); if (ProductPreferences.useEnablementFilters()) { scopes.add(new FilterScope()); // Workbench is always filtered, infocenter may be } diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java index a13acf068..3ff5906ac 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,7 +10,7 @@ * Sebastian Davids <sdavids@gmx.de> - fix for Bug 182466 * Holger Voormann - fix for bug 365549 (http://eclip.se/365549) * Holger Voormann - fix for bug 364324 (http://eclip.se/364324) - * Alex Blewitt - Bug 474070 + * Alex Blewitt - Bug 474070 *******************************************************************************/ package org.eclipse.help.internal.webapp.data; @@ -87,7 +87,7 @@ public class SearchData extends ActivitiesData { private QueryTooComplexException queryException = null; // List of alternate search terms - private List<String> altList = new ArrayList<String>(); + private List<String> altList = new ArrayList<>(); private boolean showCategories = false; @@ -508,7 +508,7 @@ public class SearchData extends ActivitiesData { return null; } // confirm working set exists and use it - ArrayList<WorkingSet> workingSetCol = new ArrayList<WorkingSet>(scopes.length); + ArrayList<WorkingSet> workingSetCol = new ArrayList<>(scopes.length); for (String scope : scopes) { WorkingSet ws = wsmgr.getWorkingSet(scope); if (ws != null) { @@ -537,7 +537,7 @@ public class SearchData extends ActivitiesData { return null; } // create working set from books - ArrayList<AdaptableToc> tocs = new ArrayList<AdaptableToc>(scopes.length); + ArrayList<AdaptableToc> tocs = new ArrayList<>(scopes.length); for (String scope : scopes) { AdaptableToc toc = wsmgr.getAdaptableToc(scope); if (toc != null) { @@ -563,7 +563,7 @@ public class SearchData extends ActivitiesData { } IToc toc = tocData.getTocs()[selectedToc]; ITopic[] topics = tocData.getTopicPathFromRootPath(toc); - List<AdaptableHelpResource> resources = new ArrayList<AdaptableHelpResource>(); + List<AdaptableHelpResource> resources = new ArrayList<>(); AdaptableToc adaptableToc = new AdaptableToc(toc); if (topics != null) { ITopic selectedTopic = topics[topics.length - 1]; @@ -589,7 +589,7 @@ public class SearchData extends ActivitiesData { } IToc toc = tocData.getTocs()[selectedToc]; ITopic[] topics = tocData.getTopicPathFromRootPath(toc); - List<AdaptableHelpResource> resources = new ArrayList<AdaptableHelpResource>(); + List<AdaptableHelpResource> resources = new ArrayList<>(); AdaptableSelectedToc adaptableSelectedToc = new AdaptableSelectedToc(toc); if (topics != null) { ITopic selectedTopic = topics[topics.length - 1]; @@ -661,7 +661,7 @@ public class SearchData extends ActivitiesData { } @Override public void addHits(List<SearchHit> hits, String highlightTerms) { - List<SearchHit> filtered = new ArrayList<SearchHit>(); + List<SearchHit> filtered = new ArrayList<>(); Iterator<SearchHit> iter = hits.iterator(); while (iter.hasNext()) { SearchHit obj = iter.next(); @@ -685,8 +685,8 @@ public class SearchData extends ActivitiesData { private static void primallySortByCategory(ISearchEngineResult[] toSort) { // compute TOC ordering - Map<String, String> nameIdMap = new HashMap<String, String>(); - List<String> itemsToOrder = new ArrayList<String>(); + Map<String, String> nameIdMap = new HashMap<>(); + List<String> itemsToOrder = new ArrayList<>(); for (int i = 0; i < toSort.length; i++) { IHelpResource cat = toSort[i].getCategory(); if (cat == null) continue; @@ -700,7 +700,7 @@ public class SearchData extends ActivitiesData { } } List<Object> order = ProductPreferences.getTocOrder(itemsToOrder, nameIdMap); - final Map<Object, Integer> catOrder = new HashMap<Object, Integer>(); + final Map<Object, Integer> catOrder = new HashMap<>(); for (int i = 0; i < order.size(); i++) { catOrder.put(order.get(i), Integer.valueOf(i)); } diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java index 2f99eb0fc..ff4dfa253 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -407,7 +407,7 @@ public class TocData extends ActivitiesData { // unknown element type return Collections.emptyList(); } - List<ITopic> childTopics = new ArrayList<ITopic>(children.size()); + List<ITopic> childTopics = new ArrayList<>(children.size()); for (ITopic iTopic : children) { Object c = iTopic; if ((c instanceof ITopic)) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java index 704cf5748..e76f41e08 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -62,7 +62,7 @@ public class ToolbarButton { } public String[][] getMenuData() { - List<String[]> list = new ArrayList<String[]>(); + List<String[]> list = new ArrayList<>(); StringTokenizer tok = new StringTokenizer(param, ","); //$NON-NLS-1$ while(tok.hasMoreTokens()) { String token = tok.nextToken(); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java index 36547c84e..3b5b4dab7 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -74,7 +74,7 @@ public class ToolbarData extends RequestData { return; } - List<ToolbarButton> buttonList = new ArrayList<ToolbarButton>(); + List<ToolbarButton> buttonList = new ArrayList<>(); for (int i = 0; i < names.length; i++) { if ("".equals(names[i])) //$NON-NLS-1$ buttonList.add(new ToolbarButton()); @@ -110,8 +110,8 @@ public class ToolbarData extends RequestData { IConfigurationElement[] elements = registry .getConfigurationElementsFor(BUTTON_EXTENSION_POINT); - List<AbstractButton> extensionButtons = new ArrayList<AbstractButton>(); - List<String> scripts = new ArrayList<String>(); + List<AbstractButton> extensionButtons = new ArrayList<>(); + List<String> scripts = new ArrayList<>(); for (IConfigurationElement element : elements) { Object obj = null; try { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java index 80963a9a0..751f02a1b 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -148,7 +148,7 @@ public class TopicFinder { private List<ITopic> getTopicPathInTopic(ITopic topicToFind, ITopic topic) { if (sameTopic(topicToFind, topic)) { // found it. start the list to be created recursively - List<ITopic> path = new ArrayList<ITopic>(); + List<ITopic> path = new ArrayList<>(); path.add(topic); return path; } else { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java index fc21e1dd6..b38985b3b 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -628,7 +628,7 @@ public class UrlUtil { } // locale strings as passed in command line or in preferences - final List<String> infocenterLocales= new ArrayList<String>(); + final List<String> infocenterLocales= new ArrayList<>(); // first check if locales passed as command line arguments String[] args = Platform.getCommandLineArgs(); @@ -658,7 +658,7 @@ public class UrlUtil { // format locales and collect in a set for lookup if (!infocenterLocales.isEmpty()) { - locales = new HashSet<String>(10, 0.4f); + locales = new HashSet<>(10, 0.4f); for (String locale : infocenterLocales) { if (locale.length() >= 5) { locales.add(locale.substring(0, 2).toLowerCase(Locale.ENGLISH) + "_" //$NON-NLS-1$ diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java index 395d3c498..190840be7 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -229,14 +229,14 @@ public class WorkingSetData extends RequestData { return STATE_UNCHECKED; String category = categories[index]; - Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>(); + Map<String, Set<String>> criteriaMap = new HashMap<>(); CriterionResource[] criteria = ws.getCriteria(); CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria); if(!criteriaMap.keySet().contains(category)) return STATE_UNCHECKED; Set<String> criterionValuesFromWS = criteriaMap.get(category); - Set<String> criterionValuesSet = new HashSet<String>(Arrays.asList(getCriterionValueIds(category))); + Set<String> criterionValuesSet = new HashSet<>(Arrays.asList(getCriterionValueIds(category))); if(criterionValuesFromWS.containsAll(criterionValuesSet)){ return STATE_CHECKED; }else{ @@ -255,7 +255,7 @@ public class WorkingSetData extends RequestData { return STATE_UNCHECKED; String category = categories[categoryIndex]; - Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>(); + Map<String, Set<String>> criteriaMap = new HashMap<>(); CriterionResource[] criteria = ws.getCriteria(); CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java index 185648972..f9e85749f 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -73,7 +73,7 @@ public class WorkingSetManagerData extends RequestData { if (hrefs == null) hrefs = new String[0]; - ArrayList<AdaptableHelpResource> selectedElements = new ArrayList<AdaptableHelpResource>(hrefs.length); + ArrayList<AdaptableHelpResource> selectedElements = new ArrayList<>(hrefs.length); for (String href : hrefs) { AdaptableHelpResource res = getAdaptableHelpResource(href); if (res != null) @@ -117,7 +117,7 @@ public class WorkingSetManagerData extends RequestData { if (hrefs == null) hrefs = new String[0]; - ArrayList<AdaptableHelpResource> selectedElements = new ArrayList<AdaptableHelpResource>(hrefs.length); + ArrayList<AdaptableHelpResource> selectedElements = new ArrayList<>(hrefs.length); for (String href : hrefs) { AdaptableHelpResource res = getAdaptableHelpResource(href); if (res != null) @@ -214,7 +214,7 @@ public class WorkingSetManagerData extends RequestData { if (criteria == null) criteria = new String[0]; - Map<String, Set<String>> selectedElements = new HashMap<String, Set<String>>(); + Map<String, Set<String>> selectedElements = new HashMap<>(); for (String criterion : criteria) { if(category.contains(criterion)){ List<String> allValuesInCategory = Arrays.asList(getCriterionValueIds(criterion)); @@ -223,7 +223,7 @@ public class WorkingSetManagerData extends RequestData { } Set<String> elements = selectedElements.get(criterion); if(null == elements){ - elements = new HashSet<String>(); + elements = new HashSet<>(); } elements.addAll(allValuesInCategory); selectedElements.put(criterion, elements); @@ -248,7 +248,7 @@ public class WorkingSetManagerData extends RequestData { continue; Set<String> existedElements = selectedElements.get(criterionName); if(null == existedElements){ - existedElements = new HashSet<String>(); + existedElements = new HashSet<>(); } existedElements.add(selectedValue); selectedElements.put(criterionName, existedElements); @@ -258,10 +258,10 @@ public class WorkingSetManagerData extends RequestData { } - List<CriterionResource> resources = new ArrayList<CriterionResource>(); + List<CriterionResource> resources = new ArrayList<>(); for (String key : selectedElements.keySet()) { Set<String> values = selectedElements.get(key); - CriterionResource resource = new CriterionResource(key, new ArrayList<String>(values)); + CriterionResource resource = new CriterionResource(key, new ArrayList<>(values)); resources.add(resource); } diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ParseElement.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ParseElement.java index 94f90cc88..2e72fca8b 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ParseElement.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ParseElement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. + * Copyright (c) 2011, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -21,7 +21,7 @@ import org.eclipse.help.internal.webapp.utils.JSonHelper; public class ParseElement { private Properties props; - private ArrayList<ParseElement> children = new ArrayList<ParseElement>(); + private ArrayList<ParseElement> children = new ArrayList<>(); private ParseElement parent; public ParseElement(Properties props, ParseElement parent) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ResultParser.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ResultParser.java index d4de66122..48c905c6d 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ResultParser.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/parser/ResultParser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. + * Copyright (c) 2011, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ public class ResultParser extends DefaultHandler { protected String id; protected String label; - protected ArrayList<ParseElement> items = new ArrayList<ParseElement>(); //parser populates the items arrayList withe parsed data. + protected ArrayList<ParseElement> items = new ArrayList<>(); //parser populates the items arrayList withe parsed data. public ResultParser(String label) { this(label, JSonHelper.ID); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java index d832fadcd..620b2bd2e 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. + * Copyright (c) 2011, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -185,7 +185,7 @@ public class AboutService extends AboutServlet { buf.append(XMLGenerator.xmlEscape(title)); buf.append("\""); //$NON-NLS-1$ - List<PluginDetails> plugins = new ArrayList<PluginDetails>(); + List<PluginDetails> plugins = new ArrayList<>(); Bundle[] bundles = HelpWebappPlugin.getContext().getBundles(); for (Bundle bundle : bundles) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java index 9cd4fd488..5178463ad 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/AboutServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2015 IBM Corporation and others. + * Copyright (c) 2008, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -121,7 +121,7 @@ public class AboutServlet extends HttpServlet { } buf.append("<table>"); //$NON-NLS-1$ - List<PluginDetails> plugins = new ArrayList<PluginDetails>(); + List<PluginDetails> plugins = new ArrayList<>(); Bundle[] bundles = HelpWebappPlugin.getContext().getBundles(); for (Bundle bundle : bundles) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java index c9c6819cf..53da50e11 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -108,8 +108,8 @@ public class CookieUtil { public static void deleteObsoleteCookies(HttpServletRequest request, HttpServletResponse response) { Cookie[] cookies = request.getCookies(); - HashSet<String> cookiesToKeep= new HashSet<String>(); - HashSet<String> cookiesToDelete = new HashSet<String>(); + HashSet<String> cookiesToKeep= new HashSet<>(); + HashSet<String> cookiesToDelete = new HashSet<>(); if (cookies != null) { for (Cookie cookie : cookies) { String name = cookie.getName(); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtensionServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtensionServlet.java index ab2f5015d..a2134cc6a 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtensionServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtensionServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,7 +51,7 @@ public class ExtensionServlet extends HttpServlet { req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$ if (responseByLocale == null) { - responseByLocale = new WeakHashMap<String, String>(); + responseByLocale = new WeakHashMap<>(); } String response = responseByLocale.get(locale); if (response == null) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java index a191d3395..6dc6a17b2 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2015 IBM Corporation and others. + * Copyright (c) 2008, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -38,7 +38,7 @@ public class ExtraFilters implements IFilter { } private void readFilters() { - filters = new ArrayList<PrioritizedFilter>(); + filters = new ArrayList<>(); IExtensionRegistry registry = Platform.getExtensionRegistry(); IConfigurationElement[] elements = registry .getConfigurationElementsFor(CONTENTFILTER_XP_NAME); @@ -77,7 +77,7 @@ public class ExtraFilters implements IFilter { * For JUnit testing */ public static void setFilters(PrioritizedFilter[] newFilters) { - filters = new ArrayList<PrioritizedFilter>(); + filters = new ArrayList<>(); for (PrioritizedFilter newFilter : newFilters) { filters.add(newFilter); } diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java index af4c437cb..8ab6b713f 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -105,7 +105,7 @@ public class HighlightFilter implements IFilter { */ private Collection<String> getWords(HttpServletRequest req) { // Collect words to hash set to eliminate duplcates - Collection<String> tokens = new ArrayList<String>(); + Collection<String> tokens = new ArrayList<>(); String searchWord = req.getParameter("resultof"); //$NON-NLS-1$ if (searchWord == null) { @@ -145,7 +145,7 @@ public class HighlightFilter implements IFilter { private Collection<String> encodeKeyWords(Collection<String> col) { if (col == null) return col; - Collection<String> result = new ArrayList<String>(); + Collection<String> result = new ArrayList<>(); for (String word : col) { int l = word.length(); if (l < 1) @@ -166,7 +166,7 @@ public class HighlightFilter implements IFilter { return col; // Split words into parts: before "*" and after "*" - Collection<String> resultPass1 = new ArrayList<String>(); + Collection<String> resultPass1 = new ArrayList<>(); for (String word : col) { int index; while ((index = word.indexOf("*")) >= 0) { //$NON-NLS-1$ @@ -180,7 +180,7 @@ public class HighlightFilter implements IFilter { } // Split words into parts: before "?" and after "?" - Collection<String> resultPass2 = new ArrayList<String>(); + Collection<String> resultPass2 = new ArrayList<>(); for (String word : resultPass1) { int index; while ((index = word.indexOf("?")) >= 0) { //$NON-NLS-1$ diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java index ad1714e05..1aac6c890 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -50,7 +50,7 @@ import com.ibm.icu.text.Collator; public class IndexFragmentServlet extends HttpServlet { private static final long serialVersionUID = 1L; - private static Map<String, String> locale2Response = new WeakHashMap<String, String>(); + private static Map<String, String> locale2Response = new WeakHashMap<>(); private String startParameter; private String sizeParameter; private String entryParameter; @@ -157,7 +157,7 @@ public class IndexFragmentServlet extends HttpServlet { if (entries.length == 0) { generateEmptyIndexMessage(); } else { - entryList = new ArrayList<Integer>(); + entryList = new ArrayList<>(); int nextEntry = findFirstEntry(entries); if (PREVIOUS.equals(modeParameter)) { int remaining = getPreviousEntries(nextEntry, size); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java index 2765cbd85..2774dd7c2 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -57,7 +57,7 @@ public class IndexServlet extends HttpServlet { req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$ if (responseByLocale == null) { - responseByLocale = new WeakHashMap<String, String>(); + responseByLocale = new WeakHashMap<>(); } String response = responseByLocale.get(locale); if (response == null) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java index cf8c2fb80..577ba5071 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -52,7 +52,7 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager { // Current working set , empty string means all documents private String currentWorkingSet = ""; //$NON-NLS-1$ - private SortedSet<WorkingSet> workingSets = new TreeSet<WorkingSet>(new WorkingSetComparator()); + private SortedSet<WorkingSet> workingSets = new TreeSet<>(new WorkingSetComparator()); private String locale; private AdaptableTocsArray root; @@ -213,7 +213,7 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager { continue; } String name = URLCoder.decode(nameAndCriteria[0]); - List<CriterionResource> criteriaResource = new ArrayList<CriterionResource>(); + List<CriterionResource> criteriaResource = new ArrayList<>(); for (int j = 1; j < nameAndCriteria.length; ++j) { String criterion = nameAndCriteria[j]; String[] keyAndValue = criterion.split("#", -1); //$NON-NLS-1$ @@ -421,7 +421,7 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager { if(null == allCriteriaValues){ allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(locale); } - List<String> criterionIds = new ArrayList<String>(); + List<String> criterionIds = new ArrayList<>(); if(null != allCriteriaValues){ for (String criterion : allCriteriaValues.keySet()) { if(null == criterion || 0 == criterion.length() || 0 == getCriterionValueIds(criterion).length) @@ -441,7 +441,7 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager { if(null == allCriteriaValues){ allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(locale); } - List<String> valueIds = new ArrayList<String>(); + List<String> valueIds = new ArrayList<>(); if(null != criterionName && null != allCriteriaValues) { Set<String> criterionValues = allCriteriaValues.get(criterionName); if(null != criterionValues && !criterionValues.isEmpty()) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java index 475789f29..7979eb166 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -69,7 +69,7 @@ public class InjectionFilter implements IFilter { return out; } - List<String> cssIncludes = new ArrayList<String>(); + List<String> cssIncludes = new ArrayList<>(); if (isNav) { CssUtil.addCssFiles(NAV_CSS, cssIncludes); } else { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java index 1cb0d1ccb..f7343eeb5 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2015 IBM Corporation and others. + * Copyright (c) 2009, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,7 +51,7 @@ public class PreferenceWriter { private void writePreference(String plugin) { try { IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(plugin); - Set<String> keySet = new HashSet<String>(); + Set<String> keySet = new HashSet<>(); prefs = DefaultScope.INSTANCE.getNode(plugin); keySet.addAll(Arrays.asList(prefs.keys())); String[] allKeys = keySet.toArray(new String[keySet.size()]); diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java index 7571438e2..a6f92fb09 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,7 +40,7 @@ import org.eclipse.help.internal.webapp.utils.SearchXMLGenerator; public class SearchServlet extends HttpServlet { private final class HitCollector implements ISearchHitCollector { - public Collection<SearchHit> results = new ArrayList<SearchHit>(); + public Collection<SearchHit> results = new ArrayList<>(); @Override public void addHits(List<SearchHit> hits, String wordsSearched) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java index 6fbfc7b83..66f918abf 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2015 IBM Corporation and others. + * Copyright (c) 2006, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ import org.eclipse.help.internal.webapp.data.UrlUtil; public class TocFragmentServlet extends HttpServlet { private static final long serialVersionUID = 1L; - private static Map<String, String> locale2Response = new WeakHashMap<String, String>(); + private static Map<String, String> locale2Response = new WeakHashMap<>(); private boolean isErrorSuppress; @Override diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java index 6fcc64a7e..f85722f67 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -58,12 +58,12 @@ public class TocServlet extends HttpServlet { req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$ if (clearCache){ - responseByLocale = new WeakHashMap<String, String>(); + responseByLocale = new WeakHashMap<>(); clearCache = false; } if (responseByLocale == null) { - responseByLocale = new WeakHashMap<String, String>(); + responseByLocale = new WeakHashMap<>(); } String response = responseByLocale.get(locale); if (response == null) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ValidatorServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ValidatorServlet.java index be1394c16..451195e52 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ValidatorServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ValidatorServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. + * Copyright (c) 2011, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -53,7 +53,7 @@ import org.eclipse.help.internal.webapp.utils.Utils; public class ValidatorServlet extends HttpServlet { private static final long serialVersionUID = -3783758607845176051L; - private Hashtable<String, HttpServlet> servletTable = new Hashtable<String, HttpServlet>(); + private Hashtable<String, HttpServlet> servletTable = new Hashtable<>(); protected void process(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { @@ -147,8 +147,8 @@ public class ValidatorServlet extends HttpServlet { public boolean isSecure(HttpServletRequest req,HttpServletResponseAdv resp) throws SecurityException { Enumeration<String> names = req.getParameterNames(); - List<String> values = new ArrayList<String>(); - List<String> scripts = new ArrayList<String>(); + List<String> values = new ArrayList<>(); + List<String> scripts = new ArrayList<>(); while (names.hasMoreElements()) { |