[hg] main-silver: fixing warning hints

  • From: Jan Peska < >
  • To:
  • Subject: [hg] main-silver: fixing warning hints
  • Date: Tue, 07 May 2013 18:45:44 -0700

changeset 191476336353 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/191476336353
description:
        fixing warning hints

diffstat:

 bugtracking/src/org/netbeans/modules/bugtracking/tasks/Category.java         
     |   9 ++++++
 
bugtracking/src/org/netbeans/modules/bugtracking/tasks/DashboardTopComponent.java
 |  13 +++++----
 2 files changed, 16 insertions(+), 6 deletions(-)

diffs (73 lines):

diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/tasks/Category.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/tasks/Category.java
--- a/bugtracking/src/org/netbeans/modules/bugtracking/tasks/Category.java
+++ b/bugtracking/src/org/netbeans/modules/bugtracking/tasks/Category.java
@@ -46,8 +46,10 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import javax.swing.SwingUtilities;
 import org.netbeans.modules.bugtracking.IssueImpl;
 import org.netbeans.modules.bugtracking.RepositoryImpl;
+import org.openide.util.RequestProcessor;
 
 /**
  *
@@ -121,6 +123,13 @@
         return name.equalsIgnoreCase(other.name);
     }
     
+    @Override
+    public int hashCode() {
+        int hash = 5;
+        hash = 29 * hash + (this.name != null ? this.name.hashCode() : 0);
+        return hash;
+    }
+
     public void refresh(){
         if (loaded) {
             refreshTasks();
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/tasks/DashboardTopComponent.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/tasks/DashboardTopComponent.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/tasks/DashboardTopComponent.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/tasks/DashboardTopComponent.java
@@ -97,19 +97,19 @@
 public final class DashboardTopComponent extends TopComponent {
 
     private static DashboardTopComponent instance;
-    private ComponentAdapter componentAdapter;
-    private JComponent dashboardComponent;
+    private final ComponentAdapter componentAdapter;
+    private final JComponent dashboardComponent;
     private FilterDocumentListener filterListener;
     private CategoryNameDocumentListener categoryNameListener;
-    private Timer filterTimer;
+    private final Timer filterTimer;
     private ActiveTaskPanel activeTaskPanel;
     private final GridBagConstraints activeTaskConstrains;
     private FilterPanel filterPanel;
     private DisplayTextTaskFilter displayTextTaskFilter = null;
     private CategoryNamePanel categoryNamePanel;
     private NotifyDescriptor categoryNameDialog;
-    private DashboardActiveListener dashboardSelectionListener;
-    private Timer dashboardRefreshTime;
+    private final DashboardActiveListener dashboardSelectionListener;
+    private final Timer dashboardRefreshTime;
     private final DashboardRefresher refresher;
     private final DashboardViewer dashboard;
 
@@ -125,7 +125,7 @@
         }
         dashboard = DashboardViewer.getInstance();
         dashboardComponent = dashboard.getComponent();
-        dashboardRefreshTime = new Timer(20000, new RefreshTimerListener());
+        dashboardRefreshTime = new Timer(10000, new RefreshTimerListener());
         dashboardSelectionListener = new DashboardActiveListener();
         activeTaskConstrains = new GridBagConstraints(0, 1, 2, 1, 1.0, 0, 
GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 3, 0, 
0), 0, 0);
         componentAdapter = new ComponentAdapter() {
@@ -440,6 +440,7 @@
             if 
(TopComponent.Registry.PROP_ACTIVATED.equals(evt.getPropertyName())) {
                 if (DashboardTopComponent.this == 
TopComponent.getRegistry().getActivated()) {
                     refresher.setDashboardBusy(true);
+                    dashboardRefreshTime.stop();
                 } else {
                     dashboardRefreshTime.restart();
                 }

[hg] main-silver: fixing warning hints

Jan Peska 05/08/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close