/* * Decompiled with CFR 0.152. */ package okio; import okio.Segment; final class SegmentPool { static final long MAX_SIZE = 65536L; static Segment next; static long byteCount; private SegmentPool() { } /* * WARNING - Removed try catching itself - possible behaviour change. */ static Segment take() { Class clazz = SegmentPool.class; synchronized (SegmentPool.class) { if (next != null) { Segment result = next; next = result.next; result.next = null; byteCount -= 2048L; // ** MonitorExit[var0] (shouldn't be in output) return result; } // ** MonitorExit[var0] (shouldn't be in output) return new Segment(); } } /* * WARNING - Removed try catching itself - possible behaviour change. */ static void recycle(Segment segment) { if (segment.next != null || segment.prev != null) { throw new IllegalArgumentException(); } if (segment.shared) { return; } Class clazz = SegmentPool.class; synchronized (SegmentPool.class) { if (byteCount + 2048L > 65536L) { // ** MonitorExit[var1_1] (shouldn't be in output) return; } byteCount += 2048L; segment.next = next; segment.limit = 0; segment.pos = 0; next = segment; // ** MonitorExit[var1_1] (shouldn't be in output) return; } } }