|
From: Christopher W. <caw...@us...> - 2005-09-21 18:58:45
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26468/src/org/rubypeople/rdt/internal/core/builder Modified Files: RubyBuilder.java Log Message: try to avoid 'divide by zero' errors better Index: RubyBuilder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyBuilder.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RubyBuilder.java 18 Sep 2005 15:11:10 -0000 1.11 --- RubyBuilder.java 21 Sep 2005 18:58:37 -0000 1.12 *************** *** 185,190 **** */ protected void compile(IFile[] units, IProgressMonitor monitor) { int unitsLength = units.length; ! grandTotal = unitsLength; percentPerUnit = totalWork / unitsLength; --- 185,192 ---- */ protected void compile(IFile[] units, IProgressMonitor monitor) { + if (units == null) return; int unitsLength = units.length; ! grandTotal = unitsLength; ! if (unitsLength == 0) return; percentPerUnit = totalWork / unitsLength; |