Platform.java
22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
package com.squareup.okhttp.internal;
import com.squareup.okhttp.Protocol;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.SSLSocket;
import okio.Buffer;
public class Platform
{
private static final Platform PLATFORM = ;
static byte[] concatLengthPrefixed(List<Protocol> paramList)
{
Buffer localBuffer = new Buffer();
int j = paramList.size();
int i = 0;
while (i < j)
{
Protocol localProtocol = (Protocol)paramList.get(i);
if (localProtocol != Protocol.HTTP_1_0)
{
localBuffer.writeByte(localProtocol.toString().length());
localBuffer.writeUtf8(localProtocol.toString());
}
i += 1;
}
return localBuffer.readByteArray();
}
/* Error */
private static Platform findPlatform()
{
// Byte code:
// 0: ldc 77
// 2: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 5: pop
// 6: new 85 com/squareup/okhttp/internal/OptionalMethod
// 9: dup
// 10: aconst_null
// 11: ldc 87
// 13: iconst_1
// 14: anewarray 79 java/lang/Class
// 17: dup
// 18: iconst_0
// 19: getstatic 93 java/lang/Boolean:TYPE Ljava/lang/Class;
// 22: aastore
// 23: invokespecial 96 com/squareup/okhttp/internal/OptionalMethod:<init> (Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)V
// 26: astore 5
// 28: new 85 com/squareup/okhttp/internal/OptionalMethod
// 31: dup
// 32: aconst_null
// 33: ldc 98
// 35: iconst_1
// 36: anewarray 79 java/lang/Class
// 39: dup
// 40: iconst_0
// 41: ldc 54
// 43: aastore
// 44: invokespecial 96 com/squareup/okhttp/internal/OptionalMethod:<init> (Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)V
// 47: astore 6
// 49: ldc 100
// 51: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 54: astore_0
// 55: aload_0
// 56: ldc 102
// 58: iconst_1
// 59: anewarray 79 java/lang/Class
// 62: dup
// 63: iconst_0
// 64: ldc 104
// 66: aastore
// 67: invokevirtual 108 java/lang/Class:getMethod (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
// 70: astore_1
// 71: aload_0
// 72: ldc 110
// 74: iconst_1
// 75: anewarray 79 java/lang/Class
// 78: dup
// 79: iconst_0
// 80: ldc 104
// 82: aastore
// 83: invokevirtual 108 java/lang/Class:getMethod (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
// 86: astore_2
// 87: ldc 112
// 89: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 92: pop
// 93: new 85 com/squareup/okhttp/internal/OptionalMethod
// 96: dup
// 97: ldc 114
// 99: ldc 116
// 101: iconst_0
// 102: anewarray 79 java/lang/Class
// 105: invokespecial 96 com/squareup/okhttp/internal/OptionalMethod:<init> (Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)V
// 108: astore_0
// 109: new 85 com/squareup/okhttp/internal/OptionalMethod
// 112: dup
// 113: aconst_null
// 114: ldc 118
// 116: iconst_1
// 117: anewarray 79 java/lang/Class
// 120: dup
// 121: iconst_0
// 122: ldc 114
// 124: aastore
// 125: invokespecial 96 com/squareup/okhttp/internal/OptionalMethod:<init> (Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)V
// 128: astore_3
// 129: aload_1
// 130: astore 4
// 132: aload_0
// 133: astore_1
// 134: aload 4
// 136: astore_0
// 137: new 6 com/squareup/okhttp/internal/Platform$Android
// 140: dup
// 141: aload 5
// 143: aload 6
// 145: aload_0
// 146: aload_2
// 147: aload_1
// 148: aload_3
// 149: invokespecial 121 com/squareup/okhttp/internal/Platform$Android:<init> (Lcom/squareup/okhttp/internal/OptionalMethod;Lcom/squareup/okhttp/internal/OptionalMethod;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Lcom/squareup/okhttp/internal/OptionalMethod;Lcom/squareup/okhttp/internal/OptionalMethod;)V
// 152: areturn
// 153: astore_0
// 154: ldc 123
// 156: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 159: pop
// 160: goto -154 -> 6
// 163: astore_0
// 164: ldc 125
// 166: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 169: astore_0
// 170: new 127 java/lang/StringBuilder
// 173: dup
// 174: invokespecial 128 java/lang/StringBuilder:<init> ()V
// 177: ldc 125
// 179: invokevirtual 132 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 182: ldc -122
// 184: invokevirtual 132 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 187: invokevirtual 135 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 190: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 193: astore_1
// 194: new 127 java/lang/StringBuilder
// 197: dup
// 198: invokespecial 128 java/lang/StringBuilder:<init> ()V
// 201: ldc 125
// 203: invokevirtual 132 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 206: ldc -119
// 208: invokevirtual 132 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 211: invokevirtual 135 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 214: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 217: astore_2
// 218: new 127 java/lang/StringBuilder
// 221: dup
// 222: invokespecial 128 java/lang/StringBuilder:<init> ()V
// 225: ldc 125
// 227: invokevirtual 132 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 230: ldc -117
// 232: invokevirtual 132 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 235: invokevirtual 135 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 238: invokestatic 83 java/lang/Class:forName (Ljava/lang/String;)Ljava/lang/Class;
// 241: astore_3
// 242: new 9 com/squareup/okhttp/internal/Platform$JdkWithJettyBootPlatform
// 245: dup
// 246: aload_0
// 247: ldc -115
// 249: iconst_2
// 250: anewarray 79 java/lang/Class
// 253: dup
// 254: iconst_0
// 255: ldc -113
// 257: aastore
// 258: dup
// 259: iconst_1
// 260: aload_1
// 261: aastore
// 262: invokevirtual 108 java/lang/Class:getMethod (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
// 265: aload_0
// 266: ldc -112
// 268: iconst_1
// 269: anewarray 79 java/lang/Class
// 272: dup
// 273: iconst_0
// 274: ldc -113
// 276: aastore
// 277: invokevirtual 108 java/lang/Class:getMethod (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
// 280: aload_0
// 281: ldc -110
// 283: iconst_1
// 284: anewarray 79 java/lang/Class
// 287: dup
// 288: iconst_0
// 289: ldc -113
// 291: aastore
// 292: invokevirtual 108 java/lang/Class:getMethod (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
// 295: aload_2
// 296: aload_3
// 297: invokespecial 149 com/squareup/okhttp/internal/Platform$JdkWithJettyBootPlatform:<init> (Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/Class;Ljava/lang/Class;)V
// 300: astore_0
// 301: aload_0
// 302: areturn
// 303: astore_0
// 304: new 2 com/squareup/okhttp/internal/Platform
// 307: dup
// 308: invokespecial 150 com/squareup/okhttp/internal/Platform:<init> ()V
// 311: areturn
// 312: astore_0
// 313: aconst_null
// 314: astore_0
// 315: aconst_null
// 316: astore 4
// 318: aload_1
// 319: astore_3
// 320: aload_0
// 321: astore_1
// 322: aload_3
// 323: astore_0
// 324: aload 4
// 326: astore_3
// 327: goto -190 -> 137
// 330: astore_0
// 331: aconst_null
// 332: astore_0
// 333: aconst_null
// 334: astore_2
// 335: aconst_null
// 336: astore_3
// 337: aload_0
// 338: astore_1
// 339: aload_3
// 340: astore_0
// 341: aconst_null
// 342: astore 4
// 344: aload_1
// 345: astore_3
// 346: aload_0
// 347: astore_1
// 348: aload_3
// 349: astore_0
// 350: aload 4
// 352: astore_3
// 353: goto -216 -> 137
// 356: astore_0
// 357: goto -53 -> 304
// 360: astore_0
// 361: aload_1
// 362: astore_0
// 363: goto -30 -> 333
// 366: astore_0
// 367: aconst_null
// 368: astore_0
// 369: aconst_null
// 370: astore_2
// 371: aconst_null
// 372: astore_1
// 373: goto -32 -> 341
// 376: astore_0
// 377: aconst_null
// 378: astore_0
// 379: aconst_null
// 380: astore_2
// 381: goto -40 -> 341
// 384: astore_0
// 385: aconst_null
// 386: astore_0
// 387: goto -46 -> 341
// 390: astore_3
// 391: goto -50 -> 341
// 394: astore_3
// 395: goto -80 -> 315
// Local variable table:
// start length slot name signature
// 54 92 0 localObject1 Object
// 153 1 0 localClassNotFoundException1 ClassNotFoundException
// 163 1 0 localClassNotFoundException2 ClassNotFoundException
// 169 133 0 localObject2 Object
// 303 1 0 localClassNotFoundException3 ClassNotFoundException
// 312 1 0 localClassNotFoundException4 ClassNotFoundException
// 314 10 0 localObject3 Object
// 330 1 0 localClassNotFoundException5 ClassNotFoundException
// 332 18 0 localObject4 Object
// 356 1 0 localNoSuchMethodException1 NoSuchMethodException
// 360 1 0 localClassNotFoundException6 ClassNotFoundException
// 362 1 0 localObject5 Object
// 366 1 0 localNoSuchMethodException2 NoSuchMethodException
// 368 1 0 localObject6 Object
// 376 1 0 localNoSuchMethodException3 NoSuchMethodException
// 378 1 0 localObject7 Object
// 384 1 0 localNoSuchMethodException4 NoSuchMethodException
// 386 1 0 localObject8 Object
// 70 303 1 localObject9 Object
// 86 295 2 localObject10 Object
// 128 225 3 localObject11 Object
// 390 1 3 localNoSuchMethodException5 NoSuchMethodException
// 394 1 3 localClassNotFoundException7 ClassNotFoundException
// 130 221 4 localObject12 Object
// 26 116 5 localOptionalMethod1 OptionalMethod
// 47 97 6 localOptionalMethod2 OptionalMethod
// Exception table:
// from to target type
// 0 6 153 java/lang/ClassNotFoundException
// 6 49 163 java/lang/ClassNotFoundException
// 137 153 163 java/lang/ClassNotFoundException
// 154 160 163 java/lang/ClassNotFoundException
// 164 301 303 java/lang/ClassNotFoundException
// 87 109 312 java/lang/ClassNotFoundException
// 49 71 330 java/lang/ClassNotFoundException
// 164 301 356 java/lang/NoSuchMethodException
// 71 87 360 java/lang/ClassNotFoundException
// 49 71 366 java/lang/NoSuchMethodException
// 71 87 376 java/lang/NoSuchMethodException
// 87 109 384 java/lang/NoSuchMethodException
// 109 129 390 java/lang/NoSuchMethodException
// 109 129 394 java/lang/ClassNotFoundException
}
public static Platform get()
{
return PLATFORM;
}
public void afterHandshake(SSLSocket paramSSLSocket) {}
public void configureTlsExtensions(SSLSocket paramSSLSocket, String paramString, List<Protocol> paramList) {}
public void connectSocket(Socket paramSocket, InetSocketAddress paramInetSocketAddress, int paramInt)
throws IOException
{
paramSocket.connect(paramInetSocketAddress, paramInt);
}
public String getPrefix()
{
return "OkHttp";
}
public String getSelectedProtocol(SSLSocket paramSSLSocket)
{
return null;
}
public void log(String paramString)
{
System.out.println(paramString);
}
public void logW(String paramString)
{
System.out.println(paramString);
}
public void tagSocket(Socket paramSocket)
throws SocketException
{}
public void untagSocket(Socket paramSocket)
throws SocketException
{}
static class Android
extends Platform
{
private static final int MAX_LOG_LENGTH = 4000;
private final OptionalMethod<Socket> getAlpnSelectedProtocol;
private final OptionalMethod<Socket> setAlpnProtocols;
private final OptionalMethod<Socket> setHostname;
private final OptionalMethod<Socket> setUseSessionTickets;
private final Method trafficStatsTagSocket;
private final Method trafficStatsUntagSocket;
public Android(OptionalMethod<Socket> paramOptionalMethod1, OptionalMethod<Socket> paramOptionalMethod2, Method paramMethod1, Method paramMethod2, OptionalMethod<Socket> paramOptionalMethod3, OptionalMethod<Socket> paramOptionalMethod4)
{
this.setUseSessionTickets = paramOptionalMethod1;
this.setHostname = paramOptionalMethod2;
this.trafficStatsTagSocket = paramMethod1;
this.trafficStatsUntagSocket = paramMethod2;
this.getAlpnSelectedProtocol = paramOptionalMethod3;
this.setAlpnProtocols = paramOptionalMethod4;
}
public void configureTlsExtensions(SSLSocket paramSSLSocket, String paramString, List<Protocol> paramList)
{
if (paramString != null)
{
this.setUseSessionTickets.invokeOptionalWithoutCheckedException(paramSSLSocket, new Object[] { Boolean.valueOf(true) });
this.setHostname.invokeOptionalWithoutCheckedException(paramSSLSocket, new Object[] { paramString });
}
if ((this.setAlpnProtocols != null) && (this.setAlpnProtocols.isSupported(paramSSLSocket)))
{
paramString = concatLengthPrefixed(paramList);
this.setAlpnProtocols.invokeWithoutCheckedException(paramSSLSocket, new Object[] { paramString });
}
}
public void connectSocket(Socket paramSocket, InetSocketAddress paramInetSocketAddress, int paramInt)
throws IOException
{
try
{
paramSocket.connect(paramInetSocketAddress, paramInt);
return;
}
catch (AssertionError paramSocket)
{
if (Util.isAndroidGetsocknameError(paramSocket)) {
throw new IOException(paramSocket);
}
throw paramSocket;
}
catch (SecurityException paramSocket)
{
paramInetSocketAddress = new IOException("Exception in connect");
paramInetSocketAddress.initCause(paramSocket);
throw paramInetSocketAddress;
}
}
public String getSelectedProtocol(SSLSocket paramSSLSocket)
{
if (this.getAlpnSelectedProtocol == null) {
return null;
}
if (!this.getAlpnSelectedProtocol.isSupported(paramSSLSocket)) {
return null;
}
paramSSLSocket = (byte[])this.getAlpnSelectedProtocol.invokeWithoutCheckedException(paramSSLSocket, new Object[0]);
if (paramSSLSocket != null) {
return new String(paramSSLSocket, Util.UTF_8);
}
return null;
}
public void log(String paramString)
{
int i = 0;
int k = paramString.length();
int j;
if (i < k)
{
j = paramString.indexOf('\n', i);
if (j == -1) {}
}
for (;;)
{
int m = Math.min(j, i + 4000);
paramString.substring(i, m);
if (m >= j)
{
i = m + 1;
break;
j = k;
continue;
return;
}
i = m;
}
}
public void tagSocket(Socket paramSocket)
throws SocketException
{
if (this.trafficStatsTagSocket == null) {
return;
}
try
{
this.trafficStatsTagSocket.invoke(null, new Object[] { paramSocket });
return;
}
catch (IllegalAccessException paramSocket)
{
throw new RuntimeException(paramSocket);
}
catch (InvocationTargetException paramSocket)
{
throw new RuntimeException(paramSocket.getCause());
}
}
public void untagSocket(Socket paramSocket)
throws SocketException
{
if (this.trafficStatsUntagSocket == null) {
return;
}
try
{
this.trafficStatsUntagSocket.invoke(null, new Object[] { paramSocket });
return;
}
catch (IllegalAccessException paramSocket)
{
throw new RuntimeException(paramSocket);
}
catch (InvocationTargetException paramSocket)
{
throw new RuntimeException(paramSocket.getCause());
}
}
}
static class JdkWithJettyBootPlatform
extends Platform
{
private final Class<?> clientProviderClass;
private final Method getMethod;
private final Method putMethod;
private final Method removeMethod;
private final Class<?> serverProviderClass;
public JdkWithJettyBootPlatform(Method paramMethod1, Method paramMethod2, Method paramMethod3, Class<?> paramClass1, Class<?> paramClass2)
{
this.putMethod = paramMethod1;
this.getMethod = paramMethod2;
this.removeMethod = paramMethod3;
this.clientProviderClass = paramClass1;
this.serverProviderClass = paramClass2;
}
public void afterHandshake(SSLSocket paramSSLSocket)
{
try
{
this.removeMethod.invoke(null, new Object[] { paramSSLSocket });
return;
}
catch (IllegalAccessException paramSSLSocket)
{
throw new AssertionError();
}
catch (InvocationTargetException paramSSLSocket)
{
for (;;) {}
}
}
public void configureTlsExtensions(SSLSocket paramSSLSocket, String paramString, List<Protocol> paramList)
{
paramString = new ArrayList(paramList.size());
int j = paramList.size();
int i = 0;
Object localObject;
while (i < j)
{
localObject = (Protocol)paramList.get(i);
if (localObject != Protocol.HTTP_1_0) {
paramString.add(((Protocol)localObject).toString());
}
i += 1;
}
try
{
paramList = Platform.class.getClassLoader();
localObject = this.clientProviderClass;
Class localClass = this.serverProviderClass;
paramString = new Platform.JettyNegoProvider(paramString);
paramString = Proxy.newProxyInstance(paramList, new Class[] { localObject, localClass }, paramString);
this.putMethod.invoke(null, new Object[] { paramSSLSocket, paramString });
return;
}
catch (IllegalAccessException paramSSLSocket)
{
throw new AssertionError(paramSSLSocket);
}
catch (InvocationTargetException paramSSLSocket)
{
for (;;) {}
}
}
public String getSelectedProtocol(SSLSocket paramSSLSocket)
{
try
{
paramSSLSocket = (Platform.JettyNegoProvider)Proxy.getInvocationHandler(this.getMethod.invoke(null, new Object[] { paramSSLSocket }));
if ((!Platform.JettyNegoProvider.access$000(paramSSLSocket)) && (Platform.JettyNegoProvider.access$100(paramSSLSocket) == null))
{
Internal.logger.log(Level.INFO, "ALPN callback dropped: SPDY and HTTP/2 are disabled. Is alpn-boot on the boot class path?");
return null;
}
if (Platform.JettyNegoProvider.access$000(paramSSLSocket)) {
return null;
}
paramSSLSocket = Platform.JettyNegoProvider.access$100(paramSSLSocket);
return paramSSLSocket;
}
catch (IllegalAccessException paramSSLSocket)
{
throw new AssertionError();
}
catch (InvocationTargetException paramSSLSocket)
{
for (;;) {}
}
}
}
static class JettyNegoProvider
implements InvocationHandler
{
private final List<String> protocols;
private String selected;
private boolean unsupported;
public JettyNegoProvider(List<String> paramList)
{
this.protocols = paramList;
}
public Object invoke(Object paramObject, Method paramMethod, Object[] paramArrayOfObject)
throws Throwable
{
String str = paramMethod.getName();
Class localClass = paramMethod.getReturnType();
paramObject = paramArrayOfObject;
if (paramArrayOfObject == null) {
paramObject = Util.EMPTY_STRING_ARRAY;
}
if ((str.equals("supports")) && (Boolean.TYPE == localClass)) {
return Boolean.valueOf(true);
}
if ((str.equals("unsupported")) && (Void.TYPE == localClass))
{
this.unsupported = true;
return null;
}
if ((str.equals("protocols")) && (paramObject.length == 0)) {
return this.protocols;
}
if (((str.equals("selectProtocol")) || (str.equals("select"))) && (String.class == localClass) && (paramObject.length == 1) && ((paramObject[0] instanceof List)))
{
paramObject = (List)paramObject[0];
int j = ((List)paramObject).size();
int i = 0;
while (i < j)
{
if (this.protocols.contains(((List)paramObject).get(i)))
{
paramObject = (String)((List)paramObject).get(i);
this.selected = ((String)paramObject);
return paramObject;
}
i += 1;
}
paramObject = (String)this.protocols.get(0);
this.selected = ((String)paramObject);
return paramObject;
}
if (((str.equals("protocolSelected")) || (str.equals("selected"))) && (paramObject.length == 1))
{
this.selected = ((String)paramObject[0]);
return null;
}
return paramMethod.invoke(this, (Object[])paramObject);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/squareup/okhttp/internal/Platform.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/