Skip to content

Fix comment typos and error message inconsistencies - #515

Closed
Tino Chan (tinochan) wants to merge 1 commit into
LMAX-Exchange:masterfrom
tinochan:fix/comment-typos-and-error-message-inconsistencies
Closed

Tino Chan (tinochan) wants to merge 1 commit into
LMAX-Exchange:masterfrom
tinochan:fix/comment-typos-and-error-message-inconsistencies

Conversation

@tinochan

Copy link
Copy Markdown

Summary

Fix minor documentation and error message issues across the codebase so the messages match the actual validation logic.

Javadoc/comment typos: corrected misspelled and malformed wording in Disruptor, RewindAction, PhasedBackoffWaitStrategy, Sequencer, and ExceptionHandlerWrapper.

Error message inconsistencies: exception messages did not match the actual guard conditions they describe.

Changes

Javadoc/comment typos

  • Disruptor.java: "to create threads to for processors" -> "to create threads for processors"
  • RewindAction.java: "from he beginning" -> "from the beginning"
  • PhasedBackoffWaitStrategy.java: "time in to busy spin/yield for" -> "time to busy spin/yield for" (6 occurrences)
  • Sequencer.java: "The sequence to initialise too." -> "The sequence to initialise to."
  • ExceptionHandlerWrapper.java: removed stray space in getExceptionHandler().handleOnShutdownException

Error message inconsistencies (guard semantics unchanged)

  • RingBuffer.java: "must be positive" -> "must not be negative" (the guard rejects only negative values; 0 is valid)
  • SingleProducerSequencer.java: "n must be > 0 and < bufferSize" -> "n must be > 0 and <= bufferSize" (n == bufferSize is allowed)
  • MultiProducerSequencer.java: same message fix as above

Testing

./gradlew test

Category A - Javadoc/comment typos:
- Disruptor: fix "threads to for processors" javadoc
- RewindAction: fix "from  he beginning" typo
- PhasedBackoffWaitStrategy: fix "time in to" javadoc typos
- Sequencer: fix "initialise too" -> "initialise to"
- ExceptionHandlerWrapper: remove stray space in method call

Category B - error message inconsistencies (guard semantics unchanged):
- RingBuffer: "must be positive" -> "must not be negative"
- SingleProducerSequencer/MultiProducerSequencer: "n must be > 0 and <= bufferSize"
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