Skip to content

Conversation

@scottf
Copy link
Contributor

@scottf scottf commented Aug 14, 2025

No description provided.

Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

t = System.nanoTime() - t;
System.out.println("Time: " + t / 1000 / 1000.0 +"ms, Op/sec: "+(max*1_000_000_000L/t));
}
// @Test
Copy link
Member

Choose a reason for hiding this comment

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

Can the commented out code be removed?

go-version: '1.21.4'
- name: Install Nats Server
run: |
pkill -9 nats-server 2>/dev/null || true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally thought the problem was servers were being left around, and had been meaning to add this anyway.

cp main ~/.local/bin/nats-server
cd ..
rm -rf nats-server
git checkout tags/v2.11.8 -b release
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now I need to run against 2.11.8 instead of head of main. Really need to figure out how to just get the latest release. The scripts in use elsewhere are unreliable.

cd ..
rm -rf nats-server
git checkout tags/v2.11.8 -b release
go build -o ~/.local/bin/nats-server
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reflects not from Neil on simplifying the building and placing the nats-server


```bash
nats-server --conf src/test/resources/tls.conf
nats-server --config src/test/resources/tls.conf
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This had been wrong a long time.

private final Map<String, Integer> lengthMap;
private final boolean readOnly;
private byte @Nullable [] serialized;
private byte[] serialized;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Nullable was added from a user's PR but is not really necessary.

* @param dest the byte array to write to
* @return the length of the header
*/
@SuppressWarnings("deprecation")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved this to comments closer to the lines of code.

private void assertKeyIgnoreCaseContainsValues(Headers headers, List<String> keys, List<String> values) {
for (String k : keys) {
List<String> hVals = headers.getIgnoreCase(k);
assertNotNull(hVals);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

pretty much all of the test changes where to check for null as the new annotation shows up with warnings from IntelliJ

@scottf scottf merged commit 15c17db into main Aug 15, 2025
5 checks passed
@scottf scottf deleted the header-nullability branch August 15, 2025 16:51
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.

2 participants