Skip to content

Commit 3bf5195

Browse files
committed
BKNDLSS-17224 [Support] User Login in Custom Event- NullPointerException
1 parent e08eab2 commit 3bf5195

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'signing'
55

66

77
group 'com.backendless'
8-
version '5.0.1-snapshot'
8+
version '5.0.2-snapshot'
99
archivesBaseName='backendless'
1010

1111

out/backendless.jar

108 KB
Binary file not shown.

src/com/backendless/persistence/local/CodeRunnerUserIdStorage.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
class CodeRunnerUserIdStorage implements IStorage<String>
2424
{
2525
private static final CodeRunnerUserIdStorage instance = new CodeRunnerUserIdStorage();
26-
private String userToken;
27-
2826

2927
public static CodeRunnerUserIdStorage instance()
3028
{

src/com/backendless/rt/RTClientWithoutSocketIO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void userLoggedIn( String userToken )
2626
@Override
2727
public void userLoggedOut()
2828
{
29-
throw new NoSocketIOException();
29+
//ignore
3030
}
3131

3232
@Override

src/com/backendless/servercode/InvocationContext.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@
2828
*/
2929
public class InvocationContext extends AbstractContext
3030
{
31-
private static ThreadLocal<InvocationContext> threadLocal = new InheritableThreadLocal<>();
31+
private static ThreadLocal<InvocationContext> threadLocal = new InheritableThreadLocal<InvocationContext>(){
32+
@Override
33+
protected InvocationContext initialValue()
34+
{
35+
return new InvocationContext( );
36+
}
37+
};
3238

3339
private static InvocationContext getCurrentContext()
3440
{
@@ -46,6 +52,8 @@ private InvocationContext( String appId, String userId, String userToken, List<S
4652
this.httpHeaders = httpHeaders;
4753
}
4854

55+
private InvocationContext( ) {}
56+
4957
public static String asString()
5058
{
5159
return getCurrentContext().toString();

0 commit comments

Comments
 (0)