Skip to content

Deprecate overloaded setProfile, prefer setProfilingMode#1934

Merged
headius merged 1 commit intojruby:jruby-1_7from
cprice404:maint/jruby-1_7/sc-set-profiling-mode
Nov 2, 2014
Merged

Deprecate overloaded setProfile, prefer setProfilingMode#1934
headius merged 1 commit intojruby:jruby-1_7from
cprice404:maint/jruby-1_7/sc-set-profiling-mode

Conversation

@cprice404
Copy link
Contributor

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.

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 maint/jruby-1_7/sc-set-profiling-mode branch from e0accef to 05655cc Compare August 31, 2014 20:47
@headius
Copy link
Member

headius commented Nov 2, 2014

Seems reasonable.

headius added a commit that referenced this pull request Nov 2, 2014
…ing-mode

Deprecate overloaded `setProfile`, prefer `setProfilingMode`
@headius headius merged commit 4a0eed6 into jruby:jruby-1_7 Nov 2, 2014
@headius headius added this to the JRuby 1.7.17 milestone Nov 2, 2014
@headius headius self-assigned this Nov 2, 2014
@headius
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants