Skip to content

Next fixes#300

Closed
hrstoyanov wants to merge 40 commits intoArcadeData:mainfrom
hrstoyanov:next_fixes
Closed

Next fixes#300
hrstoyanov wants to merge 40 commits intoArcadeData:mainfrom
hrstoyanov:next_fixes

Conversation

@hrstoyanov
Copy link
Copy Markdown

What does this PR do?
This PR fixes some code deficiencies that were uncovered by an automated tool (IntelliJ Code Inpspector)

Motivation
Better Java Code.

Additional Notes
Please cherry-pick and review the suggested changes carefully. I tried to avoid fixing auto-generated classes.

result.put(id, 1);
else
result.put(id, key + 1);
result.merge(id, 1, Integer::sum);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even know the existence of merge :-)

@lvca
Copy link
Copy Markdown
Member

lvca commented Feb 1, 2022

I merged most of the single commits. When you have time, please rebase your branch and see if anything is still missing.

@lvca lvca self-assigned this Feb 1, 2022
@lvca lvca added the enhancement New feature or request label Feb 1, 2022
@lvca lvca added this to the 22.1.3 milestone Feb 1, 2022
@lvca lvca closed this Feb 1, 2022
@hrstoyanov
Copy link
Copy Markdown
Author

@lvca will do a rebase on top of the latest main branch before submitting patches. Will also submit smaller PRs.

Thanks you!

@lvca
Copy link
Copy Markdown
Member

lvca commented Feb 1, 2022

Thank you @hrstoyanov

