You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/11/21 08:13:00 UTC

[jira] [Work logged] (WW-5588) Allow Preparable interface to work with only per-method prepare*() implementations

     [ https://issues.apache.org/jira/browse/WW-5588?focusedWorklogId=992758&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-992758 ]

ASF GitHub Bot logged work on WW-5588:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Nov/25 08:12
            Start Date: 21/Nov/25 08:12
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request, #1417:
URL: https://github.com/apache/struts/pull/1417

   ## Summary
   - Changed `Preparable.prepare()` from abstract to default method with empty implementation
   - Actions can now implement only per-method variants like `prepareUpload()`, `prepareEdit()` without needing empty `prepare()` override
   - Fully backward-compatible - existing implementations continue to work unchanged
   
   ## Test plan
   - [x] Existing PrepareInterceptor tests pass
   - [ ] Manual verification with showcase app
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)




Issue Time Tracking
-------------------

            Worklog Id:     (was: 992758)
    Remaining Estimate: 0h
            Time Spent: 10m

> Allow Preparable interface to work with only per-method prepare*() implementations
> ----------------------------------------------------------------------------------
>
>                 Key: WW-5588
>                 URL: https://issues.apache.org/jira/browse/WW-5588
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: Lukasz Lenart
>            Assignee: Lukasz Lenart
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently the {{Preparable}} interface requires implementing {{prepare()}} even when using only per-method variants like {{prepareUpload()}} or {{{}prepareEdit(){}}}.
> *Proposal*: Change {{prepare()}} to a default method with empty implementation, allowing
> actions to implement only the specific {{prepare*()}} methods they need.
> _This is backward-compatible - existing implementations continue to work unchanged._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)