8

In the Create and Upload Patches documentation, there is no mention of restrictions on adding inner classes to an already packaged top-level class. The restrictions listed are:

  • You can’t add package components.
  • You can’t delete existing package components.
  • API and dynamic Apex access controls can’t change for the package.
  • No deprecation of any Apex code.
  • You can’t add new Apex class relationships, such as extends.
  • You can’t add Apex access modifiers, such as virtual or global.
  • You can’t add new web services.
  • You can’t add feature dependencies.

Can a public inner class be added to a managed package patch version?

1 Answer 1

7

Yes. We have taken this approach with our managed package when back-porting features to patches that added new top-level classes in our master branch. Obviously there are limits to what can appear in an inner class compared with a top-level one, but we have avoided such difficulties with minor refactoring.

1
  • 2
    Yep it is this situation I am in. Thanks for the confirmation: hate to do the work and then hit a gotcha at the end.
    – Keith C
    Jan 25, 2020 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .