-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:[CO-1019] Bulk apply common code clean-up (#461)
* chore:[memory] Make possible inner classes static to optimize memory footprint * chore: remove un-necessary imports * chore: cleanup of switch statements - remove redundant cases and un-necessary returns * chore: remove un-necessary returns * chore: remove unnecessary continue statements if they are the last reachable statements in the loop * chore: simplify collection operations * chore: simplify min/max calculation replace complex minimum/maximum value calculation with Math.min/max * chore: cleanup of redundant type cast expressions * chore: cleanup of excessive range checks * chore: simplify explicit array filling replace with Arrays.fill() * chore: remove redundant condition checks Removes redundant conditions that are covered by further condition checks * chore: remove redundant File instance creations * chore: remove explicit array creation * chore: simplify String usages Removed redundant String constructors and calls to methods like toString() or substring() where they can be replaced with a simplified expression * chore: [performance] avoid calls to Arrays.asList() with at most one argument * chore: fix test for UniversalLexer with partial revert of d3819f8 remove redundant cases and un-necessary returns * chore: replace extended for loops with enhanced one * chore: replace string indexof with contains * chore: remove unnecessary boxing remove unnecessary wrapping of primitive values in objects * chore: remove unnecessary boxing replace Integer.valueOf with Integer.parseInt * chore: remove unnecessary unboxing replace explicit unwrapping of wrapped primitive values * chore: remove explicit types with diamond operator replace`new` expressions with type arguments that can be replaced a with diamond type <> * chore: merge identical catch blocks together * chore: replace try finally with try-with-resources statement * chore: replace anonymous classes with lambda expression * chore: fix compilation of LuceneIndex by reverting portion of e608376 * chore: replace anonymous classes with their shorter lambda alternatives * chore: replace Collection.sort with List.sort * chore: make inner classes static * chore: remove unused imports * style: cleanup of code style issues... - c style array to java style array - correct modifier sorting - use standard charset constants to define charset encoding - unnecessary toString calls - unnecessary null checks before calling Object.equals() - unnecessary conversion to String - unnecessary enum modifiers - unnecessary interface modifiers - unnecessary semicolon * style: cleanup ZAuthToken remove empty if * style: cleanup JavaMailInternetHeaders remove empty if by flipping the conditions * style: fix indentations in switch statement and add break in default in AttributeInfo * chore: remove empty if in HostedAuth * chore: remove empty if by flipping condition CosId * chore: add break in default case in EphemeralBackendCheck * chore: remove unnecessary if condition ImapFolderSync * chore: remove/merge unnecessary if condition ImapHandler * chore: update if condition ImapListener * chore: update if condition ImapRemoteSession * chore: update if condition ImapSession * chore: remove empty if condition AutoDiscoverServlet * chore: remove empty if condition AutoDiscoverServlet * chore: cleanup if condition VerifyStoreManager assertEquals * chore: cleanup if condition in ContactCSV replace with switch, simplify the null check * chore: cleanup UserServletUtil remove comment * chore: cleanup if statement in SoapSession * chore: cleanup if statement in TritonBlobStoreManager * chore: remove redundant if statement from TimeZoneDefinition * chore: switch case default break HttpProxyConfig * chore: cleanup of if statement MimeParser * chore: cleanup of if statement ZMimeParser * chore: cleanup of if statement LockMgr * chore: cleanup of if statement ImapMessage * chore: cleanup of if statement ContactTokenFilter * chore: cleanup of if statement ContactAutoComplete * chore: cleanup of if statement Conversation * chore: cleanup of if statement Metadata * chore: cleanup of if statement MetadataList * chore: cleanup of if statement SenderList * chore: cleanup of if statement Mime * chore: add need brackets to KnownKey * fix: resource leak in MimeDetect - use real mime data files for tests * fix: resource leak in MimeDetect and add unit test * chore: reorder placement of parent pom declaration - add system-lambda dependency for testing in common module * Revert "chore: [performance] avoid calls to Arrays.asList() with at most one argument" This reverts commit 06821d8. * chore: fix indentation * chore: cleanup ZFolder * chore: add private constructor for utility class + cleanup ZCalendar * style: fix indentation ContentTransferEncoding * chore: Use "java.util.function.Function" instead of Guava + cleanup * chore: disable debugging in production code in MimeDetect * chore: replace lambdas with method references in SoapConverter * refactor: use try-with-resources in TZIDMapper * refactor: avoid use of DBI for hashmap in ZFolder to avoid memory leaks * refactor: use EnumMap instead of hashmap in TimeZoneMap * refactor: minor cleanup on ZoneInfo2iCalendar - use StandardCharset constant instead of string literal ... * refactor: avoid Exception in AutoDiscoverServlet doGet * refactor: avoid throwing exceptions in servlet methods in RobotsServlet + cleanup * test: add unit tests for RobotsServletTest --------- Co-authored-by: Soner Sivri <sonersivri@gmail.com> Co-authored-by: Yuliya Aheeva <yuliya.aheeva@mail.ru>
- Loading branch information
1 parent
5340ea1
commit 21288a6
Showing
1,997 changed files
with
11,121 additions
and
11,821 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.