if内有break,break一般会成对

源码:

 if(fReentrant)
            {
                aoKey = SimpleEnumerator.toArray(iterator(), ao != null ? ao : OverflowMap.EMPTY_ARRAY);
            }else{
            gate.close(-1L);
            int cKeys = mapOverflow.size();
            if(ao == null)
            {
                aoKey = new Object[cKeys];
            } else
            {
                int cElements = ao.length;
                if(cKeys > cElements)
                {
                    aoKey = (Object[])Array.newInstance(((Object) (ao)).getClass().getComponentType(), cKeys);
                } else
                {
                    aoKey = ao;
                    if(cKeys < cElements)
                        aoKey[cKeys] = null;
                }
            }
            int iKey = 0;
            Iterator iter = mapOverflow.getStatusMap().entrySet().iterator();
            do
            {
                if(!iter.hasNext())
                    break;
                java.util.Map.Entry entry = (java.util.Map.Entry)iter.next();
                Status status = (Status)entry.getValue();
                if(status.isEntryExistent())
                    aoKey[iKey++] = entry.getKey();
            } while(true);
            if(!$assertionsDisabled && iKey != cKeys)
                throw new AssertionError();
            gate.open();
            }

反编译后:

if(fReentrant)
            {
                aoKey = SimpleEnumerator.toArray(iterator(), ao != null ? ao : OverflowMap.EMPTY_ARRAY);
                break MISSING_BLOCK_LABEL_238;
            }
            gate.close(-1L);
            int cKeys = mapOverflow.size();
            if(ao == null)
            {
                aoKey = new Object[cKeys];
            } else
            {
                int cElements = ao.length;
                if(cKeys > cElements)
                {
                    aoKey = (Object[])Array.newInstance(((Object) (ao)).getClass().getComponentType(), cKeys);
                } else
                {
                    aoKey = ao;
                    if(cKeys < cElements)
                        aoKey[cKeys] = null;
                }
            }
            int iKey = 0;
            Iterator iter = mapOverflow.getStatusMap().entrySet().iterator();
            do
            {
                if(!iter.hasNext())
                    break;
                java.util.Map.Entry entry = (java.util.Map.Entry)iter.next();
                Status status = (Status)entry.getValue();
                if(status.isEntryExistent())
                    aoKey[iKey++] = entry.getKey();
            } while(true);
            if(!$assertionsDisabled && iKey != cKeys)
                throw new AssertionError();
            gate.open();
            break MISSING_BLOCK_LABEL_238;


你可能感兴趣的:(if内有break,break一般会成对)