Compare commits

...

2 Commits

Author SHA1 Message Date
dependabot[bot] a63c1e18ca chore(deps-dev): bump tmp from 0.2.5 to 0.2.6 (#1945)
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.6.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.5...v0.2.6)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-28 15:27:23 +02:00
Manuel Beck 661fadd083 doc(CordovaPreferences): Improve documentation for using Long.decode instead of Integer.decode (#1943)
- Document why Integer.decode cannot be used for hex values when thy exceed Integer.MAX_VALUE when parsed as positive number and Long.decode has to be used instead
2026-05-28 15:26:52 +02:00
2 changed files with 7 additions and 4 deletions
@@ -74,7 +74,10 @@ public class CordovaPreferences {
name = name.toLowerCase(Locale.ENGLISH);
String value = prefs.get(name);
if (value != null) {
// Use Integer.decode() can't handle it if the highest bit is set.
// Some 32-bit hex values (for example, 0x80000000) are valid int bit patterns
// but exceed Integer.MAX_VALUE when read as positive numbers. Integer.decode()
// rejects such values with NumberFormatException, so decode as long first and
// cast to int to preserve the intended 32-bit value.
return (int)(long)Long.decode(value);
}
return defaultValue;
+3 -3
View File
@@ -4139,9 +4139,9 @@
}
},
"node_modules/tmp": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
"integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.6.tgz",
"integrity": "sha512-5sJPdPjfI5Kx+qbrDesxkglRBxW//g7hCsqspEjwkewGvBMGIKMOTKzLt1hFVJzyadba3lDUN20O9qhvbQUSTA==",
"dev": true,
"license": "MIT",
"engines": {