mergify bot added a commit that referenced this pull request Mar 29, 2026
Bumps the github-actions group with 3 updates: [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action), [github/codeql-action](https://github.com/github/codeql-action) and [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions).
Updates `anthropics/claude-code-action` from 1.0.76 to 1.0.82
Release notes

*Sourced from [anthropics/claude-code-action's releases](https://github.com/anthropics/claude-code-action/releases).*

> v1.0.82
> -------
>
> **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.82>
>
> v1.0.81
> -------
>
> **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.81>
>
> v1.0.80
> -------
>
> **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.80>
>
> v1.0.79
> -------
>
> **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.79>
>
> v1.0.78
> -------
>
> **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.78>
>
> v1.0.77
> -------
>
> Subprocess environment scrubbing for untrusted-input workflows
> --------------------------------------------------------------
>
> Workflows that configure `allowed_non_write_users` now automatically get `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1`, which makes Claude Code (v2.1.79+) strip Anthropic and cloud provider credentials from the environment of subprocesses it spawns (Bash tool, hooks, MCP stdio servers). The parent Claude process keeps these vars for its own API calls — only child subprocess environments are scrubbed.
>
> **Why:** Workflows that process untrusted input (issue triage, PR review from non-write users) are exposed to prompt injection. A malicious issue body could trick Claude into running a Bash command that reads `$ANTHROPIC_API_KEY` via shell expansion and leaks it through an observable side channel. Scrubbing the subprocess environment removes the read primitive entirely.
>
> **What's scrubbed:** Anthropic auth tokens, cloud provider credentials, GitHub Actions OIDC and runtime tokens, OTEL auth headers.
>
> **What's kept:** `GITHUB_TOKEN` / `GH_TOKEN` — so wrapper scripts can still call the GitHub API.
>
> **Opt out:** Set `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB: "0"` at the job or step level if your workflow legitimately needs a subprocess to inherit these credentials.
>
> **No action required** for most users — if you've configured `allowed_non_write_users`, scrubbing is now on automatically. If your workflow breaks because a subprocess expected inherited credentials, re-inject them explicitly (e.g., via MCP server `env:` config) or use the opt-out.
>
> What's Changed
> --------------
>
> * Auto-set subprocess env scrub when allowed\_non\_write\_users is configured by [`@​OctavianGuzu`](https://github.com/OctavianGuzu) in [anthropics/claude-code-action#1093](https://redirect.github.com/anthropics/claude-code-action/pull/1093)
>
> **Full Changelog**: <anthropics/claude-code-action@v1.0.76...v1.0.77>


Commits

* [`88c168b`](anthropics/claude-code-action@88c168b) chore: bump Claude Code to 2.1.87 and Agent SDK to 0.2.87
* [`e7b588b`](anthropics/claude-code-action@e7b588b) chore: bump Claude Code to 2.1.86 and Agent SDK to 0.2.86
* [`094bd24`](anthropics/claude-code-action@094bd24) chore: bump Claude Code to 2.1.85 and Agent SDK to 0.2.85
* [`3ac52d0`](anthropics/claude-code-action@3ac52d0) chore: bump Claude Code to 2.1.84 and Agent SDK to 0.2.84
* [`0ee1bee`](anthropics/claude-code-action@0ee1bee) chore: bump Claude Code to 2.1.83 and Agent SDK to 0.2.83
* [`ff9acae`](anthropics/claude-code-action@ff9acae) Auto-set subprocess env scrub when allowed\_non\_write\_users is configured ([#1093](https://redirect.github.com/anthropics/claude-code-action/issues/1093))
* See full diff in [compare view](anthropics/claude-code-action@6062f37...88c168b)
  
Updates `github/codeql-action` from 4.34.1 to 4.35.1
Release notes

*Sourced from [github/codeql-action's releases](https://github.com/github/codeql-action/releases).*

> v4.35.1
> -------
>
> * Fix incorrect minimum required Git version for [improved incremental analysis](https://redirect.github.com/github/roadmap/issues/1158): it should have been 2.36.0, not 2.11.0. [#3781](https://redirect.github.com/github/codeql-action/pull/3781)
>
> v4.35.0
> -------
>
> * Reduced the minimum Git version required for [improved incremental analysis](https://redirect.github.com/github/roadmap/issues/1158) from 2.38.0 to 2.11.0. [#3767](https://redirect.github.com/github/codeql-action/pull/3767)
> * Update default CodeQL bundle version to [2.25.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.1). [#3773](https://redirect.github.com/github/codeql-action/pull/3773)


Changelog

*Sourced from [github/codeql-action's changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md).*

> CodeQL Action Changelog
> =======================
>
> See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
>
> [UNRELEASED]
> ------------
>
> No user facing changes.
>
> 4.35.1 - 27 Mar 2026
> --------------------
>
> * Fix incorrect minimum required Git version for [improved incremental analysis](https://redirect.github.com/github/roadmap/issues/1158): it should have been 2.36.0, not 2.11.0. [#3781](https://redirect.github.com/github/codeql-action/pull/3781)
>
> 4.35.0 - 27 Mar 2026
> --------------------
>
> * Reduced the minimum Git version required for [improved incremental analysis](https://redirect.github.com/github/roadmap/issues/1158) from 2.38.0 to 2.11.0. [#3767](https://redirect.github.com/github/codeql-action/pull/3767)
> * Update default CodeQL bundle version to [2.25.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.1). [#3773](https://redirect.github.com/github/codeql-action/pull/3773)
>
> 4.34.1 - 20 Mar 2026
> --------------------
>
> * Downgrade default CodeQL bundle version to [2.24.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.3) due to issues with a small percentage of Actions and JavaScript analyses. [#3762](https://redirect.github.com/github/codeql-action/pull/3762)
>
> 4.34.0 - 20 Mar 2026
> --------------------
>
> * Added an experimental change which disables TRAP caching when [improved incremental analysis](https://redirect.github.com/github/roadmap/issues/1158) is enabled, since improved incremental analysis supersedes TRAP caching. This will improve performance and reduce Actions cache usage. We expect to roll this change out to everyone in March. [#3569](https://redirect.github.com/github/codeql-action/pull/3569)
> * We are rolling out improved incremental analysis to C/C++ analyses that use build mode `none`. We expect this rollout to be complete by the end of April 2026. [#3584](https://redirect.github.com/github/codeql-action/pull/3584)
> * Update default CodeQL bundle version to [2.25.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.0). [#3585](https://redirect.github.com/github/codeql-action/pull/3585)
>
> 4.33.0 - 16 Mar 2026
> --------------------
>
> * Upcoming change: Starting April 2026, the CodeQL Action will skip collecting file coverage information on pull requests to improve analysis performance. File coverage information will still be computed on non-PR analyses. Pull request analyses will log a warning about this upcoming change. [#3562](https://redirect.github.com/github/codeql-action/pull/3562)
>
>   To opt out of this change:
>
>   + **Repositories owned by an organization:** Create a custom repository property with the name `github-codeql-file-coverage-on-prs` and the type "True/false", then set this property to `true` in the repository's settings. For more information, see [Managing custom properties for repositories in your organization](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). Alternatively, if you are using an advanced setup workflow, you can set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true` in your workflow.
>   + **User-owned repositories using default setup:** Switch to an advanced setup workflow and set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true` in your workflow.
>   + **User-owned repositories using advanced setup:** Set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true` in your workflow.
> * Fixed [a bug](https://redirect.github.com/github/codeql-action/issues/3555) which caused the CodeQL Action to fail loading repository properties if a "Multi select" repository property was configured for the repository. [#3557](https://redirect.github.com/github/codeql-action/pull/3557)
> * The CodeQL Action now loads [custom repository properties](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization) on GitHub Enterprise Server, enabling the customization of features such as `github-codeql-disable-overlay` that was previously only available on GitHub.com. [#3559](https://redirect.github.com/github/codeql-action/pull/3559)
> * Once [private package registries](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries) can be configured with OIDC-based authentication for organizations, the CodeQL Action will now be able to accept such configurations. [#3563](https://redirect.github.com/github/codeql-action/pull/3563)
> * Fixed the retry mechanism for database uploads. Previously this would fail with the error "Response body object should not be disturbed or locked". [#3564](https://redirect.github.com/github/codeql-action/pull/3564)
> * A warning is now emitted if the CodeQL Action detects a repository property whose name suggests that it relates to the CodeQL Action, but which is not one of the properties recognised by the current version of the CodeQL Action. [#3570](https://redirect.github.com/github/codeql-action/pull/3570)
>
> 4.32.6 - 05 Mar 2026
> --------------------
>
> * Update default CodeQL bundle version to [2.24.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.3). [#3548](https://redirect.github.com/github/codeql-action/pull/3548)
>
> 4.32.5 - 02 Mar 2026
> --------------------
>
> * Repositories owned by an organization can now set up the `github-codeql-disable-overlay` custom repository property to disable [improved incremental analysis for CodeQL](https://redirect.github.com/github/roadmap/issues/1158). First, create a custom repository property with the name `github-codeql-disable-overlay` and the type "True/false" in the organization's settings. Then in the repository's settings, set this property to `true` to disable improved incremental analysis. For more information, see [Managing custom properties for repositories in your organization](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). This feature is not yet available on GitHub Enterprise Server. [#3507](https://redirect.github.com/github/codeql-action/pull/3507)
> * Added an experimental change so that when [improved incremental analysis](https://redirect.github.com/github/roadmap/issues/1158) fails on a runner — potentially due to insufficient disk space — the failure is recorded in the Actions cache so that subsequent runs will automatically skip improved incremental analysis until something changes (e.g. a larger runner is provisioned or a new CodeQL version is released). We expect to roll this change out to everyone in March. [#3487](https://redirect.github.com/github/codeql-action/pull/3487)
> * The minimum memory check for improved incremental analysis is now skipped for CodeQL 2.24.3 and later, which has reduced peak RAM usage. [#3515](https://redirect.github.com/github/codeql-action/pull/3515)

... (truncated)


Commits

* [`c10b806`](github/codeql-action@c10b806) Merge pull request [#3782](https://redirect.github.com/github/codeql-action/issues/3782) from github/update-v4.35.1-d6d1743b8
* [`c5ffd06`](github/codeql-action@c5ffd06) Update changelog for v4.35.1
* [`d6d1743`](github/codeql-action@d6d1743) Merge pull request [#3781](https://redirect.github.com/github/codeql-action/issues/3781) from github/henrymercer/update-git-minimum-version
* [`65d2efa`](github/codeql-action@65d2efa) Add changelog note
* [`2437b20`](github/codeql-action@2437b20) Update minimum git version for overlay to 2.36.0
* [`ea5f719`](github/codeql-action@ea5f719) Merge pull request [#3775](https://redirect.github.com/github/codeql-action/issues/3775) from github/dependabot/npm\_and\_yarn/node-forge-1.4.0
* [`45ceeea`](github/codeql-action@45ceeea) Merge pull request [#3777](https://redirect.github.com/github/codeql-action/issues/3777) from github/mergeback/v4.35.0-to-main-b8bb9f28
* [`24448c9`](github/codeql-action@24448c9) Rebuild
* [`7c51060`](github/codeql-action@7c51060) Update changelog and version after v4.35.0
* [`b8bb9f2`](github/codeql-action@b8bb9f2) Merge pull request [#3776](https://redirect.github.com/github/codeql-action/issues/3776) from github/update-v4.35.0-0078ad667
* Additional commits viewable in [compare view](github/codeql-action@3869755...c10b806)
  
Updates `zgosalvez/github-actions-ensure-sha-pinned-actions` from 5.0.3 to 5.0.4
Release notes

*Sourced from [zgosalvez/github-actions-ensure-sha-pinned-actions's releases](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases).*

> v5.0.4
> ------
>
> What's Changed
> --------------
>
> * Bump picomatch from 2.3.1 to 2.3.2 by [`@​dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#302](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/302)
> * Bump eslint from 10.0.3 to 10.1.0 by [`@​dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#301](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/301)
> * Bump brace-expansion by [`@​dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#303](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/303)
> * Bump yaml from 2.8.2 to 2.8.3 by [`@​dependabot`](https://github.com/dependabot)[bot] in [zgosalvez/github-actions-ensure-sha-pinned-actions#300](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/pull/300)
>
> **Full Changelog**: <zgosalvez/github-actions-ensure-sha-pinned-actions@v5...v5.0.4>


Commits

* [`ca46236`](zgosalvez/github-actions-ensure-sha-pinned-actions@ca46236) Bump yaml from 2.8.2 to 2.8.3 ([#300](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/300))
* [`c1f725e`](zgosalvez/github-actions-ensure-sha-pinned-actions@c1f725e) Bump brace-expansion ([#303](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/303))
* [`2a0679d`](zgosalvez/github-actions-ensure-sha-pinned-actions@2a0679d) Bump eslint from 10.0.3 to 10.1.0 ([#301](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/301))
* [`4533f2e`](zgosalvez/github-actions-ensure-sha-pinned-actions@4533f2e) Bump picomatch from 2.3.1 to 2.3.2 ([#302](https://redirect.github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/issues/302))
* See full diff in [compare view](zgosalvez/github-actions-ensure-sha-pinned-actions@471d5ac...ca46236)
  
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore  major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore  minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore  ` will remove the ignore condition of the specified dependency and ignore conditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants