Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate overloaded `setProfile`, prefer `setProfilingMode` #1934

Merged

Conversation

Projects
None yet
2 participants
@cprice404
Copy link
Contributor

cprice404 commented Aug 31, 2014

The ScriptingContainer class contains two methods named setProfile,
which differ only by their single argument type and do very different
things from one another. One of the two signatures accepts
an argument of type ProfilingMode, which, in other places in the
code, is exposed via more explicitly named accessor methods such as
getProfilingMode and setProfilingMode. I'm wondering if maybe
the method in ScriptingContainer was simply accidentally mis-named.

This commit deprecates the setProfile(ProfilingMode) method, and
introduces a replacement method setProfilingMode(ProfilingMode),
which is more consistent with the rest of the code.

Chris Price
Deprecate overloaded `setProfile`, prefer `setProfilingMode`
The ScriptingContainer class contains two methods named `setProfile`,
which differ only by their single argument type and do very different
things from one another.  One of the two signatures accepts
an argument of type `ProfilingMode`, which, in other places in the
code, is exposed via more explicitly named accessor methods such as
`getProfilingMode` and `setProfilingMode`.  I'm wondering if maybe
the method in `ScriptingContainer` was simply accidentally mis-named.

This commit deprecates the `setProfile(ProfilingMode)` method, and
introduces a replacement method `setProfilingMode(ProfilingMode)`,
which is more consistent with the rest of the code.

@cprice404 cprice404 force-pushed the cprice404:maint/jruby-1_7/sc-set-profiling-mode branch from e0accef to 05655cc Aug 31, 2014

@headius

This comment has been minimized.

Copy link
Member

headius commented Nov 2, 2014

Seems reasonable.

headius added a commit that referenced this pull request Nov 2, 2014

Merge pull request #1934 from cprice404/maint/jruby-1_7/sc-set-profil…
…ing-mode

Deprecate overloaded `setProfile`, prefer `setProfilingMode`

@headius headius merged commit 4a0eed6 into jruby:jruby-1_7 Nov 2, 2014

1 check failed

continuous-integration/travis-ci The Travis CI build failed
Details

@headius headius added this to the JRuby 1.7.17 milestone Nov 2, 2014

@headius headius self-assigned this Nov 2, 2014

@headius

This comment has been minimized.

Copy link
Member

headius commented Nov 2, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.