You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2019/12/06 06:59:07 UTC

[netbeans] branch master updated: [NETBEANS-3509] Fixed compiler warnings concerning rawtypes AbstractList

This is an automated email from the ASF dual-hosted git repository.

jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new b394774  [NETBEANS-3509] Fixed compiler warnings concerning rawtypes AbstractList
     new e06e600  Merge pull request #1717 from mklaehn/NETBEANS-3509
b394774 is described below

commit b3947747df7437cf402efaf0cb5d060a6e023482
Author: Martin Klähn <mk...@apache.org>
AuthorDate: Sun Dec 1 01:05:40 2019 +0100

    [NETBEANS-3509] Fixed compiler warnings concerning rawtypes AbstractList
---
 ide/xml.multiview/nbproject/project.properties                     | 2 +-
 .../org/netbeans/modules/xml/multiview/ui/SectionContainer.java    | 7 ++-----
 .../src/org/netbeans/modules/xml/multiview/ui/SectionView.java     | 4 ++--
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/ide/xml.multiview/nbproject/project.properties b/ide/xml.multiview/nbproject/project.properties
index da3d7d1..ce8f3db 100644
--- a/ide/xml.multiview/nbproject/project.properties
+++ b/ide/xml.multiview/nbproject/project.properties
@@ -16,7 +16,7 @@
 # under the License.
 
 javac.compilerargs=-Xlint -Xlint:-serial
-javac.source=1.6
+javac.source=1.8
 javadoc.arch=${basedir}/arch.xml
 spec.version.base=1.45.0
 is.autoload=true
diff --git a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionContainer.java b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionContainer.java
index b528008..bc9d837 100644
--- a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionContainer.java
+++ b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionContainer.java
@@ -39,9 +39,7 @@ public class SectionContainer extends javax.swing.JPanel implements NodeSectionP
 
     //private HashMap map = new HashMap();
     //private JScrollPane scrollPane;
-    private Node activeNode=null;
     private SectionView sectionView;
-    private String title;
     private Node root;
     private boolean active;
     private int sectionCount=0;
@@ -66,7 +64,6 @@ public class SectionContainer extends javax.swing.JPanel implements NodeSectionP
         fillerEnd.setForeground(SectionVisualTheme.getFoldLineColor());
         Mnemonics.setLocalizedText(titleButton, title);
         titleButton.setToolTipText(titleButton.getText());
-        this.title=titleButton.getText();
         titleButton.addMouseListener(new org.openide.awt.MouseUtils.PopupMouseAdapter() {
             protected void showPopup(java.awt.event.MouseEvent e) {
                 JPopupMenu popup = getNode().getContextMenu();
@@ -174,7 +171,7 @@ public class SectionContainer extends javax.swing.JPanel implements NodeSectionP
         
         // the rest components have to be moved up
         java.awt.Component[] components = contentPanel.getComponents();
-        java.util.AbstractList removedPanels = new java.util.ArrayList(); 
+        java.util.List<NodeSectionPanel> removedPanels = new java.util.ArrayList<>();
         for (int i=0;i<components.length;i++) {
             if (components[i] instanceof NodeSectionPanel) {
                 NodeSectionPanel pan = (NodeSectionPanel)components[i];
@@ -187,7 +184,7 @@ public class SectionContainer extends javax.swing.JPanel implements NodeSectionP
             }
         }
         for (int i=0;i<removedPanels.size();i++) {
-            NodeSectionPanel pan = (NodeSectionPanel)removedPanels.get(i);
+            NodeSectionPanel pan = removedPanels.get(i);
             java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
             gridBagConstraints.gridx = 0;
             gridBagConstraints.gridy = pan.getIndex();
diff --git a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionView.java b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionView.java
index 7555f17..caa1074 100644
--- a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionView.java
+++ b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/SectionView.java
@@ -203,7 +203,7 @@ public class SectionView extends PanelView implements SectionFocusCookie, Contai
         
         // the rest components have to be moved up
         java.awt.Component[] components = scrollPanel.getComponents();
-        java.util.AbstractList removedPanels = new java.util.ArrayList();
+        java.util.List<NodeSectionPanel> removedPanels = new java.util.ArrayList<>();
         for (int i=0;i<components.length;i++) {
             if (components[i] instanceof NodeSectionPanel) {
                 NodeSectionPanel pan = (NodeSectionPanel)components[i];
@@ -216,7 +216,7 @@ public class SectionView extends PanelView implements SectionFocusCookie, Contai
             }
         }
         for (int i=0;i<removedPanels.size();i++) {
-            NodeSectionPanel pan = (NodeSectionPanel)removedPanels.get(i);
+            NodeSectionPanel pan = removedPanels.get(i);
             java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
             gridBagConstraints.gridx = 0;
             gridBagConstraints.gridy = pan.getIndex();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists