{"id":28317590,"url":"https://github.com/karlamoe/unsafe-accessor","last_synced_at":"2026-01-15T22:18:59.032Z","repository":{"id":57733797,"uuid":"298476004","full_name":"karlamoe/unsafe-accessor","owner":"karlamoe","description":"A bridge to access sun.misc.Unsafe \u0026 jdk.internal.misc.Unsafe","archived":false,"fork":false,"pushed_at":"2026-01-09T14:05:43.000Z","size":480,"stargazers_count":27,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-13T19:24:13.442Z","etag":null,"topics":["java","jdk","jvm","reflect","reflection","security","tool","tools","unsafe"],"latest_commit_sha":null,"homepage":"https://karlatemp.github.io/blog-me/reflect/0.index.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karlamoe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-25T05:26:14.000Z","updated_at":"2026-01-09T14:05:47.000Z","dependencies_parsed_at":"2025-05-25T06:12:27.014Z","dependency_job_id":"b708e27b-d587-4b7f-833a-23129eb36da3","html_url":"https://github.com/karlamoe/unsafe-accessor","commit_stats":null,"previous_names":["karlamoe/unsafe-accessor","karlatemp/unsafeaccessor"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/karlamoe/unsafe-accessor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlamoe%2Funsafe-accessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlamoe%2Funsafe-accessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlamoe%2Funsafe-accessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlamoe%2Funsafe-accessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karlamoe","download_url":"https://codeload.github.com/karlamoe/unsafe-accessor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlamoe%2Funsafe-accessor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28472626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:13:38.078Z","status":"ssl_error","status_checked_at":"2026-01-15T22:12:11.737Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["java","jdk","jvm","reflect","reflection","security","tool","tools","unsafe"],"created_at":"2025-05-25T06:12:22.287Z","updated_at":"2026-01-15T22:18:59.016Z","avatar_url":"https://github.com/karlamoe.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unsafe Accessor\n\n\u003e [Legacy repository location](https://github.com/karlamoe/unsafe-accessor/tree/master)\n\nUnsafe Accessor is a bridge to access Unsafe (`sun.misc.Unsafe` or `jdk.internal.misc.Unsafe`)\n\n## Modules\n\n\u003e Maven group: `moe.karla.unsafe`\n\n| Module                          | Description                                                                                                                                                                                               |\n|---------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `unsafe-accessor-root`          | The main module for unsafe access.\u003cbr/\u003eThis module provides the minimal API for:\u003cbr/\u003e\u003cli\u003e`AccessibleObject.setAccessible`\u003c/li\u003e\u003cli\u003e`Unsafe.allocateObject`\u003c/li\u003e\u003cli\u003e`MethodHandles.Lookup.IMPL_LOOKUP`\u003c/li\u003e |\n| `unsafe-accessor-security`      | The module for controlling the direct access for unsafe api.                                                                                                                                              |\n| `unsafe-accessor-unsafe`        | Provide the bridge for accessing `jdk.internal.misc.Unsafe` or `sun.misc.Unsafe`                                                                                                                          |\n| `unsafe-accessor-module-editor` | The helper to calling `Module.addOpens`                                                                                                                                                                   |\n| `unsafe-accessor-definer`       | The helper to defining classes with any classloader                                                                                                                                                       |\n\n[![Unsafe Root version](https://img.shields.io/maven-central/v/moe.karla.unsafe/unsafe-accessor-root?label=unsafe-accessor-root)](https://central.sonatype.com/artifact/moe.karla.unsafe/unsafe-accessor-root)\n[![Unsafe Bridge version](https://img.shields.io/maven-central/v/moe.karla.unsafe/unsafe-accessor-root?label=unsafe-accessor-unsafe)](https://central.sonatype.com/artifact/moe.karla.unsafe/unsafe-accessor-unsafe)\n\n## Technical Information\n\n### JLink \u0026 java module system\n\nUnsafe accessor is compatible with the Java module system.\nWhen you're packing your application with jlink, you may need define unsafe-accessor's module.\n\n| Module name                      | Description                                                                                                                    |\n|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `moe.karla.unsafe.security`      | Required. The security layer of UnsafeAccessor                                                                                 |\n| `moe.karla.unsafe.root`          | Required. The basic API of UnsafeAccessor                                                                                      |\n| `jdk.unsupported`                | Suggested. You have to add `--add-opens java.base/java.base.invoke=moe.karla.unsafe.root` if you dont include this JDK module. |\n| `moe.karla.unsafe.unsafe`        | Optional. This is a optional module that provide API view of jdk.internal.misc.Unsafe                                          |\n| `moe.karla.unsafe.unsafe.j9`     | _Required_. This module is the implementation of Java9+ unsafe object api bridge.                                              |\n| `moe.karla.unsafe.module.editor` | Optional. This is a optional module that provide a helper for calling `Module#addOpens`                                        |\n| `moe.karla.unsafe.definer`       | Optional. This is a optional module that provide a helper for defining classes with any classloader                            |\n\n\u003e Note: If you are using Compose Multiplatform, you may include unsafe-accessor modules via compose configuration\n\u003e too. \u003cbr/\u003e\n\u003e See https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-native-distribution.html#including-jdk-modules\n\n### Android\n\n\u003e [!WARNING]\n\u003e\n\u003e NOT SUPPORTED ON ANDROID.\n\u003e\n\u003e Just like the name of the project, unsafe accessor is UNSAFE.\n\u003e It relies heavily on the high degree of freedom of the JVM platform,\n\u003e which may unsupported on Android platform.\n\u003e\n\u003e Integration of UnsafeAccessor into Android is untested and unsupported.\n\n\nThe unsafe accessor is highly dependent on\n[`java.lang.invoke`](https://developer.android.com/reference/java/lang/invoke/package-summary)(API Level 26, Android 8)\n\nThe core of UnsafeAccessor is getting the private protected field `java.lang.invoke.MethodHandles$Lookup#IMPL_LOOKUP`,\nwhich can be got via reflection (java 8).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarlamoe%2Funsafe-accessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarlamoe%2Funsafe-accessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarlamoe%2Funsafe-accessor/lists"}