From: Mark S. <mar...@gm...> - 2008-10-31 20:56:35
|
Erik, Note in the PublicCompany Class, the routine to get the ParPrice, and hasParPrice are checking the boolean flag 'hasParPrice. What I really don't understand is why have this boolean at all? If the company has a Par Price, the variable 'parPrice' will NOT be null. If it is null, than there is no Par Price. Now, if you are trying to use the boolean hasParPrice to indicate that the Company is available for purchase, then it should be named 'availableForPurchase'. This way you can have a "Fixed" Par Price set before you can actually buy the stock. But your "fix" to change line 178 to 'if (comp.getParPrice() != null) {' moves the test from the PublicCompany Class back out to the setBuyableCerts Class which I feel is not right right way to fix it. If you have the 'hasParPrice' routine perform the test instead it would be a better solution. Mark On Fri, Oct 31, 2008 at 3:41 PM, Erik Vos <eri...@hc...> wrote: > I have provisionally fixed the bug reported by Mark. Company starts now > seem > to work again. > Over the weekend I will try to rationalise the company price routines. It's > indeed a bit of a mess. > > Erik. > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |