### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java,v retrieving revision 1.8 diff -u -r1.8 IndentManipulation.java --- formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java 27 Jun 2008 16:04:12 -0000 1.8 +++ formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java 14 Jul 2009 19:54:04 -0000 @@ -68,16 +68,17 @@ * @return the number of indentation units that line is indented by * @exception IllegalArgumentException if: * */ public static int measureIndentUnits(CharSequence line, int tabWidth, int indentWidth) { - if (indentWidth <= 0 || tabWidth < 0 || line == null) { + if (indentWidth < 0 || tabWidth < 0 || line == null) { throw new IllegalArgumentException(); } + if (indentWidth == 0) return 0; int visualLength= measureIndentInSpaces(line, tabWidth); return visualLength / indentWidth; }