forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a DEFAULT visibility to indicate unspecified
In jruby#8146 we saw that DelegateClass can be broken by JRuby extensions that do not explicitly set their initialize methods to Visibility.PRIVATE. This is an error-prone requirement as detailed in jruby#8210, since there's no indication that initialize is special and should always be private. This patch introduces a "DEFAULT" visibility to be the default for the annotation. When binding methods using annotation processing, the DEFAULT visibility will translate itself to PRIVATE for the initialize method and PUBLIC for other cases. This ensures that initialize is always set to PRIVATE if no other visibility is specified, avoiding the bug. If initialize is set to some other visibility, it will keep that visibility. Fixes jruby#8210
- Loading branch information
Showing
6 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters