private void patchForwardBranches() { // now patch forward branches //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" for (System.Collections.IEnumerator i = updates.GetEnumerator(); i.MoveNext();) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" UpdateEntry entry = (UpdateEntry)i.Current; switch (entry.source.code) { case flash.swf.ActionConstants_Fields.sactionIf: case flash.swf.ActionConstants_Fields.sactionJump: int target = getLabelOffset(((Branch)entry.source).target); writer.writeSI16at(entry.updatePos, target - entry.anchor); break; case flash.swf.ActionConstants_Fields.sactionWith: int endWith = getLabelOffset(((With)entry.source).endWith); writer.writeUI16at(entry.updatePos, endWith - entry.anchor); break; case flash.swf.ActionConstants_Fields.sactionWaitForFrame: case flash.swf.ActionConstants_Fields.sactionWaitForFrame2: int skipTarget = getLabelCount(((WaitForFrame)entry.source).skipTarget); writer.writeUI8at(entry.updatePos, skipTarget - entry.anchor); break; case flash.swf.ActionConstants_Fields.sactionTry: Try t = (Try)entry.source; int endTry = getLabelOffset(t.endTry); writer.writeUI16at(entry.updatePos, endTry - entry.anchor); entry.anchor = endTry; if (t.hasCatch()) { int endCatch = getLabelOffset(t.endCatch); writer.writeUI16at(entry.updatePos + 2, endCatch - entry.anchor); entry.anchor = endCatch; } if (t.hasFinally()) { int endFinally = getLabelOffset(t.endFinally); writer.writeUI16at(entry.updatePos + 4, endFinally - entry.anchor); } break; default: Debug.Assert(false, "invalid action in UpdateEntry"); break; } } }