This repository has been archived by the owner on Dec 13, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: unknown owner (a string) was being passed in as an alignment …
…string
- Loading branch information
748cf32
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.
Hi Matt,
Can you comment how this was a bug and what this change changes? Using the Rule constructor without an owner will just assign the Unknown owner id to it in the constructor itself afaik. So what should the owner be here?
748cf32
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.
Sure — UNKNOWN_OWNER is a String, so the constructor that gets called is this one, which interprets the last argument as an alignment, not an owner.
748cf32
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.
Ah, right! Thanks! Should have looked more closely.
748cf32
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.
No problem, it didn't get triggered until I had a small case where I actually asked for the alignments on output.
I suppose we could also have fixed this by passing UKNOWN_OWNER_ID, we can switch it if you prefer.
748cf32
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.
No its totally fine. Thanks for the fix!