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:
parent
02dca611b0
commit
0f052f5467
@ -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;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user