Skip to content

refactor: standardize format handling in RealmPolicy #11

Description

@pleberre

Problem

Format handling in RealmPolicy needs standardization or completion.

File Location

src/main/java/io/err0/client/core/RealmPolicy.java:28

// FIXME - formats

Context

This FIXME is near format-related code but lacks specific details about what needs to be fixed.

Investigation Required

  1. Review the code around line 28 in RealmPolicy.java
  2. Understand what "formats" refers to (error code formats? date formats? string formats?)
  3. Check for inconsistencies or incomplete implementations
  4. Compare with ProjectPolicy.java format handling

Questions to Answer

  1. What formats need standardization?
  2. Are there edge cases not handled?
  3. Is there inconsistency with other format handling in the codebase?
  4. Should format validation be added?

Implementation Steps

  1. Investigate: Read RealmPolicy.java lines 20-40 to understand context
  2. Document: Add comments explaining what the format handling does
  3. Standardize: Ensure consistency with project-wide format conventions
  4. Validate: Add validation for format strings if needed
  5. Test: Add tests for format handling edge cases

Reference Files

  • src/main/java/io/err0/client/core/ProjectPolicy.java (compare format handling)
  • Related test files in src/test/

Acceptance Criteria

  • Context of FIXME understood and documented
  • Format handling standardized or completed
  • FIXME removed from RealmPolicy.java:28
  • Tests added for format handling
  • No regressions in policy processing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions