479 Commits

Author SHA1 Message Date
xerial
97aa7f6fcf Update native libraries for e6a318d1a6bcd99614a547a22988ccd5aceef5be 2025-08-25 18:28:27 +00:00
Taro L. Saito
83466aa5e0
Suppress AccessController deprecation warning for Java 17+ (#682)
* Suppress AccessController deprecation warning

AccessController has been deprecated for removal since Java 17 as part of JEP 411.
Since snappy-java needs to maintain compatibility with Java 8+, we cannot remove
the AccessController.doPrivileged calls. This commit adds @SuppressWarnings("removal")
to suppress the deprecation warning while maintaining backward compatibility.

The AccessController calls are used to bypass SecurityManager restrictions when
cleaning DirectByteBuffers. In Java 17+, these calls effectively just run the
action directly since SecurityManager is being phased out.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Apply @SuppressWarnings to specific methods instead of class level

Based on review feedback, narrowed the scope of @SuppressWarnings("removal")
annotations to only the specific methods and code blocks that use AccessController,
rather than applying it at the class level. This approach:

- Reduces the scope of the suppression
- Avoids hiding other potential deprecation warnings
- Follows best practices for targeted warning suppression

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-20 11:59:59 -07:00
github-actions[bot]
e8e4cdbcfb
Update native libraries for 9bf8a09c7bce149f3f3e5f2d1e5a5be550b46aec (#543)
Co-authored-by: xerial <57538+xerial@users.noreply.github.com>
2025-07-19 14:14:39 -07:00
Samuel Fernandes
ded9f16e05
feat: add support to x64 systems using musl (#632)
* fix: add snappy support

* fix: update alpine image

* fix: update files

* fix: dockerfile building

* feat: adding alpine architecture

* feat: adding alpine architecture

* feat: reset files

* fix: remove code not used

* docs: update build.md

* fix: dockerfile name

* feat: rename osname and image arch

* feat: rename osname and image arch

* feat: add try catch block

* feat: better error message

* feat: address review comments

* Update src/main/java/org/xerial/snappy/OSInfo.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: use standard OSGi processor value for musl variant

Changed processor=x86-64-musl to processor=x86-64 in Bundle-NativeCode
as x86-64-musl is not a valid OSGi processor value. The OSGi spec only
recognizes x86-64 (and aliases: amd64, em64t, x86_64) for 64-bit x86.

Also fixed osname=Linux to osname=linux for consistency with other entries.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: correct indentation in OSInfo.java catch block

Fixed improper indentation of catch statement at line 237

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Taro L. Saito <leo@xerial.org>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 12:52:26 -07:00
Duong Nguyen
7c8a57108e
Remove the problematic catch of OOM. (#647) 2025-07-19 11:31:38 -07:00
Holger Voormann
0b125f916a
OSInfo: Update link to Java bug #8005545 (#664)
In a comment, update the link to Java bug #8005545, as the current one leads to a webpage saying: "This bug is not available."
2025-05-19 23:41:35 +00:00
Taro L. Saito
65e1ec3de1
Revert "feature: Add bit-shuffling interfaces for unshuffle with provided out…" (#640)
This reverts commit 4277fbcdc86a7f13f74053387075ecd232ac363f.
2025-02-03 21:31:50 -08:00
Rodrigo Molina
466d05f31f
Fix the scope of SnappyOutputStream.MIN_BLOCK_SIZE and SnappyOutputStream.DEFAULT_BLOCK_SIZE (#638) 2025-02-03 21:28:50 -08:00
Xing Qu
4277fbcdc8
feature: Add bit-shuffling interfaces for unshuffle with provided output array (#608) 2025-02-03 21:27:43 -08:00
PeterDubec
266126036c
Add support for IBM ppc 64 little endian (#628) 2025-02-03 21:20:59 -08:00
Antonio Muñoz
d258a4aaa0
Fixes native-image configuration: dll is called snappyjava.dll not libsnappy (#635)
Co-authored-by: Antonio Muñoz <antonio.munoz@clarity.ai>
2025-02-03 21:16:42 -08:00
Brett Okken
da1af8b260
internal: let ByteBuffer read 4 bytes as int in single call (#594) 2024-09-10 12:22:47 -07:00
Brett Okken
01368fe0d5
internal: use LambdaMetafactory to generate java.util.zip.CRC32C instances (#595)
currently we have written a lambda (turns into anonymous class) which
invokes a MethodHandle for the java.util.zip.CRC32C constructor as the
Supplier<Checksum> implementation.

This has 2 layers of misdirection. The Supplier implementation spun up
by the jvm calls the anonymous lambda class, which then calls the
MethodHandle invoke. This leads to stack traces like:

use LambdaMetafactory to generate a Supplier<Checksum> which calls the
java.util.zip.CRC32C

Co-authored-by: bo8979 <bo8979@cerner.com>
2024-09-10 12:22:02 -07:00
Tobias Soloschenko
04c68883a6
feat: add GraalVM support (#590) 2024-08-06 22:39:44 -07:00
Michael Osipov
2276a67375
Add up-to-date libraries for FreeBSD on amd64 and i386 archs (#570)
This fixes #556
2024-04-25 10:56:10 -07:00
xerial-bot
37fdbfa0b9
Update hadoop-common to 3.4.0 (#568)
* Update hadoop-common to 3.4.0

* Fix tests

* Fix for arm

---------

Co-authored-by: Taro L. Saito <leo@xerial.org>
2024-03-21 10:06:48 -07:00
Adrian Woodhead
2e7b665b0f
doc: Fix javadoc links to new url for framing_format.txt (#565) 2024-02-27 10:43:34 -08:00
Leslie Zhai
bce1ff6c8d
[experimental] Add native lib for Linux loongarch64 (#526)
* Build on loongarch64

Signed-off-by: Leslie Zhai <zhaixiang@loongson.cn>

* Remove linux-loongarch64 dockcross

* Remove linux-loongarch64 from native-all

---------

Signed-off-by: Leslie Zhai <zhaixiang@loongson.cn>
2023-12-07 13:14:12 -08:00
github-actions[bot]
08abfa4f85
Update native libraries for 4b2c1e89a42bc1fc715199974140f93cefe37d71 (#521)
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-09-26 19:22:20 -07:00
Taro L. Saito
4b2c1e89a4
win-aarch64 (fix): Fix dll name (#520) 2023-09-26 18:06:29 -07:00
github-actions[bot]
0fff1ac8f5
Update native libraries for e6d1196bc68dd76d19e915ee0124c4d42b020ef2 (#519)
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-09-26 13:34:23 -07:00
Taro L. Saito
e6d1196bc6
internal fix: Use Windows-aarch64 target name and compiler options (#518)
* internal fix: Use Windows-aarch64 target name

* Fix compiler

* Fix strip command

* Use the same compiler flags with other Windows
2023-09-26 11:08:32 -07:00
Taro L. Saito
3c67a7b51c
ppc64-le (Fix): Use an LTS-version of cross-compiler for Linux ppc64-le (#516)
* ppc64-le (Fix): Use an LTS-version of cross-compiler for Linux ppc64-le

* Update native libraries for 4764a47e75ed9cdccdf6959e7ade81770ff6f4dd (#517)

Co-authored-by: xerial <xerial@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-09-26 09:59:36 -07:00
Taro L. Saito
681b2e1b96
internal: Support JDK21 (#510)
* Test with JDK21

* Use setup-java

* fix test
2023-09-23 22:02:46 -07:00
BD
9f8c3cf742
Merge pull request from GHSA-55g7-9cwv-5qfv
* Validate chunk size to be within a configured maximum

* Add constructors to have max size configurable

* Code cleanup

* Use 512MB for consistency

---------

Co-authored-by: Taro L. Saito <leo@xerial.org>
2023-09-23 15:55:18 -07:00
github-actions[bot]
1f07c3182c
Update native libraries for f2e97f27be0dc6c691369040ba8a673bface484c (#503)
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-09-22 14:10:14 -07:00
Taro L. Saito
f2e97f27be
feature: Upgrade the internal snappy version to 1.1.10 (1.1.8 was wrongly used before) (#508)
* Upgrade to snappy 1.1.10 binary

* Use a specific snappy version

* Use cmake 3.16.x for mac-x86_64

* Add -ftemplate-depth for Mac x86_64 build
2023-09-22 13:41:36 -07:00
github-actions[bot]
25261c457e
Update native libraries for de674f6d73b534d89f2452aee190a0321356dceb (#482)
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-07-21 10:31:50 -07:00
github-actions[bot]
119cf4ceed
Update native libraries for 33b6510b6bee303891d070ffc09a40bfc40bc71c (#475)
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-07-11 10:06:06 -07:00
aidanchiu1112
737f3973ff
CI Fix to Prevent Checks Dealing with Large Array Sizes (#459)
* Fix spacing with comment

* Updated code

* Test: Added Assume catches for each failed tests

* Added and implemented separate method to check if System CI is false

* Added a null check to ensure assumingCIIsFalse() method runs locally as well

* Changed assumeTrue to assumeFalse
2023-06-14 14:51:14 -07:00
aidanchiu1112
d0042551e4
Merge pull request from GHSA-fjpj-2g6w-x25r
* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception

* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception

* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception

* improved error messages by adding new error enum INPUT_TOO_LARGE in SnappyErrorCode.java, and added happy and sad cases in SnappyTest.java

* fixed mispelling: validArrayInputLength --> isInvalidArrayInputLength

* switched SnappyError into ILLEGAL_ARGUMENT in SnappyErrorCode.java and Snappy.java and fixed a typo in error comment

* Fix buffer size boundary tests

* Remove negative array size tests

* updated comments for unit test

---------

Co-authored-by: Taro L. Saito <leo@xerial.org>
2023-06-14 11:06:30 -07:00
aidanchiu1112
3bf67857fc
Merge pull request from GHSA-qcwq-55hx-v3vh
* asserted chunksize should be in the bounds of 0-java.outofmmeoryexception

* asserted chunksize should be in the bounds of 0-java.outofmmeoryexception

* https://github.com/xerial/snappy-java-ghsa-qcwq-55hx-v3vh/pull/2

* advisory-fix-3

* added and changed method name for happy and sad cases in SnappyTest.java

* removed expected error for happy case in unit testing

* added another unit test case in SnappyTest.java and fixed comments in SnappyInputStream.java

* switched SnappyError to INVALID_CHUNK_SIZE

* Updated unit tests

* Resolved conflicts with another PR merge
2023-06-14 10:49:52 -07:00
aidanchiu1112
820e2e074c
Merge pull request from GHSA-pqr6-cmr2-h8hf
* Fixed integer overflow by checking if multiplication result is smaller than original value

* Fixed integer overflow by checking if multiplication result is smaller than original value

* Fixed integer overflow by checking if multiplication result is smaller than original value

* imporved error messages and added happy and sad cases for unit test in SnappyTest.java

* switched SnappyError into ILLEGAL_ARGUMENT in SnappyErrorCode.java and Snappy.java

* wrote new and updated unit test methods

* updated comments in SnappyTest.java

* Fixed and updated unit tests in SnappyTest.java
2023-06-14 10:36:02 -07:00
github-actions[bot]
256691eb1e
Update native libraries for 2737ea41c48e9ac12caf342191e4756626d31585 (#450)
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-05-24 16:48:28 -07:00
github-actions[bot]
2737ea41c4
Update native libraries for 38bf5689dc3286071570b1a5540e2c0326610cc3 (#445)
Co-authored-by: xerial <xerial@users.noreply.github.com>
2023-05-24 15:04:57 -07:00
Taro L. Saito
fd504023f1
Feature: Android arm64 support (#442)
* Feature: Support Linux android-arm64(aarch64)

* Add dockcross script

* Add native lib

* Add --no-cache for CI

* Revert "Add --no-cache for CI"

This reverts commit 0f2f05ba8eb88d178ed1e8a1a588b3419e58cd51.

* Add docker clean process

* Update native libraries

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-23 15:05:31 -07:00
Taro L. Saito
ad2e2d7378
Feature: Use LTS cross-compiler for Linux armv6/armv7 to use glibc 2.28 (#440)
* Feature: Use LTS cross-compiler for Linux armv6/armv7 to use glibc 2.28

* Use softfp for armv7

* Fix armv6 config

* Update native libraries

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-23 13:20:44 -07:00
Taro L. Saito
86ebb48261
Add a new native lib for Linux-arm (#436)
* use lts image for glibc compatibility

fixes #417

* Update dockcross-aarch64

* Update native libraries

---------

Co-authored-by: NersesAM <1935500+NersesAM@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-23 10:19:22 -07:00
Taro L. Saito
ccf61c1d06
Upgrade to Snappy 1.1.10 (#431)
* Upgrade to Snappy 1.1.10

* Update native libraries

* Add Mac silicon binary

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-16 11:44:01 -07:00
jzl
d72a2bc805
Fix: workaround io error 'stream closed' caused by bugs in URLClassloader (#412) 2023-05-16 11:06:13 -07:00
Ludovic Henry
3c74e292ab
Add Linux-riscv64 support (#396) 2023-02-15 01:24:42 -08:00
Taro L. Saito
39160ac5d2
Fix java8 compatibility (#390)
* ByteBuffer.limit() compiled with JDK9+ shows  java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer; error in JDK8
* Set --release 8 JDK option
* Do not use --release 8 option in JDK8
2023-01-31 10:35:03 -08:00
Taro L. Saito
92b6c9e4d7
Remove snappy debug assertion with -DNDEBUG c++ flag (#386)
* Remoe snappy debug assertion with -DNDEBUG c++ flag

* Update native libraries

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-28 08:42:50 -08:00
Ashley Taylor
34fa6e9e65
Add uncompressDoubleArray that takes offset and length (#307) 2023-01-28 00:06:45 -08:00
Taro L. Saito
2bc841b5da
Remove pure-java support (#381)
* Remove pure-java snappy support

* Remove pure-java support description
2023-01-28 00:05:11 -08:00
Taro L. Saito
cecbb0d1e2
Build native library for Snappy 1.1.9 (#380)
* Fix dependency

* Add checkout step

* Remove tty option

* Fix compiler prefixes

* Fix arm compiler names

* Reorder for debug

* Fix

* Update dockcross-arm-android

* Remove system include

* Fix strip path

* Update native libraries

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-27 23:54:10 -08:00
Taro L. Saito
a794389cf2
Upgrade to snappy-1.1.9 (#379)
* Upgrade to snappy-1.1.9

* Add sbt-dynver

* Fix script so as not to requrie perl

* Upgrade bitshuffle to 0.5.1

* use bitshuffle 0.3.4, which can be compiled without errors

* Add native library build workflow
2023-01-27 22:33:12 -08:00
lehnerj
8ecc597a0e
Fixes xerial/snappy-java#280 Typo - java.io.tmpdir not java.io.tempdir (#325)
Co-authored-by: Josef Lehner <josef1207@googlemail.com>
2022-06-21 20:19:42 +09:00
Mikhail Zhukov
78354b69c7
#302 Fixed running snappy-java as OSGi bundle on Apple Silicon (M1 Pro) (#303)
Co-authored-by: Mikhail Zhukov <zh.muxa@gmail.com>
2022-05-17 23:31:48 -07:00
Taro L. Saito
1d01f870a1
Upgrade sbt to 1.5.6 (#301) 2021-12-09 23:08:39 -08:00