From: <jsa...@us...> - 2009-02-16 21:04:03
|
Revision: 136 http://flexotask.svn.sourceforge.net/flexotask/?rev=136&view=rev Author: jsauerbach Date: 2009-02-16 21:04:01 +0000 (Mon, 16 Feb 2009) Log Message: ----------- Limit the depth of search for reasons when reporting an error (was seeing OutOfMemory in some cases). Perhaps there should be a recursion check here, but an absolute limit is reasonable too since no programmer is going to read through a causal chain that is longer than 10 or so items. Modified Paths: -------------- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/validation/DevtimeCodeValidator.java Modified: trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/validation/DevtimeCodeValidator.java =================================================================== --- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/validation/DevtimeCodeValidator.java 2009-02-16 21:01:59 UTC (rev 135) +++ trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/validation/DevtimeCodeValidator.java 2009-02-16 21:04:01 UTC (rev 136) @@ -173,7 +173,8 @@ private String getReasoning(FieldWrapper wrapper) { StringBuilder buf = new StringBuilder(); FieldState state = (FieldState) reachableFields.get(wrapper); - while (state.reason instanceof FieldWrapper) { + int limit = 10; + while (state.reason instanceof FieldWrapper && limit-- > 0) { buf.append(" That field may be on heap because "); FieldWrapper fw = (FieldWrapper) state.reason; buf.append(fw.getDefiningClass().getName()).append('.').append(fw.getName()).append(" may be on heap."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |