summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2018-05-14 16:23:55 +0300
committerAndré Klitzing <aklitzing@gmail.com>2018-05-14 16:07:41 +0000
commitf148580e7299a68ca5aa50cba7fbcd098f8e907f (patch)
treec6cb91d11aeaeabc5d538a6d4aa3198f98d8e1ee /src
parent2fc274ddb50171b1ef9f7220848aa135a78b5bdb (diff)
Fix Android loader
Invalid syntax due to missing closing brackets and exception not being handled when calling .close() on a stream. Change-Id: If8f191fbc44fe1b031fd86abff5163bca434156a Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
index 531802959c..fc3d7e04ce 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
@@ -361,7 +361,7 @@ public abstract class QtLoader {
inputStream = assetsManager.open(source);
outputStream = new FileOutputStream(destinationFile);
copyFile(inputStream, outputStream);
- catch (Exception e) {
+ } catch (Exception e) {
e.printStackTrace();
} finally {
if (inputStream != null)
@@ -392,7 +392,7 @@ public abstract class QtLoader {
inputStream = new FileInputStream(source);
outputStream = new FileOutputStream(destinationFile);
copyFile(inputStream, outputStream);
- catch (Exception e) {
+ } catch (Exception e) {
e.printStackTrace();
} finally {
if (inputStream != null)
@@ -416,8 +416,13 @@ public abstract class QtLoader {
} catch (Exception e) {
e.printStackTrace();
} finally {
- if (inputStream != null)
- inputStream.close();
+ if (inputStream != null) {
+ try {
+ inputStream.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
}
@@ -456,7 +461,7 @@ public abstract class QtLoader {
try {
outputStream = new DataOutputStream(new FileOutputStream(versionFile));
outputStream.writeLong(packageVersion);
- catch (Exception e) {
+ } catch (Exception e) {
e.printStackTrace();
} finally {
if (outputStream != null)