Skip to content

Commit

Permalink
Merge pull request #30 from Yelp/extend-typeadapter-visibility
Browse files Browse the repository at this point in the history
Extend visibility of Custom Moshi Adapters
  • Loading branch information
cortinico committed May 31, 2019
2 parents 940c5a4 + d5dc03d commit cf332b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import java.math.BigDecimal
* Moshi Factory to handle all the custom types we want to support,
* such as [LocalDate], [ZonedDateTime], [BigDecimal].
*/
internal class TypesAdapterFactory : JsonAdapter.Factory {
class TypesAdapterFactory : JsonAdapter.Factory {
private val types = mapOf<Type, JsonAdapter<*>>(
LocalDate::class.java to LocalDateAdapter(),
ZonedDateTime::class.java to ZonedDateTimeAdapter(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.squareup.moshi.JsonWriter
import com.squareup.moshi.Moshi
import java.lang.reflect.Type

internal class XNullableAdapterFactory : JsonAdapter.Factory {
class XNullableAdapterFactory : JsonAdapter.Factory {
override fun create(type: Type, annotations: MutableSet<out Annotation>, moshi: Moshi): JsonAdapter<*>? {
if (annotations.any { it is XNullable }) {
return object : JsonAdapter<Any>() {
Expand Down

0 comments on commit cf332b2

Please sign in to comment.