YorkShen commented on a change in pull request #1437: [WEEX-566][Android] add
jsb version file to make jsb.so can update
URL: https://github.com/apache/incubator-weex/pull/1437#discussion_r210464939
##########
File path:
android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
##########
@@ -242,6 +268,23 @@ public static void copyStartUpSo() {
} else {
WXEnvironment.extractSo();
}
+
+ Closeable w = null;
+ try {
+ if(!versionFile.exists())
+ versionFile.createNewFile();
+ FileWriter fileWriter = new FileWriter(versionFile);
+ fileWriter.write(String.valueOf(WXEnvironment.CORE_JSB_SO_VERSION));
Review comment:
If line 277 crashes, the file still be open.
FileWriter x = null
try{
x= new FileWriter
}finally{
if(x != null) x.close()
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services