Title: Quality: Sonar S1155 "Collection.isEmpty()" should be used to test for emptiness · Issue #1079 · biojava/biojava · GitHub
Open Graph Title: Quality: Sonar S1155 "Collection.isEmpty()" should be used to test for emptiness · Issue #1079 · biojava/biojava
X Title: Quality: Sonar S1155 "Collection.isEmpty()" should be used to test for emptiness · Issue #1079 · biojava/biojava
Description: We noticed that you have 90 violations of the Sonar rule RSPEC-1940 "Boolean checks should not be inverted". When you call isEmpty(), it clearly communicates the code’s intention, which is to check if the collection is empty. Using size(...
Open Graph Description: We noticed that you have 90 violations of the Sonar rule RSPEC-1940 "Boolean checks should not be inverted". When you call isEmpty(), it clearly communicates the code’s intention, which is to check...
X Description: We noticed that you have 90 violations of the Sonar rule RSPEC-1940 "Boolean checks should not be inverted". When you call isEmpty(), it clearly communicates the code’s intention, which i...
Opengraph URL: https://github.com/biojava/biojava/issues/1079
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Quality: Sonar S1155 \"Collection.isEmpty()\" should be used to test for emptiness","articleBody":"We noticed that you have 90 violations of the Sonar rule RSPEC-1940 \"Boolean checks should not be inverted\". When you call isEmpty(), it clearly communicates the code’s intention, which is to check if the collection is empty. Using size() == 0 for this purpose is less direct and makes the code slightly more complex.\r\n\r\nWith our code remediation solution you can correct these issues quickly and free of charge. You can find links and documentation here https://www.indepth.fr\r\n\r\n org\\biojava\\nbio\\core\\alignment\\SimpleAlignedSequence.java\r\n @@ -411,5 +411,5 @@\r\n\r\n\t\t// combine sublocations into 1 Location\r\n \\-\t\tif (sublocations.size() == 0) {\r\n \\+\t\tif (sublocations.isEmpty()) {\r\n\t\t\tlocation = null;\r\n","author":{"url":"https://github.com/jlerbsc","@type":"Person","name":"jlerbsc"},"datePublished":"2024-01-16T18:09:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1079/biojava/issues/1079"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c4696acd-7220-e112-8b45-a2883aaa662c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E034:DA633:961FB87:C1A7E8C:69761A5C |
| html-safe-nonce | a05355bac2a1f1a79a1009afec76f638c04270995d1aeca6d0f899ace568f3ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDM0OkRBNjMzOjk2MUZCODc6QzFBN0U4Qzo2OTc2MUE1QyIsInZpc2l0b3JfaWQiOiIxNzYxNDIwNzA0NjYzMDgzNjEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 897a8f4371820adac928403f4442f41d3de9a0af1347f1451fe4abeea70722df |
| hovercard-subject-tag | issue:2084545826 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/biojava/biojava/1079/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6bb2d959dc914500e8acd9477f733ee48cefd49d06c2c40cb91440d5ad4de17d/biojava/biojava/issues/1079 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6bb2d959dc914500e8acd9477f733ee48cefd49d06c2c40cb91440d5ad4de17d/biojava/biojava/issues/1079 |
| og:image:alt | We noticed that you have 90 violations of the Sonar rule RSPEC-1940 "Boolean checks should not be inverted". When you call isEmpty(), it clearly communicates the code’s intention, which is to check... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jlerbsc |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/biojava/biojava git https://github.com/biojava/biojava.git |
| octolytics-dimension-user_id | 237402 |
| octolytics-dimension-user_login | biojava |
| octolytics-dimension-repository_id | 9199359 |
| octolytics-dimension-repository_nwo | biojava/biojava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9199359 |
| octolytics-dimension-repository_network_root_nwo | biojava/biojava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4ea235bfed58ef16c8a5642b3ac64b74f10c9f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width