| Steps to Reproduce: | 1. get Mark Zuckerberg's cover photo: https://graph.facebook.com/4?access_token<MY ACCESS TOKEN>&format=json&fields=cover 2. Result: { "cover": { "id": "989690200741", "source": "https://fbcdn_sphotos_a-a.akamaihd.net/hphotos-ak-ash4/s720x720/ "offset_y": 0 }, "id": "4" } 3. try to get that image in java: URL url = new URL("https://fbcdn_sphotos_a-a.akamaihd.net/hphotos-ak-ash4/s720x720/ final URLConnection conn = url.openConnection(); conn.connect(); ... |
|---|---|
| Expected Behavior: | The image gets downloaded |
| Actual Behavior: | Either: java.IOException: Illegal Character in hostname at index 0 or java.lang.NullPointerException at libcore.net.http.HttpConnection$Address.hashCode(HttpConnection.java:343) at java.util.HashMap.get(HashMap.java:298) at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:67) at libcore.net.http.HttpConnection.connect(HttpConnection.java:128) |