realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

Fix null pointer exception when proxy is enabled. #7833

Closed clementetb closed 1 year ago

clementetb commented 1 year ago

A null pointer exception is thrown when a proxy is configured. It is reproducible in the emulator by enabling it in the WIFI settings.

The issue is caused by the backported logic from getHostString, it was wrong. Fixed by porting the actual expected logic.

Tested on an emulator and physical devices.

Closes #7828