Skip to content

Conversation

@noomorph
Copy link
Contributor

@noomorph noomorph commented Aug 1, 2025

Description

This PR adds an optional size field to the io.qameta.allure.model.Attachment class to support 'no-fetch' flows for attachments.

Context

This change aligns with ongoing efforts to add optional size support across Allure implementations.

See related PR in allure-js: allure-framework/allure-js#1302

Changes

  • Added optional Long size field to Attachment class
  • Added getSize() and setSize() methods following existing patterns
  • Field is nullable to maintain backward compatibility

Benefits

  • Enables efficient attachment handling when size is already known from JSON
  • Eliminates need for reflection-based workarounds
  • Maintains backward compatibility with existing code
  • Follows Allure's established patterns and conventions
  • Supports remote attachment workflows without HTTP roundtrips

Related Issues

Fixes the need for AttachmentMixIn workarounds and reflection-based size access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant