[kepler-dev] odd recent change to BasicZList

Christopher Brooks cxh at eecs.berkeley.edu
Fri Feb 29 07:26:56 PST 2008


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
> 
> 
> 
> ************************************************************
> HSBC Bank plc may be solicited in the course of its placement efforts 
> for a new issue, by investment clients of the firm for whom the Bank as 
> a firm already provides other services. It may equally decide to 
> allocate to its own proprietary book or with an associate of HSBC Group. 
> This represents a potential conflict of interest. HSBC Bank plc has 
> internal arrangements designed to ensure that the firm would give 
> unbiased and full advice to the corporate finance client about the 
> valuation and pricing of the offering as well as internal systems, 
> controls and procedures to identify and manage conflicts of interest.
> 
> HSBC Bank plc
> Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
> Registered in England - Number 14259
> Authorised and regulated by the Financial Services Authority.
> ************************************************************
> 
> ------------------------------------------------------------------------
> 
> * SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued 
> by a member of the HSBC Group "HSBC" for the information of the 
> addressee only and should not be reproduced and/or distributed to any 
> other person. Each page attached hereto must be read in conjunction with 
> any disclaimer which forms part of it. Unless otherwise stated, this 
> transmission is neither an offer nor the solicitation of an offer to 
> sell or purchase any investment. Its contents are based on information 
> obtained from sources believed to be reliable but HSBC makes no 
> representation and accepts no responsibility or liability as to its 
> completeness or accuracy. *
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev


More information about the Kepler-dev mailing list