Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAPT complementary fix for missed edge case in https://github.com/realm/realm-java/pull/7220 #7227

Merged
merged 2 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## 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.

### Internal
* Updated to Realm Sync: 10.1.3.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true? I don't see that anywhere in this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really just copying a previous release block which has this issue ... I'll update it

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


## 10.1.1 (2020-10-27)

### Breaking Changes
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