Skip to content

Commit 78c96a9

Browse files
committed
Use current thread context class loader
The getSystemClassLoader() will fail to read the properties resource on Android. getResourceAsStream will return null.
1 parent d71ad42 commit 78c96a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/com/pubnub/api/PubNub.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public final void reconnect() {
232232
*/
233233
private String fetchSDKVersion() {
234234
Properties prop = new Properties();
235-
InputStream in = ClassLoader.getSystemClassLoader().getResourceAsStream("version.properties");
235+
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("version.properties");
236236
try {
237237
prop.load(in);
238238
} catch (IOException e) {

0 commit comments

Comments
 (0)