-
Notifications
You must be signed in to change notification settings - Fork 757
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
classlib: Pattern.record correctly set header and sample formats #5031
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is OK to chenge the behaviour. It should be noted in the relsease note though.
|
||
var recorder = Recorder(server); | ||
var pattern = if(dur.notNil) { Pfindur(dur, this) } { this }; | ||
|
||
headerFormat !? { recorder.recHeaderFormat = headerFormat }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check for nil isn't necessary, right? When it is nil, it will just use the server's.
So perhaps just:
recorder.recHeaderFormat = headerFormat;
recorder.recSampleFormat = sampleFormat;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I didn't want to explicitly set those parameters as nil. But actually, on second thought, I don't see any reason why we shouldn't, and we save two nil-checks, so I changed it. Thanks!
Just to be sure: was the current behavior intended? It looked like a bug to me. This is not to say that a change shouldn't be reported in release notes though! I second that :) |
Pattern.record used to simply ignore header and sample format provided as arguments
f7a0fdf
to
4662c4d
Compare
Sure, it is a bug. Certainly under the definition of a bug as something nobody should have been relying on it :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @elgiano !
Purpose and Motivation
Pattern.record used to simply ignore header and sample formats provided
as arguments.
Issue reproducer:
Types of changes
To-do list