[kepler-dev] odd recent change to BasicZList
Christopher Brooks
cxh at eecs.berkeley.edu
Mon Mar 3 11:07:11 PST 2008
Hi Ian,
Thanks, I figured out the problem!
BasicZList had the bug in two places.
I've updated the sources. Tomorrow's build should have this change in
it.
I also updated the diva.jar and the rel-7-0-beta-2 release branch.
_Christopher
--------
I grabbed it from here :
http://chess.eecs.berkeley.edu/ptexternal/nightly/index.htm
ptII-latest.tar.gz this morning.
Our firewall will block cvs and svn, so I tend to grab a tarball every
week or so and use winmerge to see what has changed.
Ian
Christopher Brooks <cxh at eecs.berkeley.edu>
29/02/2008 15:26
Mail Size: 7620
To
Ian BROWN/IBEU/HSBC at HSBC
cc
kepler-dev at ecoinformatics.org
Subject
Re: [kepler-dev] odd recent change to BasicZList
Entity
Investment Banking Europe - IBEU
Hi Ian,
I was the one who introduced this bug, and Mankit fixed it on 1/22.
From where did you get the tarball? Maybe there is an old tarball
around?
_Christopher
ian.brown at hsbcib.com wrote:
>
> Hi,
> I'm just synching my local source to the latest ptolemy souce
> tarball.
> I noticed that BasicZList.java has been changed.
> I don't like the change made to BasicZList$GSet.figuresFromFront (approx
> line 251).
>
> Previously it was:
>
> public Iterator figuresFromFront() {
> return new Iterator() {
> int cursor = _currentFigures.size();
>
> public boolean hasNext() {
> return cursor > 0;
> }
>
> public Object next() {
> cursor--;
> return _currentFigures.get(cursor);
> }
>
> public void remove() {
> throw new UnsupportedOperationException(
> "Cannot delete figure from geometric set");
> }
> };
> }
>
>
> and it has been changed to:
>
> public Iterator figuresFromFront() {
> return new Iterator() {
> int cursor = _currentFigures.size();
>
> public boolean hasNext() throws NoSuchElementException {
> return cursor > 0;
> }
>
> public Object next() {
> if (cursor <= 0) {
> throw new NoSuchElementException("Can't get " +
> cursor
> + "'th element from BasicZList of size "
> + _currentFigures.size());
> }
> cursor--;
> return _currentFigures.get(cursor);
> }
>
> public void remove() {
> throw new UnsupportedOperationException(
> "Cannot delete figure from geometric set");
> }
> };
> }
>
> It looks as though the throws designator has been added to the wrong
> member. I think it should have been added to next() and not hasNext().
>
> Ian
>
More information about the Kepler-dev
mailing list