{"id":18309737,"url":"https://github.com/tsjensen/sercoll","last_synced_at":"2025-10-23T20:38:57.061Z","repository":{"id":57728957,"uuid":"44747077","full_name":"tsjensen/sercoll","owner":"tsjensen","description":"Java Collections declared Serializable","archived":false,"fork":false,"pushed_at":"2021-06-03T20:00:32.000Z","size":318,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T05:42:43.743Z","etag":null,"topics":["collections","java","serializable-objects","serialization"],"latest_commit_sha":null,"homepage":"http://tsjensen.github.io/sercoll/apidocs/latest/","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/tsjensen.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-10-22T13:31:49.000Z","updated_at":"2021-06-03T20:07:50.000Z","dependencies_parsed_at":"2022-09-26T22:01:07.481Z","dependency_job_id":null,"html_url":"https://github.com/tsjensen/sercoll","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjensen%2Fsercoll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjensen%2Fsercoll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjensen%2Fsercoll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjensen%2Fsercoll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsjensen","download_url":"https://codeload.github.com/tsjensen/sercoll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248033289,"owners_count":21036763,"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","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":["collections","java","serializable-objects","serialization"],"created_at":"2024-11-05T16:12:18.482Z","updated_at":"2025-10-23T20:38:56.997Z","avatar_url":"https://github.com/tsjensen.png","language":"Java","readme":"[![Build Status](https://github.com/tsjensen/sercoll/actions/workflows/build.yml/badge.svg)](https://github.com/tsjensen/sercoll/actions/workflows/build.yml)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.thomasjensen.sercoll/sercoll/badge.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3Acom.thomasjensen.sercoll)\n\n# sercoll\n\n**Java Collections declared Serializable**\n\nThis Java library provides one way to deal with the problem that Java collection interfaces are not declared serializable. Without *sercoll*, the following code will cause the FindBugs warning `Non-transient non-serializable instance field in serializable class` ([SE_BAD_FIELD](http://findbugs.sourceforge.net/bugDescriptions.html#SE_BAD_FIELD)):\n```java\npublic class MyObject implements Serializable {\n  private static final long serialVersionUID = 1L;\n  private String foo;\n  private List\u003cString\u003e strings;  // FindBugs error\n  // ... snip ...\n}\n```\nThis is correct, because `List`, `Set`, `Map`, and other standard Java collection classes do not implement `Serializable`, as they cannot know whether their elements are serializable or not.\n\nSo, while [other solutions](http://stackoverflow.com/q/4861228/1005481) exist, such as using the concrete collection type, tricking the detector into not working for your class, or ignoring the warning, I believe the cleanest way is to make the declaration:\n```java\npublic class MyObject implements Serializable {\n  private static final long serialVersionUID = 1L;\n  private String foo;\n  private SerializableList\u003cString\u003e strings;  // OK!\n  // ... snip ...\n}\n```\n*Sercoll* provides the interfaces such as `SerializableList` that are directly derived from the JDK classes, but add the serializability declaration. In addition to that, the required supplementary code is provided to successfully use the new interfaces in practice with little to no refactoring effort.\n\n## Prerequisites\n\n*Sercoll* requires at least JDK 6. It has no dependencies on other libraries.\n\n## Status\n\nThis is work in progress. *Sercoll* is not yet complete (some classes are missing), and also poorly tested as yet. This notice will be updated once *sercoll* has stabilized sufficiently to be ready for production use.\n\n## Integration\n\n*Sercoll* is distributed through [Maven Central](http://search.maven.org/#search|gav|1|g%3Acom.thomasjensen.sercoll), so you can just use it in your build. *Sercoll* uses [semantic versioning](http://semver.org/), so you can safely include the latest of a major version.\n\n**Gradle:**\n```groovy\ndependencies {\n    compile group: 'com.thomasjensen.sercoll', name: 'sercoll', version: '0.+'\n}\n```\n**Maven:**\n```xml\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.thomasjensen.sercoll\u003c/groupId\u003e\n    \u003cartifactId\u003esercoll\u003c/artifactId\u003e\n    \u003cversion\u003e0.7.0\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n**Download:**\nYou can also [download](https://repo1.maven.org/maven2/com/thomasjensen/sercoll/sercoll/) the JAR manually, of course.\n\n## Resources\n\n[Javadoc](http://tsjensen.github.io/sercoll/apidocs/latest/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjensen%2Fsercoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsjensen%2Fsercoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjensen%2Fsercoll/lists"}