Minor auto-refactor code cleanup on a massive scale#1376
Conversation
| // msg.append("There are no missing files"); | ||
|
|
||
| return new HtmlView(msg.toString()); | ||
| return new HtmlView(msg); |
There was a problem hiding this comment.
Is msg ever set to a value? It looks like the code that did set it has been commented out.
There was a problem hiding this comment.
Nope, nor has it been in a long time (if ever). I simplified the code a bit more.
| String sb = safeAppend(rs, "Remark", "remark") + | ||
| safeAppend(rs, "Entered by", "performedby"); | ||
| return sb; |
There was a problem hiding this comment.
Not an ask for a change, just a comment.
I guess IntelliJ could have said:
return safeAppend(rs, "Remark", "remark") +
safeAppend(rs, "Entered by", "performedby");
And pointed out the Container c & boolean redacted are unused.
There was a problem hiding this comment.
I simplified to the return. Those two arguments are part of the method on the interface so IntelliJ doesn't complain about them being unused here.
| for (Ext4FieldRef field : _ext4Helper.componentQuery("field[fieldName='exclude']", Ext4FieldRef.class)) | ||
| { | ||
| Assert.assertEquals(field.getValue(), true); | ||
| Assert.assertEquals(true, field.getValue()); |
There was a problem hiding this comment.
Maybe Assert.assertTrue?
Just another comment on IntelliJ choices.
There was a problem hiding this comment.
field.getValue() returns Object so IntelliJ doesn't try to simplify the assert
# Conflicts: # onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRController.java
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