{"id":15043678,"url":"https://github.com/kengotoda/guava-helper-for-java-8","last_synced_at":"2025-10-04T05:31:32.898Z","repository":{"id":54370255,"uuid":"39075884","full_name":"KengoTODA/guava-helper-for-java-8","owner":"KengoTODA","description":"A tool set to help developer to use Guava with Java 8","archived":true,"fork":false,"pushed_at":"2021-02-22T21:13:07.000Z","size":187,"stargazers_count":11,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-05T08:16:42.538Z","etag":null,"topics":["guava","guava-collections","java","sonarqube-plugin","spotbugs-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KengoTODA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-14T13:18:50.000Z","updated_at":"2023-01-28T10:24:10.000Z","dependencies_parsed_at":"2022-08-13T13:40:30.164Z","dependency_job_id":null,"html_url":"https://github.com/KengoTODA/guava-helper-for-java-8","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/KengoTODA/guava-helper-for-java-8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KengoTODA%2Fguava-helper-for-java-8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KengoTODA%2Fguava-helper-for-java-8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KengoTODA%2Fguava-helper-for-java-8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KengoTODA%2Fguava-helper-for-java-8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KengoTODA","download_url":"https://codeload.github.com/KengoTODA/guava-helper-for-java-8/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KengoTODA%2Fguava-helper-for-java-8/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278267477,"owners_count":25958872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["guava","guava-collections","java","sonarqube-plugin","spotbugs-plugin"],"created_at":"2024-09-24T20:49:25.278Z","updated_at":"2025-10-04T05:31:32.509Z","avatar_url":"https://github.com/KengoTODA.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Migrate your code from legacy Guava to Java 8\n=============================================\n\n[![Travis CI Build Status](https://travis-ci.org/KengoTODA/guava-helper-for-java-8.svg)](https://travis-ci.org/KengoTODA/guava-helper-for-java-8)\n[![Javadocs](http://javadoc.io/badge/jp.skypencil.guava/helper.svg)](http://javadoc.io/doc/jp.skypencil.guava/helper)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=jp.skypencil.guava%3Aguava-helper-for-java-8\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=jp.skypencil.guava%3Aguava-helper-for-java-8)\n\nGuava was great library for Java 7 users. But now we have Java 8 and it has many useful features like `Optional`, `Stream` and `Lambda`. So some features in Guava should be replaced with them.\n\nOther parts in Guava are useful even for Java 8, especially collections. But Guava is designed for Java 6+, so it does not provide `java.util.stream.Collector` for Guava collections. So when you want to collect stream to Guava collections, you need some hack which makes your code nonintuitive.\n\nThis toolset solves these two problems. For former problem, this toolset provides SpotBugs plugin which reports dependency on deprecated Guava classes. For latter problem, this toolset provides `GuavaCollectors` class which provides many `java.util.stream.Collector` instances for Guava collections.\n\nThis toolset will help your development with Java 8 and good parts of Guava library.\n\nSpotBugs plugin\n---------------\n\nSpotBugs plugin helps developer to find dependency on deprecated guava classes, which should be replaced with Java 8.\nList of deprecated guava classes is in [DependencyOnDeprecatedGuavaClassDetector.java](spotbugs-plugin/src/main/java/jp/skypencil/guava/DependencyOnDeprecatedGuavaClassDetector.java).\n\nTo use this module in your Maven project, please add following configuration to your `pom.xml`.\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003ecom.github.spotbugs\u003c/groupId\u003e\n  \u003cartifactId\u003espotbugs-maven-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e3.1.11\u003c/version\u003e\n  \u003cconfiguration\u003e\n    \u003cplugins\u003e\n      \u003cplugin\u003e\n        \u003cgroupId\u003ejp.skypencil.guava\u003c/groupId\u003e\n        \u003cartifactId\u003espotbugs-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e1.2.0\u003c/version\u003e\n      \u003c/plugin\u003e\n    \u003c/plugins\u003e\n  \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nHelper module\n-------------\n\nHelper module provides collectors which is useful to use Guava with Java 8.  \n\n```java\nImmutableMap\u003cString, Integer\u003e map = Stream.of(1, 2)\n        .collect(GuavaCollectors.toImmutableMap(Object::toString, UnaryOperator.identity()));\n```\n\nSee [GuavaCollectors.java](helper/src/main/java/jp/skypencil/guava/stream/GuavaCollectors.java) and [its test cases](helper/src/test/java/jp/skypencil/guava/stream/GuavaCollectorsTest.java) for detail usage.\nTo use this module in your Maven project, please add following configuration to your `pom.xml`.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ejp.skypencil.guava\u003c/groupId\u003e\n  \u003cartifactId\u003ehelper\u003c/artifactId\u003e\n  \u003cversion\u003e1.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nSonarQube plugin\n----------------\n\nSee [sonarqube-plugin/README.md](sonarqube-plugin/README.md) for detail.\n\nChange set\n----------\n\nPlease visit [release page](https://github.com/KengoTODA/guava-helper-for-java-8/releases).\n\nCopyright and license\n---------------------\n\n    Copyright 2015-2019 Kengo TODA\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkengotoda%2Fguava-helper-for-java-8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkengotoda%2Fguava-helper-for-java-8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkengotoda%2Fguava-helper-for-java-8/lists"}