Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3518

fix bug in AbstractSummaryView.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 11.3
    • None

    Description

      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..

      -                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) {
      

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

      +                        showRemainingFiles(((ShowLessEventsItem) selection.get(0)).getParent(), false);
      

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

      Attachments

        Issue Links

          Activity

            People

              brad.walker Brad Walker
              brad.walker Brad Walker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h