Minor auto-refactor code cleanup on a massive scale#248
Minor auto-refactor code cleanup on a massive scale#248labkey-jeckels merged 2 commits intodevelopfrom
Conversation
| { | ||
| row = Table.insert(u, ti, row); | ||
| templateId = (Integer)row.get("rowid"); | ||
| row.get("rowid"); |
There was a problem hiding this comment.
That's interesting how it did the refactor here. Assigning a value to templateId is unnecessary, which it found. However, leaving line 139 as-is should not happen. Line 139 can be removed.
There was a problem hiding this comment.
@labkey-jeckels : do you want me to make this edit here, or will you do these on your machine?
There was a problem hiding this comment.
That's interesting how it did the refactor here. Assigning a value to templateId is unnecessary, which it found. However, leaving line 139 as-is should not happen. Line 139 can be removed.
It doesn't modify the right-hand side of the operation since it doesn't know if there are side-effects (in general).
There was a problem hiding this comment.
I removed the line completely. I agree with Nick's assessment of why the refactor made the edit it did. I've seen cases where it completely removed method calls that were part of unused assignment statements, but only in cases where it knew there was no side effect, like a trivial get method.
bbimber
left a comment
There was a problem hiding this comment.
please see comment about AssayHelper line 139
Rationale
We can cleanup tens of thousands of warnings across our codebase with IntelliJ's autorefactors. In some cases, this adopts newer, leaner syntax. In others, it simply removes code that's not serving any purpose.
Related Pull Requests
Changes