Using the line(s)
causes an compilation error in Release and Release (obfuscated) modes when the HandleUpload sub is a resumable sub. The compiler will produce the following output:
Please note that I'm just using this type of code because I found it in the ClientKVS code (https://www.b4x.com/android/forum/threads/b4x-cloudkvs-synchronized-key-value-store.63536/) and with an explanation for this code provided in this thread (https://www.b4x.com/android/forum/threads/if-false-then-in-cloudkvs.72453/#content). I do not use obfuscated code, but I thought to just include it in my programming practices. It may turn out not to be a bug, but just a fact that Subs handled this way may not be resumable.
I'm attaching two projects, one that causes the compilation error and one with the workaround.
Note#1: The code is just for demonstration purposes and is not really functional beyond that point.
Note#2: Under windows, the code will create a subfolder named "ScanServer" in AppData\Roaming that needs to be manually cleaned up.
B4X:
HandleUploads
If False Then CallSub(Me, "HandleUploads") 'to avoid obfuscation issues
B4J version: 5.51
Parsing code. (0.01s)
Compiling code. (0.09s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
B4J line: 66
End Sub
javac 1.8.0_112
src\b4j\example\uploader.java:287: error: incompatible types: void cannot be converted to Object
return _handleuploads();
^
1 error
Please note that I'm just using this type of code because I found it in the ClientKVS code (https://www.b4x.com/android/forum/threads/b4x-cloudkvs-synchronized-key-value-store.63536/) and with an explanation for this code provided in this thread (https://www.b4x.com/android/forum/threads/if-false-then-in-cloudkvs.72453/#content). I do not use obfuscated code, but I thought to just include it in my programming practices. It may turn out not to be a bug, but just a fact that Subs handled this way may not be resumable.
I'm attaching two projects, one that causes the compilation error and one with the workaround.
Note#1: The code is just for demonstration purposes and is not really functional beyond that point.
Note#2: Under windows, the code will create a subfolder named "ScanServer" in AppData\Roaming that needs to be manually cleaned up.