On Mon, Jul 14, 2008 at 1:19 PM, Will Glass-Husain <[EMAIL PROTECTED]> wrote: > Really? that's a better style? not that I feel strongly about it, > but I always thought it was better to return in one place. easier to > debug. seems cleaner flow of execution, too.
heh. i suppose it's different concerns. i consider it more visually and mentally complex to track variable assignments than to track multiple method exit points, but that might just be my brain. :) really, the main reason i bothered with style cleanup was that our convention is 4 spaces per tab, as i do feel strongly about consistent spacing. i just thought i'd "simplify" the other part too. i, too, don't feel strongly about single vs multiple return points. > WILL > > On Mon, Jul 14, 2008 at 1:09 PM, <[EMAIL PROTECTED]> wrote: >> Author: nbubna >> Date: Mon Jul 14 13:09:09 2008 >> New Revision: 676716 >> >> URL: http://svn.apache.org/viewvc?rev=676716&view=rev >> Log: >> style nitpicks >> >> Modified: >> >> velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java >> >> Modified: >> velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java >> URL: >> http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java?rev=676716&r1=676715&r2=676716&view=diff >> ============================================================================== >> --- >> velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java >> (original) >> +++ >> velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java >> Mon Jul 14 13:09:09 2008 >> @@ -149,18 +149,15 @@ >> */ >> public static String tokenLiteral( Token t ) >> { >> - String result; >> - >> - // Look at kind of token and return "" when it's a multiline comment >> - if (t.kind == ParserConstants.MULTI_LINE_COMMENT) >> - { >> - result = ""; >> - } >> - else >> - { >> - result = specialText( t ) + t.image; >> - } >> - return result; >> + // Look at kind of token and return "" when it's a multiline comment >> + if (t.kind == ParserConstants.MULTI_LINE_COMMENT) >> + { >> + return ""; >> + } >> + else >> + { >> + return specialText( t ) + t.image; >> + } >> } >> >> /** >> >> >> > > > > -- > Forio Business Simulations > > Will Glass-Husain > [EMAIL PROTECTED] > www.forio.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
