Realm import will raise NPE when clientID is missing

This commit is contained in:
Bruno Oliveira committed 2016-01-29 10:05:42 -02:00
1 parent c1cdcb424f
commit 5eb8d3be5a
3 files changed
+77 -2

No files matched your search

@@ -472,7 +472,7 @@ public class RealmManager implements RealmImporter {
private boolean hasClient(RealmRepresentation rep, String clientId) {
if (rep.getClients() != null) {
for (ClientRepresentation clientRep : rep.getClients()) {
if (clientRep.getClientId().equals(clientId)) {
if (clientRep.getClientId() != null && clientRep.getClientId().equals(clientId)) {
return true;
}
}