diff --git a/apisupport/apisupport.wizards/nbproject/project.properties b/apisupport/apisupport.wizards/nbproject/project.properties index 315878a030d9..9f9ea400db59 100644 --- a/apisupport/apisupport.wizards/nbproject/project.properties +++ b/apisupport/apisupport.wizards/nbproject/project.properties @@ -14,6 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -javac.source=1.6 +javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial requires.nb.javac=true diff --git a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/action/GUIRegistrationPanel.java b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/action/GUIRegistrationPanel.java index 33a540a3ba63..3d418b3c418e 100644 --- a/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/action/GUIRegistrationPanel.java +++ b/apisupport/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/action/GUIRegistrationPanel.java @@ -342,7 +342,7 @@ public void run() { private void createPositionModel(final JComboBox positionsCombo, final FileObject[] files, final LayerItemPresenter parent) { - DefaultComboBoxModel newModel = new DefaultComboBoxModel(); + DefaultComboBoxModel newModel = new DefaultComboBoxModel<>(); LayerItemPresenter previous = null; for (FileObject file : files) { if (file.getNameExt().endsWith(LayerUtil.HIDDEN)) { diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/VerifierSupport.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/VerifierSupport.java index dba8c88e0792..137ebe187309 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/VerifierSupport.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/VerifierSupport.java @@ -79,6 +79,7 @@ import org.openide.windows.Mode; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; +import org.netbeans.modules.j2ee.sun.dd.impl.verifier.Error; /** * Main TopComponent to display the output of the Sun J2EE Verifier Tool from an archive file. @@ -128,10 +129,10 @@ public class VerifierSupport extends TopComponent { NbBundle.getMessage(VerifierSupport.class,STATUS_LIT), NbBundle.getMessage(VerifierSupport.class,"Test_Description"), // NOI18N NbBundle.getMessage(VerifierSupport.class,"Result")}; // NOI18N - private Vector passResults = new Vector(); - private Vector failResults = new Vector(); - private Vector errorResults = new Vector(); - private Vector warnResults = new Vector(); + private Vector passResults = new Vector<>(); + private Vector failResults = new Vector<>(); + private Vector errorResults = new Vector<>(); + private Vector warnResults = new Vector<>(); private Vector naResults = new Vector(); private Vector notImplementedResults = new Vector(); private Vector notRunResults = new Vector(); @@ -882,7 +883,7 @@ public void saveFailResultsForDisplay(Test r){ * * @param r */ - public void saveErrorResultsForDisplay(org.netbeans.modules.j2ee.sun.dd.impl.verifier.Error r){ + public void saveErrorResultsForDisplay(Error r){ errorResults.addElement(r); } diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java index 907aeffaa93f..5ccd770fb7e6 100644 --- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java +++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java @@ -65,7 +65,7 @@ final class ProjectServerPanel extends javax.swing.JPanel implements DocumentLis private ProjectServerWizardPanel wizard; private boolean contextModified = false; - private final DefaultComboBoxModel serversModel = new DefaultComboBoxModel(); + private final DefaultComboBoxModel serversModel = new DefaultComboBoxModel<>(); private J2eeVersionWarningPanel warningPanel; private boolean sharableProject; diff --git a/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/api/VerifierSupport.java b/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/api/VerifierSupport.java index e3cefbe31b13..d96569229083 100644 --- a/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/api/VerifierSupport.java +++ b/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/api/VerifierSupport.java @@ -79,6 +79,7 @@ import org.openide.windows.Mode; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; +import org.netbeans.modules.j2ee.sun.dd.impl.verifier.Error; /** * Main TopComponent to display the output of the Sun J2EE Verifier Tool from an archive file. @@ -128,10 +129,10 @@ public class VerifierSupport extends TopComponent { NbBundle.getMessage(VerifierSupport.class,STATUS_LIT), NbBundle.getMessage(VerifierSupport.class,"Test_Description"), // NOI18N NbBundle.getMessage(VerifierSupport.class,"Result")}; // NOI18N - private Vector passResults = new Vector(); - private Vector failResults = new Vector(); - private Vector errorResults = new Vector(); - private Vector warnResults = new Vector(); + private Vector passResults = new Vector<>(); + private Vector failResults = new Vector<>(); + private Vector warnResults = new Vector<>(); + private Vector errorResults = new Vector<>(); private Vector naResults = new Vector(); private Vector notImplementedResults = new Vector(); private Vector notRunResults = new Vector(); @@ -882,7 +883,7 @@ public void saveFailResultsForDisplay(Test r){ * * @param r */ - public void saveErrorResultsForDisplay(org.netbeans.modules.j2ee.sun.dd.impl.verifier.Error r){ + public void saveErrorResultsForDisplay(Error r){ errorResults.addElement(r); } diff --git a/enterprise/web.freeform/src/org/netbeans/modules/web/freeform/ui/WebClasspathPanel.java b/enterprise/web.freeform/src/org/netbeans/modules/web/freeform/ui/WebClasspathPanel.java index 6c1ed6b7b11d..86c3d8d305c4 100644 --- a/enterprise/web.freeform/src/org/netbeans/modules/web/freeform/ui/WebClasspathPanel.java +++ b/enterprise/web.freeform/src/org/netbeans/modules/web/freeform/ui/WebClasspathPanel.java @@ -46,7 +46,7 @@ */ public class WebClasspathPanel extends javax.swing.JPanel implements HelpCtx.Provider { - private DefaultListModel listModel; + private DefaultListModel listModel; /** Original project folder (not nbproject folder) */ private File projectFolder = null; /** Freeform Project base folder */ @@ -263,9 +263,9 @@ private void moveDownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS } for (int i = 0; i < indices.length; i++) { int index = indices[i]; - Object o = listModel.remove(index); + String s = listModel.remove(index); index++; - listModel.add(index, o); + listModel.add(index, s); indices[i] = index; } classpath.setSelectedIndices(indices); @@ -279,9 +279,9 @@ private void moveUpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST: } for (int i = 0; i < indices.length; i++) { int index = indices[i]; - Object o = listModel.remove(index); + String s = listModel.remove(index); index--; - listModel.add(index, o); + listModel.add(index, s); indices[i] = index; } classpath.setSelectedIndices(indices); diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/AddFrameworkPanel.java b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/AddFrameworkPanel.java index 4c1a9ede2514..f1a5edad5017 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/AddFrameworkPanel.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/AddFrameworkPanel.java @@ -46,7 +46,7 @@ public AddFrameworkPanel(List usedFrameworks) { private void createFrameworksList(List usedFrameworks) { List frameworks = WebFrameworks.getFrameworks(); - DefaultListModel model = new DefaultListModel(); + DefaultListModel model = new DefaultListModel<>(); jListFrameworks.setModel(model); for (int i = 0; i < frameworks.size(); i++) { diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/wizards/PanelSupportedFrameworksVisual.java b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/wizards/PanelSupportedFrameworksVisual.java index 45cba630dc91..582649c41cbd 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/wizards/PanelSupportedFrameworksVisual.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/wizards/PanelSupportedFrameworksVisual.java @@ -462,10 +462,10 @@ public void setBooleanRenderer(TableCellRenderer booleanRenderer) { * Implements a TableModel. */ public static final class FrameworksTableModel extends AbstractTableModel { - private DefaultListModel model; + private DefaultListModel model; public FrameworksTableModel() { - model = new DefaultListModel(); + model = new DefaultListModel<>(); } public int getColumnCount() { diff --git a/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddActionPanel.java b/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddActionPanel.java index 1a8004ba9ac3..b3a8f4437146 100644 --- a/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddActionPanel.java +++ b/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddActionPanel.java @@ -46,7 +46,7 @@ public AddActionPanel(StrutsConfigDataObject dObject) { config=dObject; initComponents(); List actions = StrutsConfigUtilities.getAllActionsInModule(dObject); - DefaultComboBoxModel model = (DefaultComboBoxModel)CBInputAction.getModel(); + DefaultComboBoxModel model = (DefaultComboBoxModel)CBInputAction.getModel(); Iterator iter = actions.iterator(); while (iter.hasNext()) model.addElement(((Action)iter.next()).getAttributeValue("path")); //NOI18N diff --git a/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddForwardDialogPanel.java b/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddForwardDialogPanel.java index 1af013119086..23067e95fd89 100644 --- a/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddForwardDialogPanel.java +++ b/enterprise/web.struts/src/org/netbeans/modules/web/struts/dialogs/AddForwardDialogPanel.java @@ -41,8 +41,8 @@ public AddForwardDialogPanel(StrutsConfigDataObject config, String targetActionP this.config=config; initComponents(); List actions = StrutsConfigUtilities.getAllActionsInModule(config); - DefaultComboBoxModel model = (DefaultComboBoxModel)jComboBoxFwdAction.getModel(); - DefaultComboBoxModel model1 = (DefaultComboBoxModel)jComboBoxLocationAction.getModel(); + DefaultComboBoxModel model = (DefaultComboBoxModel)jComboBoxFwdAction.getModel(); + DefaultComboBoxModel model1 = (DefaultComboBoxModel)jComboBoxLocationAction.getModel(); Iterator iter = actions.iterator(); while (iter.hasNext()) { String actionPath=((Action)iter.next()).getAttributeValue("path"); //NOI18N diff --git a/ide/api.debugger/src/org/netbeans/api/debugger/DebuggerManager.java b/ide/api.debugger/src/org/netbeans/api/debugger/DebuggerManager.java index cd536e6dbcbb..435483ac433b 100644 --- a/ide/api.debugger/src/org/netbeans/api/debugger/DebuggerManager.java +++ b/ide/api.debugger/src/org/netbeans/api/debugger/DebuggerManager.java @@ -163,7 +163,7 @@ public final class DebuggerManager implements ContextProvider { private final Vector breakpoints = new Vector (); private boolean breakpointsInitializing = false; private boolean breakpointsInitialized = false; - private final Vector watches = new Vector (); + private final Vector watches = new Vector<>(); private boolean watchesInitialized = false; private ThreadLocal watchesInitializing = new ThreadLocal(); private SessionListener sessionListener = new SessionListener (); @@ -706,7 +706,7 @@ public void reorderWatches(final int[] permutation) throws IllegalArgumentExcept throw new IllegalArgumentException("Permutation of length "+permutation.length+", but have "+watches.size()+" watches."); } checkPermutation(permutation); - Vector v = (Vector) watches.clone (); + Vector v = (Vector)watches.clone(); for (int i = 0; i < v.size(); i++) { watches.set(permutation[i], v.get(i)); } diff --git a/ide/css.editor/src/org/netbeans/modules/css/editor/ui/CssRuleCreateActionDialog.java b/ide/css.editor/src/org/netbeans/modules/css/editor/ui/CssRuleCreateActionDialog.java index ad62b01763ee..da144e663221 100644 --- a/ide/css.editor/src/org/netbeans/modules/css/editor/ui/CssRuleCreateActionDialog.java +++ b/ide/css.editor/src/org/netbeans/modules/css/editor/ui/CssRuleCreateActionDialog.java @@ -63,7 +63,7 @@ public CssRuleCreateActionDialog() { String[] htmlTags = HtmlTags.getTags(); // Optional prefix - DefaultComboBoxModel htmlTagsModel1 = new DefaultComboBoxModel(); + DefaultComboBoxModel htmlTagsModel1 = new DefaultComboBoxModel<>(); htmlTagsModel1.addElement(NONE); htmlTagsModel1.addElement("a:link"); htmlTagsModel1.addElement("a:visited"); diff --git a/ide/languages/nbproject/project.properties b/ide/languages/nbproject/project.properties index 4bb07f555b7d..693e39798df3 100644 --- a/ide/languages/nbproject/project.properties +++ b/ide/languages/nbproject/project.properties @@ -17,7 +17,7 @@ build.compiler.deprecation=false is.autoload=true javac.compilerargs=-Xlint:unchecked -javac.source=1.6 +javac.source=1.8 javadoc.arch=${basedir}/arch.xml spec.version.base=1.128.0 diff --git a/ide/languages/src/org/netbeans/modules/languages/dataobject/GLFFilesCustomEditor.java b/ide/languages/src/org/netbeans/modules/languages/dataobject/GLFFilesCustomEditor.java index efe756270be1..9a2d6255a5cc 100644 --- a/ide/languages/src/org/netbeans/modules/languages/dataobject/GLFFilesCustomEditor.java +++ b/ide/languages/src/org/netbeans/modules/languages/dataobject/GLFFilesCustomEditor.java @@ -46,7 +46,7 @@ public GLFFilesCustomEditor () { initComponents (); List mimeTypes = getSupportedMimeTypes (); Collections.sort (mimeTypes); - DefaultListModel model = new DefaultListModel (); + DefaultListModel model = new DefaultListModel<>(); Iterator it = mimeTypes.iterator (); while (it.hasNext ()) { String name = (String) it.next (); diff --git a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/log/SearchHistoryPanel.java b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/log/SearchHistoryPanel.java index c39698c5669f..435c7c59c3ec 100644 --- a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/log/SearchHistoryPanel.java +++ b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/log/SearchHistoryPanel.java @@ -794,7 +794,7 @@ Collection getSearchHighlights () { } private void initializeFilter () { - DefaultComboBoxModel filterModel = new DefaultComboBoxModel(); + DefaultComboBoxModel filterModel = new DefaultComboBoxModel<>(); filterModel.addElement(FilterKind.ALL); filterModel.addElement(FilterKind.ID); filterModel.addElement(FilterKind.MESSAGE); diff --git a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/repository/ChangesetPickerPanel.java b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/repository/ChangesetPickerPanel.java index 8523d1f6d3e2..32085fcbcebd 100644 --- a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/repository/ChangesetPickerPanel.java +++ b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/repository/ChangesetPickerPanel.java @@ -445,7 +445,7 @@ private class InitialLoadingProgressSupport extends HgProgressSupport { @Override public void perform () { try { - final DefaultListModel targetsModel = new DefaultListModel(); + final DefaultListModel targetsModel = new DefaultListModel<>(); final HgLogMessage displayedRevision = getDisplayedRevision(); if (displayedRevision == null) { if (acceptSelection(NO_REVISION)) { diff --git a/ide/options.editor/src/org/netbeans/modules/options/editor/FolderBasedOptionPanel.java b/ide/options.editor/src/org/netbeans/modules/options/editor/FolderBasedOptionPanel.java index 2e4f27ec8574..825ae907af53 100644 --- a/ide/options.editor/src/org/netbeans/modules/options/editor/FolderBasedOptionPanel.java +++ b/ide/options.editor/src/org/netbeans/modules/options/editor/FolderBasedOptionPanel.java @@ -76,7 +76,7 @@ public Component getListCellRendererComponent(JList list, Object value, int inde } void update () { - DefaultComboBoxModel model = new DefaultComboBoxModel(); + DefaultComboBoxModel model = new DefaultComboBoxModel<>(); for (String mimeType : controller.getMimeTypes()) { model.addElement(mimeType); } diff --git a/ide/options.editor/src/org/netbeans/modules/options/indentation/FormattingPanel.java b/ide/options.editor/src/org/netbeans/modules/options/indentation/FormattingPanel.java index 4c8e45ec9855..83ea66642e7f 100644 --- a/ide/options.editor/src/org/netbeans/modules/options/indentation/FormattingPanel.java +++ b/ide/options.editor/src/org/netbeans/modules/options/indentation/FormattingPanel.java @@ -108,7 +108,7 @@ public void setSelector(CustomizerSelector selector) { if (this.selector != null) { // Languages combobox model - DefaultComboBoxModel model = new DefaultComboBoxModel(); + DefaultComboBoxModel model = new DefaultComboBoxModel<>(); ArrayList mimeTypes = new ArrayList(); mimeTypes.addAll(selector.getMimeTypes()); Collections.sort(mimeTypes, new LanguagesComparator()); @@ -142,7 +142,7 @@ public void setSelector(CustomizerSelector selector) { public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName() == null || CustomizerSelector.PROP_MIMETYPE.equals(evt.getPropertyName())) { - DefaultComboBoxModel model = new DefaultComboBoxModel(); + DefaultComboBoxModel model = new DefaultComboBoxModel(); List nue = selector.getCustomizers(selector.getSelectedMimeType()); int preSelectIndex = 0; int idx = 0; diff --git a/ide/project.ant.ui/src/org/netbeans/spi/project/support/ant/ui/LicenseHeadersPanel.java b/ide/project.ant.ui/src/org/netbeans/spi/project/support/ant/ui/LicenseHeadersPanel.java index c4166096ab4b..ee5edd9c4b1d 100644 --- a/ide/project.ant.ui/src/org/netbeans/spi/project/support/ant/ui/LicenseHeadersPanel.java +++ b/ide/project.ant.ui/src/org/netbeans/spi/project/support/ant/ui/LicenseHeadersPanel.java @@ -328,7 +328,7 @@ private void btnProjectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private void loadGlobalLicenses() { FileObject root = FileUtil.getConfigFile("Templates/Licenses"); - DefaultComboBoxModel model = new DefaultComboBoxModel(); + DefaultComboBoxModel model = new DefaultComboBoxModel<>(); for (FileObject fo : root.getChildren()) { if (fo.getAttribute("template") == null) { continue; diff --git a/ide/projectui/src/org/netbeans/modules/project/ui/ExitDialog.java b/ide/projectui/src/org/netbeans/modules/project/ui/ExitDialog.java index ca1039c65759..1c2c4e4ac861 100644 --- a/ide/projectui/src/org/netbeans/modules/project/ui/ExitDialog.java +++ b/ide/projectui/src/org/netbeans/modules/project/ui/ExitDialog.java @@ -67,7 +67,7 @@ final public class ExitDialog extends JPanel implements ActionListener { private static boolean result = false; JList list; - DefaultListModel listModel; + DefaultListModel listModel; /** Constructs new dlg for unsaved files in filesystems marked * for unmount. @@ -75,7 +75,7 @@ final public class ExitDialog extends JPanel implements ActionListener { private ExitDialog (Set openedFiles) { setLayout (new BorderLayout ()); - listModel = new DefaultListModel(); + listModel = new DefaultListModel<>(); Set set = getModifiedFiles (openedFiles); if (!set.isEmpty ()) { diff --git a/ide/spellchecker/nbproject/project.properties b/ide/spellchecker/nbproject/project.properties index 5f0362c51185..74603d45f361 100644 --- a/ide/spellchecker/nbproject/project.properties +++ b/ide/spellchecker/nbproject/project.properties @@ -17,7 +17,7 @@ # under the License. # javac.compilerargs=-Xlint:unchecked -javac.source=1.6 +javac.source=1.8 nbm.homepage=http://spellchecker.netbeans.org nbm.module.author=Jan Lahoda spec.version.base=1.42.0 diff --git a/ide/spellchecker/src/org/netbeans/modules/spellchecker/options/SpellcheckerOptionsPanel.java b/ide/spellchecker/src/org/netbeans/modules/spellchecker/options/SpellcheckerOptionsPanel.java index af1d292582ed..f744a128d988 100644 --- a/ide/spellchecker/src/org/netbeans/modules/spellchecker/options/SpellcheckerOptionsPanel.java +++ b/ide/spellchecker/src/org/netbeans/modules/spellchecker/options/SpellcheckerOptionsPanel.java @@ -516,7 +516,7 @@ private void defaultLocaleItemStateChanged(java.awt.event.ItemEvent evt) {//GEN- // End of variables declaration//GEN-END:variables private ListModel getInstalledDictionariesModel() { - DefaultListModel dlm = new DefaultListModel(); + DefaultListModel dlm = new DefaultListModel<>(); for (Locale l : DictionaryProviderImpl.getInstalledDictionariesLocales()) { dlm.addElement(l); diff --git a/ide/subversion/src/org/netbeans/modules/subversion/ui/copy/BranchPicker.java b/ide/subversion/src/org/netbeans/modules/subversion/ui/copy/BranchPicker.java index 5c64b65c0203..713ad62b8998 100644 --- a/ide/subversion/src/org/netbeans/modules/subversion/ui/copy/BranchPicker.java +++ b/ide/subversion/src/org/netbeans/modules/subversion/ui/copy/BranchPicker.java @@ -109,7 +109,7 @@ String getSelectedPath () { } private void initializeItems () { - DefaultListModel model = new DefaultListModel(); + DefaultListModel model = new DefaultListModel<>(); model.addElement(ITEM_BRANCHES); model.addElement(ITEM_LOADING); model.addElement(ITEM_SEP); @@ -141,7 +141,7 @@ protected void perform () { @Override public void run () { - DefaultListModel model = new DefaultListModel(); + DefaultListModel model = new DefaultListModel<>(); model.addElement(ITEM_BRANCHES); for (ISVNDirEntry e : entries.get(PREFIX_BRANCHES)) { model.addElement(branchesFolderPrefix + PREFIX_BRANCHES + "/" + e.getPath()); //NOI18N diff --git a/ide/tasklist.ui/nbproject/project.properties b/ide/tasklist.ui/nbproject/project.properties index 6957455fa9f3..b483e79a3bc7 100644 --- a/ide/tasklist.ui/nbproject/project.properties +++ b/ide/tasklist.ui/nbproject/project.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. javac.compilerargs=-Xlint:unchecked -javac.source=1.6 +javac.source=1.8 spec.version.base=1.38.0 test.config.stableBTD.includes=**/*Test.class diff --git a/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/AttachmentPanel.java b/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/AttachmentPanel.java index 1285bcb256a8..3c79c727cfc2 100644 --- a/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/AttachmentPanel.java +++ b/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/AttachmentPanel.java @@ -51,7 +51,7 @@ public AttachmentPanel(AttachmentsPanel.NBBugzillaCallback nbCallback) { } private void initFileTypeCombo() { - DefaultComboBoxModel model = new DefaultComboBoxModel(); + DefaultComboBoxModel model = new DefaultComboBoxModel<>(); ResourceBundle bundle = NbBundle .getBundle(AttachmentPanel.class); model.addElement(new FileType(null, bundle.getString("AttachmentPanel.fileType.automatic"))); // NOI18N model.addElement(new FileType("text/plain", bundle.getString("AttachmentPanel.fileType.textPlain"))); // NOI18N diff --git a/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/ListValuePicker.java b/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/ListValuePicker.java index 89094d94d7e7..8a837e48592f 100644 --- a/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/ListValuePicker.java +++ b/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/ListValuePicker.java @@ -69,7 +69,7 @@ private ListValuePicker(String label, String message, ListValue[] knownValues, S org.openide.awt.Mnemonics.setLocalizedText(valuesLabel, label); valuesList.setCellRenderer(new ListValueRenderer()); - DefaultListModel model = new DefaultListModel(); + DefaultListModel model = new DefaultListModel<>(); for (ListValue lvalue : knownValues) { model.addElement(lvalue); } diff --git a/ide/versioning.ui/nbproject/project.properties b/ide/versioning.ui/nbproject/project.properties index a2efb72063b8..5b124d5267f4 100644 --- a/ide/versioning.ui/nbproject/project.properties +++ b/ide/versioning.ui/nbproject/project.properties @@ -17,6 +17,6 @@ is.eager=true javac.compilerargs=-Xlint:unchecked -javac.source=1.6 +javac.source=1.8 spec.version.base=1.29.0 diff --git a/ide/versioning.ui/src/org/netbeans/modules/versioning/ui/options/GeneralOptionsPanel.java b/ide/versioning.ui/src/org/netbeans/modules/versioning/ui/options/GeneralOptionsPanel.java index 48bd2db2c907..483e22a2500c 100644 --- a/ide/versioning.ui/src/org/netbeans/modules/versioning/ui/options/GeneralOptionsPanel.java +++ b/ide/versioning.ui/src/org/netbeans/modules/versioning/ui/options/GeneralOptionsPanel.java @@ -91,7 +91,7 @@ Collection getKeywords () { private void fillDisconnectedFolders () { if (cmbVersioningSystems.getSelectedItem() instanceof VersioningSystem) { String[] disconnected = Utils.getDisconnectedRoots(((VersioningSystem) cmbVersioningSystems.getSelectedItem())); - DefaultListModel model = new DefaultListModel(); + DefaultListModel model = new DefaultListModel<>(); for (String f : disconnected) { model.addElement(f); } diff --git a/ide/web.browser.api/src/org/netbeans/modules/web/browser/ui/DeveloperToolbar.java b/ide/web.browser.api/src/org/netbeans/modules/web/browser/ui/DeveloperToolbar.java index bda704d15313..1bff5a726eef 100644 --- a/ide/web.browser.api/src/org/netbeans/modules/web/browser/ui/DeveloperToolbar.java +++ b/ide/web.browser.api/src/org/netbeans/modules/web/browser/ui/DeveloperToolbar.java @@ -144,7 +144,7 @@ public void intialize( Lookup context ) { panel.add( bar ); //ZOOM combo box - DefaultComboBoxModel zoomModel = new DefaultComboBoxModel(); + DefaultComboBoxModel zoomModel = new DefaultComboBoxModel<>(); zoomModel.addElement( "200%" ); //NOI18N zoomModel.addElement( "150%" ); //NOI18N zoomModel.addElement( "100%" ); //NOI18N diff --git a/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/fixes/CreateRelationshipPanel.java b/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/fixes/CreateRelationshipPanel.java index a13a44cc0ff3..3eb7f79ca88e 100644 --- a/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/fixes/CreateRelationshipPanel.java +++ b/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/fixes/CreateRelationshipPanel.java @@ -41,7 +41,7 @@ class CreateRelationshipPanel extends javax.swing.JPanel { public enum NameStatus {VALID, ILLEGAL_JAVA_ID, ILLEGAL_SQL_KEYWORD, DUPLICATE}; public enum AvailableSelection {INVERSE_ONLY, OWNING_ONLY, BOTH}; private Collection availableFields; - private DefaultComboBoxModel mdlAvailableFields = new DefaultComboBoxModel(); + private DefaultComboBoxModel mdlAvailableFields = new DefaultComboBoxModel<>(); private FieldNameValidator nameValidator = null; private Border brdrBlack = BorderFactory.createLineBorder(Color.BLACK); private DialogDescriptor dlgDescriptor = null; diff --git a/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/ClasspathPanel.java b/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/ClasspathPanel.java index ad26e5c64c8b..a035acbfd96d 100644 --- a/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/ClasspathPanel.java +++ b/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/ClasspathPanel.java @@ -67,7 +67,7 @@ public class ClasspathPanel extends javax.swing.JPanel implements HelpCtx.Provid private static final Logger LOG = Logger.getLogger(ClasspathPanel.class.getName()); - private DefaultListModel listModel; + private DefaultListModel listModel; private File lastChosenFile = null; private boolean isSeparateClasspath = true; private List compUnitsKeys; @@ -101,7 +101,7 @@ private void basicInit() { initComponents(); jTextArea1.setBackground(getBackground()); jTextArea1.setDisabledTextColor(jLabel2.getForeground()); - listModel = new DefaultListModel(); + listModel = new DefaultListModel<>(); classpath.setModel(listModel); } @@ -499,9 +499,9 @@ private void moveDownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS } for (int i = 0; i < indices.length; i++) { int index = indices[i]; - Object o = listModel.remove(index); + String s = listModel.remove(index); index++; - listModel.add(index, o); + listModel.add(index, s); indices[i] = index; } classpath.setSelectedIndices(indices); @@ -516,9 +516,9 @@ private void moveUpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST: } for (int i = 0; i < indices.length; i++) { int index = indices[i]; - Object o = listModel.remove(index); + String s = listModel.remove(index); index--; - listModel.add(index, o); + listModel.add(index, s); indices[i] = index; } classpath.setSelectedIndices(indices); diff --git a/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/OutputPanel.java b/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/OutputPanel.java index d60c41da1697..62bb66eaee13 100644 --- a/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/OutputPanel.java +++ b/java/java.freeform/src/org/netbeans/modules/java/freeform/ui/OutputPanel.java @@ -41,7 +41,7 @@ */ public class OutputPanel extends javax.swing.JPanel implements HelpCtx.Provider { - private DefaultListModel listModel; + private DefaultListModel listModel; private File lastChosenFile = null; private boolean isSeparateClasspath = true; private List compUnitsKeys; @@ -51,7 +51,7 @@ public class OutputPanel extends javax.swing.JPanel implements HelpCtx.Provider public OutputPanel() { initComponents(); jTextArea1.setBackground(getBackground()); - listModel = new DefaultListModel(); + listModel = new DefaultListModel<>(); output.setModel(listModel); // XXX: for now only single selection output.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); diff --git a/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanelLogic.java b/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanelLogic.java index bcc2e4e680d8..67ee77999157 100644 --- a/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanelLogic.java +++ b/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanelLogic.java @@ -115,8 +115,8 @@ public class HintsPanelLogic implements MouseListener, KeyListener, TreeSelectio private JCheckBox tasklistCheckBox; private JPanel customizerPanel; private JEditorPane descriptionTextArea; - private DefaultComboBoxModel defModel = new DefaultComboBoxModel(); - private DefaultComboBoxModel depScanningModel = new DefaultComboBoxModel(); + private DefaultComboBoxModel defModel = new DefaultComboBoxModel<>(); + private DefaultComboBoxModel depScanningModel = new DefaultComboBoxModel<>(); private String defLabel = NbBundle.getMessage(HintsPanel.class, "CTL_ShowAs_Label"); //NOI18N private String depScanningLabel = NbBundle.getMessage(HintsPanel.class, "CTL_Scope_Label"); //NOI18N private String depScanningDescription = NbBundle.getMessage(HintsPanel.class, "CTL_Scope_Desc"); //NOI18N diff --git a/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java b/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java index 54f57195958e..497573b07963 100644 --- a/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java +++ b/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java @@ -103,9 +103,9 @@ public final class IndexSearch /* Holds split position if the quick view is disabled */ private int oldSplit = DocumentationSettings.getDefault().getIdxSearchSplit(); - private final DefaultListModel waitModel = new DefaultListModel(); - private final DefaultListModel initModel = new DefaultListModel(); - private final DefaultListModel notModel = new DefaultListModel(); + private final DefaultListModel waitModel = new DefaultListModel<>(); + private final DefaultListModel initModel = new DefaultListModel<>(); + private final DefaultListModel notModel = new DefaultListModel<>(); private boolean setDividerLocation; /** Initializes the Form */ diff --git a/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewLicensePanel.java b/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewLicensePanel.java index b2fc2fa5dec8..49c802da8bcd 100644 --- a/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewLicensePanel.java +++ b/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewLicensePanel.java @@ -164,7 +164,7 @@ public void addNotify() { super.addNotify(); assert nls != null : " The notificationLineSupport was not attached to the panel."; //NOI18N - DefaultListModel dlm = new DefaultListModel(); + DefaultListModel dlm = new DefaultListModel<>(); FileObject root = FileUtil.getConfigFile("Templates/Licenses"); if (root != null) { for (FileObject lic : root.getChildren()) { diff --git a/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java b/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java index 1421f64f358d..965b252c6578 100644 --- a/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java +++ b/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java @@ -68,7 +68,7 @@ public class NewMirrorPanel extends javax.swing.JPanel { ALL_BUT_FOO, LIST }; - private DefaultComboBoxModel urlmodel; + private DefaultComboBoxModel urlmodel; public NewMirrorPanel(SettingsModel model) { diff --git a/java/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java b/java/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java index 0bdc7a89edcc..e31eac9cae44 100644 --- a/java/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java +++ b/java/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java @@ -254,7 +254,7 @@ public Component getListCellRendererComponent(JList list, Object value, int inde return super.getListCellRendererComponent(list, msg, index, isSelected, cellHasFocus); } }); - DefaultComboBoxModel mdl = new DefaultComboBoxModel(); + DefaultComboBoxModel> mdl = new DefaultComboBoxModel<>(); mdl.addElement(Arrays.asList(new String[0])); mdl.addElement(Arrays.asList(new String[] { Artifact.SCOPE_PROVIDED, diff --git a/platform/api.progress/src/org/netbeans/modules/progress/spi/TaskModel.java b/platform/api.progress/src/org/netbeans/modules/progress/spi/TaskModel.java index 8dce0b910b6b..ec8a3f5b332c 100644 --- a/platform/api.progress/src/org/netbeans/modules/progress/spi/TaskModel.java +++ b/platform/api.progress/src/org/netbeans/modules/progress/spi/TaskModel.java @@ -38,7 +38,7 @@ */ public final class TaskModel { private DefaultListSelectionModel selectionModel; - private final DefaultListModel model; + private final DefaultListModel model; private InternalHandle explicit; private final LinkedHashSet dataListeners; private final LinkedHashSet selectionListeners; @@ -46,7 +46,7 @@ public final class TaskModel { TaskModel(Executor eventExecutor) { selectionModel = new DefaultListSelectionModel(); - model = new DefaultListModel(); + model = new DefaultListModel<>(); dataListeners = new LinkedHashSet(); selectionListeners = new LinkedHashSet(); TaskListener list = new TaskListener(); diff --git a/platform/core.execution/nbproject/project.properties b/platform/core.execution/nbproject/project.properties index fbd208cc5b47..c47f4d720f37 100644 --- a/platform/core.execution/nbproject/project.properties +++ b/platform/core.execution/nbproject/project.properties @@ -17,6 +17,6 @@ is.autoload=true javac.compilerargs=-Xlint:unchecked -javac.source=1.6 +javac.source=1.8 test.config.stableBTD.includes=**/*Test.class diff --git a/platform/core.execution/src/org/netbeans/core/execution/beaninfo/editors/NbClassPathCustomEditor.java b/platform/core.execution/src/org/netbeans/core/execution/beaninfo/editors/NbClassPathCustomEditor.java index 6975df42ba21..b0f1077bfbd7 100644 --- a/platform/core.execution/src/org/netbeans/core/execution/beaninfo/editors/NbClassPathCustomEditor.java +++ b/platform/core.execution/src/org/netbeans/core/execution/beaninfo/editors/NbClassPathCustomEditor.java @@ -47,7 +47,7 @@ class NbClassPathCustomEditor extends javax.swing.JPanel { /** Property editor associated with. */ private PropertyEditor editor; /** Model of list of class path items. */ - private DefaultListModel listModel = new DefaultListModel(); + private DefaultListModel listModel = new DefaultListModel<>(); private boolean editable = true; diff --git a/platform/o.n.core/src/org/netbeans/core/ExitDialog.java b/platform/o.n.core/src/org/netbeans/core/ExitDialog.java index 9081c423c7fd..63fd562cfb8e 100644 --- a/platform/o.n.core/src/org/netbeans/core/ExitDialog.java +++ b/platform/o.n.core/src/org/netbeans/core/ExitDialog.java @@ -64,7 +64,7 @@ public class ExitDialog extends JPanel implements java.awt.event.ActionListener private static boolean result = false; JList list; - DefaultListModel listModel; + DefaultListModel listModel; static final long serialVersionUID = 6039058107124767512L; @@ -72,7 +72,7 @@ public class ExitDialog extends JPanel implements java.awt.event.ActionListener public ExitDialog () { setLayout (new java.awt.BorderLayout ()); - listModel = new DefaultListModel(); + listModel = new DefaultListModel<>(); for (Savable obj : Savable.REGISTRY.lookupAll(Savable.class)) { listModel.addElement(obj); } diff --git a/platform/o.n.swing.outline/src/org/netbeans/swing/etable/ETable.java b/platform/o.n.swing.outline/src/org/netbeans/swing/etable/ETable.java index e0208cf57522..132da249e689 100644 --- a/platform/o.n.swing.outline/src/org/netbeans/swing/etable/ETable.java +++ b/platform/o.n.swing.outline/src/org/netbeans/swing/etable/ETable.java @@ -2363,8 +2363,8 @@ private void prepareSearchPanel() { } } - private ComboBoxModel getSearchComboModel() { - DefaultComboBoxModel result = new DefaultComboBoxModel(); + private ComboBoxModel getSearchComboModel() { + DefaultComboBoxModel result = new DefaultComboBoxModel(); for (Enumeration en = getColumnModel().getColumns(); en.hasMoreElements(); ) { TableColumn column = en.nextElement(); if (column instanceof ETableColumn) { diff --git a/platform/openide.awt/src/org/openide/awt/ColorComboBox.java b/platform/openide.awt/src/org/openide/awt/ColorComboBox.java index fd3b1b373eac..f495ca931c0f 100644 --- a/platform/openide.awt/src/org/openide/awt/ColorComboBox.java +++ b/platform/openide.awt/src/org/openide/awt/ColorComboBox.java @@ -173,8 +173,8 @@ private void pickCustomColor() { } } - private static DefaultComboBoxModel createModel( Color[] colors, String[] names, boolean allowCustomColors ) { - DefaultComboBoxModel model = new DefaultComboBoxModel(); + private static DefaultComboBoxModel createModel( Color[] colors, String[] names, boolean allowCustomColors ) { + DefaultComboBoxModel model = new DefaultComboBoxModel<>(); for( int i=0; i model = new DefaultComboBoxModel<>(); for (String version: DataProviderImpl.getInstance().getAvailableVersions()) { model.addElement(version); } diff --git a/webcommon/web.javascript.debugger/src/org/netbeans/modules/web/javascript/debugger/breakpoints/ui/EventsBreakpointCustomizer.java b/webcommon/web.javascript.debugger/src/org/netbeans/modules/web/javascript/debugger/breakpoints/ui/EventsBreakpointCustomizer.java index 6882f7ed4476..8dfa4c66631c 100644 --- a/webcommon/web.javascript.debugger/src/org/netbeans/modules/web/javascript/debugger/breakpoints/ui/EventsBreakpointCustomizer.java +++ b/webcommon/web.javascript.debugger/src/org/netbeans/modules/web/javascript/debugger/breakpoints/ui/EventsBreakpointCustomizer.java @@ -96,7 +96,7 @@ private void initLists() { private void fillCategoryEvents() { Set allEventCategories = EventsBreakpoint.getAllEventCategories(); - DefaultListModel categoryModel = new DefaultListModel(); + DefaultListModel categoryModel = new DefaultListModel<>(); for (String category : allEventCategories) { categoryModel.addElement(category); } @@ -104,7 +104,7 @@ private void fillCategoryEvents() { } private void fillEvents(String category) { - DefaultListModel eventsModel = new DefaultListModel(); + DefaultListModel eventsModel = new DefaultListModel<>(); Set allEvents = EventsBreakpoint.getAllEvents(category); for (String event : allEvents) { eventsModel.addElement(event);