Fix some IntelliJ findings#6204
Merged
Merged
Conversation
koppor
commented
Mar 29, 2020
Member
- Fix bug in TagBar (added itself instead of newTags)
- Wrong number of LOGGER paramters
- Inner class may be static
- Fix comment typo
- Bulk operation can be used instead of iteration
- Arrays.asList with only one element
- Optimized count by using numbers earlier
- Chained append for StringBuilder
- Initialize ArrayList by passing the initial contents in the constructor
- Fix bug in TagBar (added itself instead of newTags) - Wrong number of LOGGER paramters - Inner class may be static - Fix comment typo - Bulk operation can be used instead of iteration - Arrays.asList with only one element - Optimized count by using numbers earlier - Chained append for StringBuilder - Initialize ArrayList by passing the initial contents in the constructor
tobiasdiez
requested changes
Mar 30, 2020
tobiasdiez
left a comment
Member
There was a problem hiding this comment.
It's ok, but I think we have more important construction sites then these minor code improvements. Especially if some of them are questionable (e.g. I found the StringBuilder.append version less readable then a normal string concatenation).
| // create menu items, one for each case changer | ||
| List<Formatter> caseChangers = new ArrayList<>(); | ||
| caseChangers.addAll(Formatters.getCaseChangers()); | ||
| List<Formatter> caseChangers = new ArrayList<>(Formatters.getCaseChangers()); |
Member
There was a problem hiding this comment.
I found the previous code easier to understand...
Member
Author
There was a problem hiding this comment.
IntelliJ reported that as performance issue. I will revert it nevertheless, as I think it's not that crucial...
Member
There was a problem hiding this comment.
I actually find the intelij variant easy enough to understand. It's obvious that the constructor of ArrayList can take a collection
This partially reverts commit 167558d.
Member
Author
|
Reverted the questioned improvements. |
tobiasdiez
approved these changes
Mar 30, 2020
koppor
pushed a commit
that referenced
this pull request
Nov 15, 2022
7a10e3f Bluebook: Remove small-caps for case short & legislation (#6305) ca4a92b Merge pull request #6244 from POBrien333/patch-1107 12743ad Create social-science-history.csl (#6233) f7c1d57 Update american-chemical-society.csl (#6231) aca6b23 ready: Update oil-shale.csl (#6225) aadae55 Create pallas.csl (#6204) cc7d016 Merge pull request #6253 from nschneid/patch-1 77fab39 Merge pull request #6282 from POBrien333/patch-1119 e2668eb Merge pull request #6263 from POBrien333/patch-1113 7f3244d move style to dependent folder 8584993 Create development-growth-differentiation.csl (#6226) dfe71ff Create biotechnology-and-bioprocess-engineering.csl (#6227) 0d91742 Create sn-computer-science.csl (#6228) a0d09b4 Create mots.csl (#6205) 47665e5 Update review-of-international-studies.csl d573b8b Create computer-supported-cooperative-work.csl cebec0e ACL: check if edition is ordinal before printing the word "edition" 03a0a39 Re-indent CSL styles 3c64906 fix self link 479c061 fix small issues after visual inspection a356e72 Create gnosis-journal-of-gnostic-studies.csl git-subtree-dir: buildres/csl/csl-styles git-subtree-split: 7a10e3f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.