1221 Commits

Author SHA1 Message Date
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
Taro L. Saito
b44579425f
chore: update release CI to use Java 21 (#681)
Update both release.yml and snapshot.yml workflows to use Java 21 instead of Java 11 for building releases and snapshots.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-20 11:37:44 -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
Taro L. Saito
9bf8a09c7b
chore: update CI workflows to use main branch instead of master (#680)
- Remove master branch references from build-native.yml
- Update snapshot.yml to trigger on main branch
- Remove master branch references from test.yml

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

Co-authored-by: Claude <noreply@anthropic.com>
v1.1.10.8
2025-07-19 13:40:49 -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
Taro L. Saito
a317643ef9
Update scalafmt configuration for Scala 3 (#679)
- Change dialect from scala213source3 to scala3
- Add StandardConvention project layout
- Reduce maxColumn from 180 to 100 for better readability
- Add Scala 3 specific rewrite rules for modern syntax
- Configure newlines and docstring formatting

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 11:46:59 -07:00
Taro L. Saito
561320e825 Upgrade Scala to 3.7.1
Update Scala version from 2.12.11 to 3.7.1. Scala is only used for testing dependencies (airframe-log) and build tooling, not for main application code. All tests pass with the new version.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 11:39:54 -07:00
Duong Nguyen
7c8a57108e
Remove the problematic catch of OOM. (#647) 2025-07-19 11:31:38 -07:00
Taro L. Saito
626b4dd765
Add Java 24 to CI test matrix (#678)
* Replace setup-scala with setup-java in snapshot workflow

Updates snapshot.yml to use actions/setup-java@v4 instead of olafurpg/setup-scala@v14 for better consistency with other workflows and official GitHub Actions.

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

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

* Add Java 24 to CI test matrix

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 11:27:24 -07:00
Taro L. Saito
e8e8ec79f6
Replace setup-scala with setup-java in snapshot workflow (#677)
Updates snapshot.yml to use actions/setup-java@v4 instead of olafurpg/setup-scala@v14 for better consistency with other workflows and official GitHub Actions.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 11:22:05 -07:00
Taro L. Saito
6d25a37cbe
Migrate to sonaRelease command for publishing (#676)
* Update CLAUDE.md development workflow

- Fix typo in 'commit'
- Add PR guidelines and common development tasks
- Update native code build command to use 'make clean-native native'

* Update Snappy version to 1.2.2 and fix test compatibility

- Update SNAPPY_VERSION from 1.1.10 to 1.2.2 in VERSION file
- Fix SnappyOutputStreamTest expected compression size for aarch64
  (90277 bytes) to match improved compression ratio in Snappy 1.2.2
- All tests pass with new version

Fixes #662

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

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

* Update CI to trigger tests on Makefile and VERSION changes

- Add Makefile* pattern to catch all Makefile variants
- Add **/VERSION pattern to catch VERSION files anywhere in repo
- Ensures tests run when native build configuration or versions change

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

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

* Migrate to sonaRelease command for publishing

- Remove sbt-sonatype plugin dependency
- Update to sbt 1.11.3 for built-in Sonatype support
- Replace sonatypePublishToBundle with direct Sonatype URLs
- Add release process documentation to CLAUDE.md
- Simplify publishing workflow using built-in sbt functionality

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

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

* Update publishTo to use Central Portal URLs and localStaging

- Use https://central.sonatype.com/repository/maven-snapshots/ for snapshots
- Use localStaging.value for releases to support sonaRelease workflow

* Revert unintended changes to keep PR focused on sonaRelease migration

- Revert SNAPPY_VERSION upgrade (1.2.2 -> 1.1.10)
- Revert SnappyOutputStreamTest compression ratio change
- Revert native library binary update
- Revert CI workflow trigger additions

These changes should be in separate PRs, not part of the publishing migration.

* Update release.yml to use sonaRelease command

- Replace sonatypeBundleRelease with sonaRelease
- Update environment variable names to standard SONATYPE_USERNAME/PASSWORD
- Aligns with sbt's built-in Sonatype publishing workflow

* Update snapshot.yml environment variable names

- Update SONATYPE_USER to SONATYPE_USERNAME
- Update SONATYPE_PASS to SONATYPE_PASSWORD
- Aligns with standard naming used in sonaRelease workflow

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 11:16:45 -07:00
xerial-bot
7fb9221328
Update sbt, scripted-plugin to 1.11.3 (#674) 2025-07-19 10:43:49 -07:00
xerial-bot
370a843e76
Update sbt-dynver to 5.1.1 (#669) 2025-07-19 10:43:40 -07:00
xerial-bot
89891ed926
Update airframe-log to 2025.1.14 (#668) 2025-07-19 10:43:31 -07:00
Taro L. Saito
af7f7b32d7
Update CLAUDE.md development workflow (#675)
* Update CLAUDE.md development workflow

- Fix typo in 'commit'
- Add PR guidelines and common development tasks
- Update native code build command to use 'make clean-native native'

* Update code formatting command to scalafmtAll

- Change from scalafmtCheckAll to scalafmtAll for actual formatting
- scalafmtAll applies formatting changes instead of just checking
2025-07-19 09:46:42 -07:00
Taro L. Saito
b8cb2bf1a9 Update CLAUDE.md development workflow
- Fix typo in 'commit'
- Add PR guidelines and common development tasks
- Update native code build command to use 'make clean-native native'
2025-07-19 09:17:29 -07:00
Taro L. Saito
066b9af9c2
Skip CI tests for non-code changes (#673)
* Skip CI tests for non-code changes

- Add dorny/paths-filter to detect code changes
- Run actual tests only when code/build files change
- Add skip jobs to satisfy required status checks
- Reduces CI time for documentation-only changes

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

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

* Add .scalafmt.conf to code change detection

- Ensures code format check runs when scalafmt config changes
- Important for maintaining consistent code formatting rules

* Add sbt launcher scripts to code change detection

- Includes sbt and sbt.bat in path filters
- Ensures tests run when build scripts are modified

* Remove test documentation file

- No longer needed for PR demonstration
- PR description already explains the changes

* Remove test-jdk skip jobs

- Remove unnecessary skip jobs for JDK tests
- Keep only code_format_skip for required status check

* Remove all skip jobs

- Remove code_format_skip job
- Simplify workflow to only run tests when code changes detected

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 09:05:07 -07:00
Taro L. Saito
57def01ca4
Add CLAUDE.md for Claude Code guidance (#672)
* Add CLAUDE.md for Claude Code guidance

This file provides essential guidance for Claude Code when working with
the snappy-java repository, including:
- Common build and test commands
- High-level architecture overview
- Platform support details
- Important implementation notes

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

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

* Remove outdated findbugs and jacoco commands

* Fix test command for debug logging

* Clarify test frameworks: AirSpec for Scala, JUnit for Java

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 08:50:10 -07:00
xerial-bot
fcd3a5b4b4
Update scalafmt-core to 3.9.4 (#655) 2025-07-19 08:02:36 -07:00
xerial-bot
c38b5a01e7
Update plexus-classworlds to 2.9.0 (#659) 2025-07-19 08:02:19 -07:00
xerial-bot
494d053019
Update sbt, scripted-plugin to 1.10.11 (#656) 2025-07-19 08:02:09 -07:00
Jacob B.P.
11e021ec05
Change -source and -target parameters to Java 8 (#663)
This will allow snappy-java to build with JDK 21.

Resolves #532
2025-07-19 08:00:47 -07:00
Sam
65530b055b
Added gradle dep example to readme (#665) 2025-07-19 08:00:00 -07:00
xerial-bot
e91365a905
Update sbt-scalafmt to 2.5.5 (#670) 2025-07-19 07:59:46 -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
xerial-bot
b9a5d5f573
Update scalafmt-core to 3.8.6 (#636) 2025-02-03 21:17:20 -08:00
xerial-bot
42e5928a28
Update sbt-scalafmt to 2.5.4 (#633) 2025-02-03 21:17:03 -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
xerial-bot
2abbbc7fbf
Update airframe-log to 2025.1.1 (#639) 2025-02-03 21:11:53 -08:00
xerial-bot
ec23d7c611
Update hadoop-common to 3.4.1 (#611) 2025-01-08 11:46:21 -08:00
xerial-bot
192e0ee286
Update sbt to 1.10.7 (#624) 2025-01-08 11:46:12 -08:00
xerial-bot
dfbf67a4cb
Update sbt-sonatype to 3.12.2 (#609) 2024-12-19 16:16:05 -08:00
xerial-bot
f6b188896c
Update sbt to 1.10.6 (#619) 2024-12-19 09:33:33 -08:00
xerial-bot
1fe7685ae7
Update sbt-pgp to 2.3.1 (#622) 2024-12-19 09:33:16 -08:00
xerial-bot
3b2138cc7c
Update airframe-log to 24.12.2 (#623) 2024-12-19 09:33:08 -08:00
xerial-bot
9c73c6e6a2
Update sbt-dynver to 5.1.0 (#610) 2024-11-15 12:15:29 -08:00
xerial-bot
595c6d4a11
Update airframe-log to 24.11.0 (#617) 2024-11-15 12:15:13 -08:00
xerial-bot
8a32b3c6cb
Update sbt to 1.10.5 (#615) 2024-11-12 20:40:30 -08:00
xerial-bot
85966bbb1b
Update sbt-pgp to 2.3.0 (#602) 2024-10-08 14:38:59 -07:00
xerial-bot
08c44a000f
Update airframe-log to 24.9.3 (#601) 2024-10-08 14:38:51 -07:00
xerial-bot
ac5d2cb3e1
Update sbt to 1.10.2 (#598) 2024-10-08 14:38:44 -07:00
xerial-bot
899b9b2cdb
Update sbt-sonatype to 3.11.3 (#592) v1.1.10.7 2024-09-10 12:22:59 -07:00
Brett Okken
da1af8b260
internal: let ByteBuffer read 4 bytes as int in single call (#594) 2024-09-10 12:22:47 -07:00
dependabot[bot]
1af05fee67
Bump peter-evans/create-pull-request from 6 to 7 (#596)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 12:22:31 -07:00
xerial-bot
5290e26ad9
Update airframe-log to 24.9.0 (#597) 2024-09-10 12:22:22 -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