diff --git a/CHANGES.md b/CHANGES.md index b4ad1a9c3..e43f50c94 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,8 @@ # Changes -###### cordova-sqlite-legacy-express-core 1.0.3-pre02 +###### cordova-sqlite-legacy-express-core 1.0.3 +- Resolve Java 6/7/8 concurrent map compatibility issue reported in litehelpers/Cordova-sqlite-storage#726, THANKS to pointer by @NeoLSN (Jason Yang/楊朝傑) in litehelpers/Cordova-sqlite-storage#727. - selfTest database cleanup do not ignore close or delete error on any platforms ###### cordova-sqlite-legacy-express-core 1.0.2 diff --git a/README.md b/README.md index 6c1367a8f..cbf649a96 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ Use the `location` or `iosDatabaseLocation` option in `sqlitePlugin.openDatabase ## Announcements +- Resolved Java 6/7/8 concurrent map compatibility issue reported in [litehelpers/Cordova-sqlite-storage#726](https://github.com/litehelpers/Cordova-sqlite-storage/issues/726), THANKS to pointer by [@NeoLSN (Jason Yang/楊朝傑)](https://github.com/NeoLSN) in [litehelpers/Cordova-sqlite-storage#727](https://github.com/litehelpers/Cordova-sqlite-storage/issues/727). - Fixed iOS/macOS platform version to use [PSPDFThreadSafeMutableDictionary.m](https://gist.github.com/steipete/5928916) to avoid threading issue ref: [litehelpers/Cordova-sqlite-storage#716](https://github.com/litehelpers/Cordova-sqlite-storage/issues/716) - Resolved transaction problem after window.location (page) change with possible data loss ref: [litehelpers/Cordova-sqlite-storage#666](https://github.com/litehelpers/Cordova-sqlite-storage/issues/666) - [brodybits / cordova-sqlite-test-app](https://github.com/brodybits/cordova-sqlite-test-app) project is a CC0 (public domain) starting point (NOTE that this plugin must be added) and may also be used to reproduce issues with this plugin. diff --git a/package.json b/package.json index aeea63637..c63251245 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-sqlite-legacy-express-core", - "version": "1.0.3-pre02", + "version": "1.0.3", "description": "Native interface to SQLite for PhoneGap/Cordova (legacy express core version)", "cordova": { "id": "cordova-sqlite-legacy-express-core", diff --git a/plugin.xml b/plugin.xml index e7b3ecbdf..11689aa60 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.0.3"> Cordova sqlite storage plugin - legacy express core version diff --git a/src/android/io/sqlc/SQLitePlugin.java b/src/android/io/sqlc/SQLitePlugin.java index 9ad6d49e4..f4fb74cf8 100755 --- a/src/android/io/sqlc/SQLitePlugin.java +++ b/src/android/io/sqlc/SQLitePlugin.java @@ -8,15 +8,18 @@ import android.annotation.SuppressLint; -import android.util.Base64; import android.util.Log; import java.io.File; + import java.lang.IllegalArgumentException; import java.lang.Number; -import java.util.concurrent.ConcurrentHashMap; + +import java.util.Map; import java.util.concurrent.BlockingQueue; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.LinkedBlockingQueue; + import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -27,19 +30,24 @@ import org.json.JSONException; import org.json.JSONObject; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.IOException; - public class SQLitePlugin extends CordovaPlugin { /** * Multiple database runner map (static). - * NOTE: no public static accessor to db (runner) map since it would not work with db threading. - * FUTURE put DBRunner into a public class that can provide external accessor. + * + * NOTE: no public static accessor to db (runner) map since it is not + * expected to work properly with db threading. + * + * FUTURE TBD put DBRunner into a public class that can provide external accessor. + * + * ADDITIONAL NOTE: Storing as Map to avoid portabiity issue + * between Java 6/7/8 as discussed in: + * https://gist.github.com/AlainODea/1375759b8720a3f9f094 + * + * THANKS to @NeoLSN (Jason Yang/楊朝傑) for giving the pointer in: + * https://github.com/litehelpers/Cordova-sqlite-storage/issues/727 */ - static ConcurrentHashMap dbrmap = new ConcurrentHashMap(); + static Map dbrmap = new ConcurrentHashMap(); /** * NOTE: Using default constructor, no explicit constructor.