PreviousNextTracker indexSee it online !

(224/243) 3913 - beanshell do-while loop bug

(copied from https://sourceforge.net/p/jedit/mailman/message/33664362/)

The original BeanShell has a bug that causes do-while loops to skip
checking its condition if a continue statement is encountered before the
loop has completed its first iteration.

This is shown more clearly in the beanshell2 bug report:

https://code.google.com/p/beanshell2/issues/detail?id=57

Looking at org.gjt.sp.jedit.bsh.BSHWhileStatement.java, it seems that
jEdit's internal beanshell is subject to the same bug.

The beanshell2 project fixed it with a patch that (I think?) can be applied
to jEdit's source as-is,


https://code.google.com/p/beanshell2/source/diff?spec=svn100&r=100&format=side&path=/trunk/src/bsh/BSHWhileStatement.java

Submitted kerik-sf - 2015-04-03 17:36:34.013000 Assigned kerik-sf
Priority 5 Labels
Status open Group normal bug
Resolution None

Comments

2015-04-05 07:48:18.198000
kpouer

It can but maybe it would be interesting to use the latest version of that fork instead, our beanshell implementation was abandonned long time ago.