From: brett l. <bre...@gm...> - 2011-07-04 22:04:51
|
Excellent. Then that's what I'll do. :-) ---Brett. On Mon, Jul 4, 2011 at 1:58 PM, Erik Vos <eri...@xs...> wrote: > No, you're not missing any deep thoughts here. Of course one of these > initializations is completely redundant. Can't tell how it became this way > - I suppose one day I have overlooked it while doing some refactoring. > > The bad news that these indexes are static. These should IMO be moved to > some instance in the object creation chain. > > Erik. > >> -----Oorspronkelijk bericht----- >> Van: brett lentz [mailto:bre...@gm...] >> Verzonden: maandag 4 juli 2011 22:12 >> Aan: Development list for Rails: an 18xx game >> Onderwerp: [Rails-devel] Token.init() and SpecialProperty.init() >> >> I'm positive I'm missing something here. >> >> In both Token and SpecialProperty, we're defining some static class > variables, >> such as: >> >> private static int index = 0; >> >> Then, in the init() method, we're re-defaulting it to the same value we've >> already declared, such as: >> >> // initialize the special properties static variables >> public static void init() { >> tokenMap = new HashMap<String, TokenI>(); >> index = 0; >> log.debug("Init token static variables"); >> } >> >> >> Why is this necessary? Is the defined default value insufficient in some > way >> that isn't immediately obvious? >> >> ---Brett. >> >> > ---------------------------------------------------------------------------- > -- >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2d-c2 >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |