From 06a3cde5b0f6e4e322423206ff2bb4cb1fa08230 Mon Sep 17 00:00:00 2001 From: "detail-app[bot]" <180357370+detail-app[bot]@users.noreply.github.com> Date: Wed, 16 Sep 2026 16:29:44 +0000 Subject: [PATCH] chore: remove unused WarningType enum and create factory from ProcessingWarning --- .../domain/markdown/ProcessingWarning.java | 51 +------------------ 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/src/main/java/com/williamcallahan/javachat/domain/markdown/ProcessingWarning.java b/src/main/java/com/williamcallahan/javachat/domain/markdown/ProcessingWarning.java index 9e0c625a..b6755191 100644 --- a/src/main/java/com/williamcallahan/javachat/domain/markdown/ProcessingWarning.java +++ b/src/main/java/com/williamcallahan/javachat/domain/markdown/ProcessingWarning.java @@ -4,63 +4,14 @@ * Represents a non-fatal warning encountered during markdown processing. * Used for structured error reporting instead of silent failures. */ -public record ProcessingWarning(String message, WarningType type, int position, String context) { +public record ProcessingWarning(String message, int position, String context) { public ProcessingWarning { if (message == null || message.trim().isEmpty()) { throw new IllegalArgumentException("Warning message cannot be null or empty"); } - if (type == null) { - throw new IllegalArgumentException("Warning type cannot be null"); - } if (position < 0) { throw new IllegalArgumentException("Warning position must be non-negative"); } } - - /** - * Creates a processing warning with minimal context. - * @param message the warning message - * @param type the warning type - * @param position position in document - * @return new ProcessingWarning instance - */ - public static ProcessingWarning create(String message, WarningType type, int position) { - return new ProcessingWarning(message, type, position, ""); - } - - /** - * Warning types for categorization. - */ - public enum WarningType { - /** - * Malformed enrichment marker. - */ - MALFORMED_ENRICHMENT, - - /** - * Invalid citation format. - */ - INVALID_CITATION, - - /** - * Unclosed code block. - */ - UNCLOSED_CODE_BLOCK, - - /** - * Nested structure issue. - */ - NESTED_STRUCTURE, - - /** - * Unknown enrichment type. - */ - UNKNOWN_ENRICHMENT_TYPE, - - /** - * General parsing issue. - */ - PARSING_ISSUE - } }