Skip to content

Conversation

@gavinking
Copy link
Member

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Nov 13, 2024

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [7c599ad, 69035b0, 2d0033f, 79d6497]

› This message was automatically generated.

@gavinking gavinking force-pushed the set-order branch 3 times, most recently from d88fd44 to 7fb781c Compare November 13, 2024 22:18
public static void applyToProperties(Properties properties, Object... pairs) {
assert pairs.length % 2 == 0;
for ( int i = 0; i < pairs.length; i+=2 ) {
properties.put( pairs[i], pairs[i+1] );

Check failure

Code scanning / CodeQL

Array index out of bounds Error test

This array access might be out of bounds, as the index might be equal to the array length.
public static void applyToProperties(Properties properties, Object... pairs) {
assert pairs.length % 2 == 0;
for ( int i = 0; i < pairs.length; i+=2 ) {
properties.put( pairs[i], pairs[i+1] );

Check failure

Code scanning / CodeQL

Array index out of bounds Error test

This array access might be out of bounds, as the index might be equal to the array length.
default:
final Map<String,String> result = new HashMap<>();
for ( int i = 0; i < pairs.length; i+=2 ) {
result.put( pairs[i], pairs[i+1] );

Check failure

Code scanning / CodeQL

Array index out of bounds Error test

This array access might be out of bounds, as the index might be equal to the array length.
default:
final Map<String,String> result = new HashMap<>();
for ( int i = 0; i < pairs.length; i+=2 ) {
result.put( pairs[i], pairs[i+1] );

Check failure

Code scanning / CodeQL

Array index out of bounds Error test

This array access might be out of bounds, as the index might be equal to the array length.
@gavinking gavinking merged commit 9303f1a into hibernate:main Nov 14, 2024
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant