Skip to content

Conversation

@tcheeric
Copy link
Owner

Summary

  • enforce exact Kind values for concrete event implementations
  • add validation tests for mismatched kind values

Testing

  • mvn -q verify

https://chatgpt.com/codex/tasks/task_b_688a84fdfbb083318d79b9337c990fcb

This comment was marked as outdated.

@tcheeric tcheeric requested a review from Copilot July 30, 2025 22:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds strict kind validation to concrete event implementations to ensure each event class validates that its kind field matches the expected Kind enum value.

  • Adds validateKind() method overrides to all concrete event classes
  • Adds a test to verify validation fails when kind values are mismatched
  • Updates README to document the new validation behavior

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 10 comments.

File Description
ValidateKindTest.java New test verifying AssertionError is thrown for mismatched kind values
Various event classes Added validateKind() method overrides to enforce expected Kind enum values
README.md Added documentation about the new event validation behavior

}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
}

@Override
public void validateKind() {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

This method should be protected to match the pattern used in all other event classes. The public access modifier is inconsistent with the rest of the codebase.

Suggested change
public void validateKind() {
protected void validateKind() {

Copilot uses AI. Check for mistakes.
@tcheeric tcheeric merged commit f0c572d into develop Jul 30, 2025
@tcheeric tcheeric deleted the codex/override-validatekind-in-event-classes branch July 30, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants