This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2013 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2014 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(args: Array<String>) { | |
| println("a" to "b") | |
| println("a" to "b" tre "c") | |
| println("a" to "b" tre "c" fo "d") | |
| println("a" to "b" tre "c" fo "d" fi "e") | |
| println("a" to "b" tre "c" fo "d" fi "e" sik "f") | |
| println("a" to "b" tre "c" fo "d" fi "e" sik "f" seva "g") | |
| } | |
| infix fun <A, B, C> Pair<A, B>.tre(c: C) = Triple(first, second, c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2018 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.squareup.moshi.Json; | |
| import com.squareup.moshi.JsonAdapter; | |
| import com.squareup.moshi.Moshi; | |
| import org.junit.Test; | |
| import static org.junit.Assert.assertEquals; | |
| public class MoshiBug { | |
| @Test public void test() throws Exception { | |
| String json = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2018 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package okioupgrade | |
| import okio.Buffer | |
| import okio.ByteString | |
| import okio.ByteString.Companion.decodeBase64 | |
| import okio.ByteString.Companion.decodeHex | |
| import okio.ByteString.Companion.encode | |
| import okio.ByteString.Companion.encodeUtf8 | |
| import okio.ByteString.Companion.readByteString | |
| import okio.ByteString.Companion.toByteString |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2018 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.squareup.refmt | |
| import okio.Okio | |
| import java.io.File | |
| fun main(args: Array<String>) { | |
| val directory = File(args[0]) | |
| Reformatter().reformatDirectory(directory) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package okhttp3.sample; | |
| import java.io.IOException; | |
| import okhttp3.HttpUrl; | |
| import okhttp3.mockwebserver.Dispatcher; | |
| import okhttp3.mockwebserver.MockResponse; | |
| import okhttp3.mockwebserver.MockWebServer; | |
| import okhttp3.mockwebserver.RecordedRequest; | |
| import okio.Buffer; | |
| import okio.BufferedSink; |