Brad Walker created NETBEANS-3518:
-------------------------------------

             Summary: fix bug in AbstractSummaryView.java
                 Key: NETBEANS-3518
                 URL: https://issues.apache.org/jira/browse/NETBEANS-3518
             Project: NetBeans
          Issue Type: Bug
            Reporter: Brad Walker
            Assignee: Brad Walker


I was working on my usual code cleanup when I encountered a bug in the method 
AbstractSummaryView() in AbstractSummaryView.java..

Notice the following code was not type-casting correctly..

{code:java}
-                if (selection.length == 1) {
-                    if (selection[0] instanceof ShowAllEventsItem) {
-                        showRemainingFiles(((ShowAllEventsItem) 
selection[0]).getParent(), true);
-                    } else if (selection[0] instanceof ShowLessEventsItem) {
-                        showRemainingFiles(((ShowAllEventsItem) 
selection[0]).getParent(), false);
-                    } else if (selection[0] instanceof MoreRevisionsItem) {
{code}

Specifically, an instance of _ShowLessEventsItem_ should be properly cast..

{code:java}
+                        showRemainingFiles(((ShowLessEventsItem) 
selection.get(0)).getParent(), false);
{code}

While I had the hood opened, I fixed a few other Java warnings..




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to