From: Tim P <ti...@us...> - 2008-03-20 21:45:36
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25466/src/org/webmacro/engine Modified Files: Block.java Log Message: Checkstyle: Add a default to switch even if we don't need one Index: Block.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/Block.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Block.java 20 Mar 2008 11:41:18 -0000 1.26 --- Block.java 20 Mar 2008 21:45:33 -0000 1.27 *************** *** 33,36 **** --- 33,37 ---- import org.webmacro.TemplateVisitor; import org.webmacro.Visitable; + import org.webmacro.WebMacroRuntimeException; import org.webmacro.util.Encoder; *************** *** 92,95 **** --- 93,102 ---- teC._templateName = _name; + // + // The _remainder is 10 minus the number of bytes left. + // If we need to write out 3 bytes remainder will be 7, + // so control starts at case 7 and falls through 8 and 9, + // so 3 bytes are written. + // int i = 0; switch (_remainder) *************** *** 149,152 **** --- 156,164 ---- teC._columnNo = this.getColNo(i); _macros[i++].write(out, context); + break; + default : + throw new WebMacroRuntimeException( + "Bug: _remainder value not 0 to 9: " + _remainder); + } |