Skip to content

Commit

Permalink
lifecycle: Fix infinite NoncurrentTransition xml marshalling
Browse files Browse the repository at this point in the history
A missing type wrapper to avoid an infinite recursive call of MarshalXML
is missing for NoncurrentTransition struct type. This commit will add
it.
  • Loading branch information
vadmeste committed Jan 7, 2021
1 parent 8dddba4 commit 48ab896
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/lifecycle/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func (n NoncurrentVersionTransition) MarshalXML(e *xml.Encoder, start xml.StartE
if n.NoncurrentDays == ExpirationDays(0) {
return nil
}
return e.EncodeElement(&n, start)
type noncurrentVersionTransitionWrapper NoncurrentVersionTransition
return e.EncodeElement(noncurrentVersionTransitionWrapper(n), start)
}

// Tag structure key/value pair representing an object tag to apply lifecycle configuration
Expand Down

0 comments on commit 48ab896

Please sign in to comment.