Bug 38194 - DefaultListSelectionModel.java: remove dead for loop ?
Summary: DefaultListSelectionModel.java: remove dead for loop ?
Status: UNCONFIRMED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: unspecified
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-20 10:43 UTC by David Binderman
Modified: 2017-08-02 11:47 UTC (History)
3 users (show)

See Also:
Host: suse-linux-x86_64
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2008-11-20 10:43:46 UTC
I just had a look at some of the source code of the Java package in
the GNU gcc version 4.4.0 snapshot 20081114

gcc-4.4-20081114/libjava/classpath/javax/swing/DefaultListSelectionModel.java:300 Avoid unused local variables such as 'end'.

The source code is

    int beg = sel.nextSetBit(0), end = -1;
    for(int i=beg; i >= 0; i=sel.nextSetBit(i+1))
      end = i;

Suggest remove unused local variable end, since it is in a for loop.
It also looks like the for loop can be removed.
Comment 1 David Binderman 2017-07-26 07:20:04 UTC
Source code gone.
Comment 2 Andrew John Hughes 2017-08-02 11:47:36 UTC
No, this is a Classpath bug. Stop closing them!

http://git.savannah.gnu.org/cgit/classpath.git/log/