Confirmed users
586
edits
(→Timing things: Google recommends using SystemClock.uptimeMillis()) |
(→Closing resources: fix finally block) |
||
| Line 52: | Line 52: | ||
log(sse); | log(sse); | ||
} finally { | } finally { | ||
try { | |||
c.close(); | c.close(); | ||
} catch (Exception e) { | |||
// this handles/ignores NullPointerExceptions in case c was never assigned | |||
// and also anything else c.close() might throw (e.g. IOException) | |||
} | } | ||
} | } | ||