mirror of
https://github.com/fankes/moshi.git
synced 2025-12-12 20:23:34 +08:00
Convert util package to Kotlin (#1461)
* Rename .java to .kt
* Convert NonNullJsonAdapter
* Rename .java to .kt
* Convert NullSafeJsonAdapter
* Fix missing null-check
* Rename .java to .kt
* Convert Util (initial pass)
* Push to top-level Util
* Use extensions and properties where possible
* Use knownNotNull
* Spotless
* Clean up impl type classes a bit
* Update code gen
* Use extension for resolving
* Spotless
* Fix master conflicts
* Rename to toStringWithAnnotations()
* for (t in args.indices) {
* for (i in interfaces.indices) {
* Template
This commit is contained in:
@@ -78,7 +78,7 @@ final class FallbackEnum {
|
||||
nameStrings = new String[constants.length];
|
||||
for (int i = 0; i < constants.length; i++) {
|
||||
String constantName = constants[i].name();
|
||||
nameStrings[i] = Util.jsonName(constantName, enumType.getField(constantName));
|
||||
nameStrings[i] = Util.jsonName(enumType.getField(constantName), constantName);
|
||||
}
|
||||
options = JsonReader.Options.of(nameStrings);
|
||||
} catch (NoSuchFieldException e) {
|
||||
|
||||
Reference in New Issue
Block a user