End custom.vmoptions with a comment so added options keep their newline - #465
Merged
pacmano1 merged 1 commit intoSep 29, 2026
Merged
Conversation
The startup scripts read .vmoptions files with a shell `while read` loop, which skips a last line that has no trailing newline. An option typed as the last line of conf/custom.vmoptions in an editor that does not add a final newline never reached the JVM, so the engine kept the -Xmx256m from base_includes.vmoptions. The install4j-generated scripts (oieservice, oieserver, oiecommand) use that loop and are not ours to change, so the template now ends with a comment line. Options added above it always end in a newline. If an editor leaves the comment without a newline, the scripts drop the comment, which is harmless. Closes OpenIntegrationEngine#464 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Finnegan's Owner <44065187+pacmano1@users.noreply.github.com>
pacmano1
requested review from
a team,
gibson9583,
jonbartels,
kayyagari,
kpalang,
mgaffigan,
ssrowe and
tonygermano
September 29, 2026 18:09
jonbartels
approved these changes
Sep 29, 2026
mgaffigan
approved these changes
Sep 29, 2026
gibson9583
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #464
conf/custom.vmoptionsnow ends with three blank lines and# Add custom options above this comment.The startup scripts skip a last line that has no newline, so an option typed at the end of the file in an editor that doesn't add one never reaches the JVM. The install4j-generated scripts (
oieservice,oieserver,oiecommand) have that loop and aren't ours to fix, so the template now ends with a comment. Options added above it always end in a newline. If an editor leaves the comment itself without one, the scripts drop the comment, which is harmless.This replaces the warning comment proposed in #464 because it doesn't depend on anyone reading the comments.
How to verify
oie_unix_4_6_0.shand replaceconf/custom.vmoptionswith this branch's copy.-Xmx2gon one of the blank lines, then strip the final newline:printf '%s' "$(cat conf/custom.vmoptions)" > t && mv t conf/custom.vmoptions./oieservice start, thenjcmd <pid> VM.flags | tr ' ' '\n' | grep MaxHeapSizeshows2147483648. On an unpatched file with-Xmx2gas the unterminated last line, it shows268435456.I tested on Linux with Temurin 17.0.20.1. Windows is untested.