1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 06:22:55 +01:00

Bangle.js: Fix null pointer issue if headers not supplied for HTTP request

This commit is contained in:
Gordon Williams 2022-08-24 20:26:25 +01:00
parent 02dca611b0
commit 0f052f5467

View File

@ -629,12 +629,14 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> h = super.getHeaders();
if (headers != null) {
Iterator<String> iter = headers.keySet().iterator();
while (iter.hasNext()) {
String key = iter.next();
String value = headers.get(key);
h.put(key, value);
}
}
return h;
}
};