Skip to content

Commit

Permalink
KAPT complementary fix for missed edge case in #7220 (#7227)
Browse files Browse the repository at this point in the history
* Fixes a missed edge case for #7213
  • Loading branch information
nhachicha authored Dec 2, 2020
1 parent 03c5961 commit cad8da5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
21 changes: 16 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 10.1.2 (YYYY-MM-DD)

### Breaking Changes
* None.

### Enhancements
* None.

### Fixes
* Complementary fix for missed edge case in https://github.com/realm/realm-java/pull/7220 where KAPT crash if we process a RealmObject referencing a type in RealmList defined in another module. (Issue [#7213](https://github.com/realm/realm-java/issues/7213), since v10.0.0).

### Compatibility
* File format: Generates Realms with format v20. Unsynced Realms will be upgraded from Realm Java 2.0 and later. Synced Realms can only be read and upgraded if created with Realm Java v10.0.0-BETA.1.
* APIs are backwards compatible with all previous release of realm-java in the 10.x.y series.
* Realm Studio 10.0.0 or above is required to open Realms created by this version.

## 10.1.1 (2020-10-27)

### Breaking Changes
Expand All @@ -14,11 +30,6 @@
* APIs are backwards compatible with all previous release of realm-java in the 10.x.y series.
* Realm Studio 10.0.0 or above is required to open Realms created by this version.

### Internal
* Updated to Realm Sync: 10.1.3.
* Updated to Realm Core: 10.1.3.
* Updated to Object Store commit: fc6daca61133aa9601e4cb34fbeb9ec7569e162e.


## 10.1.0 (2020-10-23)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2165,16 +2165,15 @@ class RealmProxyClassGenerator(private val processingEnvironment: ProcessingEnvi
writer)
}
Utils.isRealmModelList(field) -> {
val fieldType = QualifiedClassName((field.asType() as DeclaredType).typeArguments[0])
val fieldTypeMetaData: ClassMetaData = classCollection.getClassFromQualifiedName(fieldType)
val fieldType = (field.asType() as DeclaredType).typeArguments[0]
RealmJsonTypeHelper.emitFillRealmListWithJsonValue(
"objProxy",
metadata.getInternalGetter(fieldName),
metadata.getInternalSetter(fieldName),
fieldName,
(field.asType() as DeclaredType).typeArguments[0].toString(),
Utils.getProxyClassSimpleName(field),
fieldTypeMetaData.embedded,
isFieldTypeEmbedded(fieldType),
writer)
}
Utils.isRealmValueList(field) -> emitStatement("ProxyUtils.setRealmListWithJsonObject(objProxy.%1\$s(), json, \"%2\$s\")", metadata.getInternalGetter(fieldName), fieldName)
Expand Down

0 comments on commit cad8da5

Please sign in to comment.