{"id":37022049,"url":"https://github.com/ddimtirov/nuggets","last_synced_at":"2026-01-14T02:37:35.841Z","repository":{"id":57732958,"uuid":"67571264","full_name":"ddimtirov/nuggets","owner":"ddimtirov","description":"nuggets is (yet another) utility library for Java","archived":false,"fork":false,"pushed_at":"2022-04-12T05:33:28.000Z","size":1306,"stargazers_count":4,"open_issues_count":19,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-07-04T02:13:25.520Z","etag":null,"topics":["java","usability","utility"],"latest_commit_sha":null,"homepage":"https://ddimtirov.github.io/nuggets/javadoc/io/github/ddimitrov/nuggets/package-summary.html","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/ddimtirov.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":"2016-09-07T04:13:00.000Z","updated_at":"2023-06-28T13:26:28.000Z","dependencies_parsed_at":"2022-09-26T22:30:40.300Z","dependency_job_id":null,"html_url":"https://github.com/ddimtirov/nuggets","commit_stats":null,"previous_names":[],"tags_count":6,"template":null,"template_full_name":null,"purl":"pkg:github/ddimtirov/nuggets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddimtirov%2Fnuggets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddimtirov%2Fnuggets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddimtirov%2Fnuggets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddimtirov%2Fnuggets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddimtirov","download_url":"https://codeload.github.com/ddimtirov/nuggets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddimtirov%2Fnuggets/sbom","scorecard":{"id":330231,"data":{"date":"2025-08-11","repo":{"name":"github.com/ddimtirov/nuggets","commit":"a39f10a80e141074c22f718411d11ca33ce63ca7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.5.0 not signed: https://api.github.com/repos/ddimtirov/nuggets/releases/8195080","Warn: release artifact v0.4.0 not signed: https://api.github.com/repos/ddimtirov/nuggets/releases/6516159","Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/ddimtirov/nuggets/releases/6094760","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/ddimtirov/nuggets/releases/5246149","Warn: release artifact v0.1.0 not signed: https://api.github.com/repos/ddimtirov/nuggets/releases/4779123","Warn: release artifact v0.5.0 does not have provenance: https://api.github.com/repos/ddimtirov/nuggets/releases/8195080","Warn: release artifact v0.4.0 does not have provenance: https://api.github.com/repos/ddimtirov/nuggets/releases/6516159","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/ddimtirov/nuggets/releases/6094760","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/ddimtirov/nuggets/releases/5246149","Warn: release artifact v0.1.0 does not have provenance: https://api.github.com/repos/ddimtirov/nuggets/releases/4779123"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-3x8x-79m2-3w2w","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4","Warn: Project is vulnerable to: GHSA-3f7h-mf4q-vrm4","Warn: Project is vulnerable to: GHSA-4jrv-ppp4-jm57","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv","Warn: Project is vulnerable to: GHSA-88m4-h43f-wx84","Warn: Project is vulnerable to: GHSA-97xg-phpr-rg8q","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-599f-7c49-w659","Warn: Project is vulnerable to: GHSA-gp7f-rwcx-9369","Warn: Project is vulnerable to: GHSA-m72m-mhq2-9p6c"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T03:23:19.274Z","repository_id":57732958,"created_at":"2025-08-18T03:23:19.274Z","updated_at":"2025-08-18T03:23:19.274Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["java","usability","utility"],"created_at":"2026-01-14T02:37:35.019Z","updated_at":"2026-01-14T02:37:35.828Z","avatar_url":"https://github.com/ddimtirov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"**nuggets** is (yet another) utility library for Java. **nuggets** is a sharp tool - \nit is you who uses it for good or for evil. **nuggets** is rubber gloves for those \nof us who need to dig deep in shitty codebases. **nuggets** is an experiment in \ntransgressing the one-size-fits-all rules of thumb of \"Effective Java\". **nuggets** \nstrives to maximize the [functionality-to-code](http://www.infovis-wiki.net/index.php/Data-Ink_Ratio) \nratio, by providing a composable basis set of well chosen primitives, rather than \ncatering explicitly for every usage scenario. **nuggets** is an aesthetic exercise -\nfrom the Javadoc stylesheet, to the choice of infrastructure, I tinker and \nexperiment until the result pleases me. \n\n[![Linux/OSX Build](https://travis-ci.org/ddimtirov/nuggets.svg?branch=master)](https://travis-ci.org/ddimtirov/nuggets)\n[![Windows Build](https://ci.appveyor.com/api/projects/status/uruwl3u6eynnpok9/branch/master?svg=true)](https://ci.appveyor.com/project/ddimtirov/nuggets/branch/master)\n[![Codacy Grade](https://api.codacy.com/project/badge/Grade/0951cb36db314ff1bf69646402f4b988)](https://www.codacy.com/app/dimitar-dimitrov/nuggets?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ddimtirov/nuggets\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Coverage](https://api.codacy.com/project/badge/Coverage/0951cb36db314ff1bf69646402f4b988)](https://www.codacy.com/app/dimitar-dimitrov/nuggets?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ddimtirov/nuggets\u0026amp;utm_campaign=Badge_Coverage)\n[![codecov](https://codecov.io/gh/ddimtirov/nuggets/branch/master/graph/badge.svg)](https://codecov.io/gh/ddimtirov/nuggets) \n[![Latest Release](https://api.bintray.com/packages/ddimitrov/oss/nuggets/images/download.svg) ](https://bintray.com/ddimitrov/oss/nuggets/_latestVersion)\n[![Coverity Scan](https://scan.coverity.com/projects/10133/badge.svg)](https://scan.coverity.com/projects/ddimtirov-nuggets)\n\n### Functionality:\n\nBelow is a list of features, see the [javadocs](https://ddimtirov.github.io/nuggets/javadoc/io/github/ddimitrov/nuggets/package-summary.html) for detailed documentation, \nbrowse the sources at [sourcegraph](https://sourcegraph.com/github.com/ddimtirov/nuggets@master). \n\n- `Exceptions` - utils for [dealing with checked exceptions](https://kotlinlang.org/docs/reference/exceptions.html#checked-exceptions)\n  and [huge stacktraces](https://dzone.com/articles/filtering-stack-trace-hell)\n  - rethrow checked exception as unchecked\n  - convert throwing functional interfaces into non-throwing counterparts\n  - enable the usage of throwing methods in not-throwing lambdas\n  - enrich exception message without wrapping it\n  - cleanup exception stacktrace, causes and suppressed exceptions\n    - preset stack transformer that works for many situations\n    - preset stack transformers for Groovy MOP, Java Reflection, etc.\n    - stack transformer to get rid of some parasitic stackframes in Groovy\n  - dump an exception stacktrace to multi-line string and parse it back \n- `Extractors` - reflection utils  \n  - `peek` and `poke` to a private or final field\n  - `invokeMethod` to invoke any method with minimum ceremony  \n  - convert between wrapper and primitive classes\n  - create a default value for type (no-args constructor, zero, `false`, or `null`)\n  - safely load potentially missing classes (useful for plugins and optional functionality)\n  - dependency injection primitives (roll your custom DI injector in few lines)\n  - type linearization - walk the class inheritance tree in concrete first, then breadth \n    first, `Object` last order\n  - iterator through all constructors, fields or methods (including private inherited)\n- `TextTable` - formats complex data in logs, stdout and file reports\n  - rendering to any `Appendable` object (`StringBuilder`, `Writer`, etc.)\n  - alignment, padding, right-hand border and custom formatting per cell or column \n  - default values for optional column\n  - extensible visual styles for frames, borders, separators, headers\n  - row-group separators\n  - each cell can contain multi-line strings\n  - virtual calculated columns, based on row and column siblings\n  - hiden columns, holding data used by calcolations, but not rendered\n- `Functions` - utilities for lambdas and `java.util.function` objects\n  - decorate lambdas and functional objects with human-readable `toString()`\n  - flexible `fallback()` combinator, trying multiple functions until the \n    result matches a predicate and/or no exception is thrown. Nice error \n    reporting.\n  - composable reentrant `retry()` decorator \n  - factory for utility function objects allowing to intercept function \n    objects before/after call\n  - adaptors allowing to use `void` functions in non-void context\n- `Ports` implement a block-based port allocation pattern, useful for integration tests\n  - clean, simple and extensible API\n  - hook to customize the actual allocation algorithm.  \n  - hooks to validate and export the allocated ports to custom config mechanism \n    (i.e. generate config files, or update `System.getProperties()`)\n- `UrlStreamHandlers` provides base classes and utilities to easily incorporate \n  data URLs and custom resource-based URL handlers into any application.\n- `Threads` allows to introspect running threads, thread-groups and runnables. \n- `ReflectionProxy` is a convenient way to perform a series of reflective \n   accesses, starting from an object. Invaluable for all these cases where you \n   need to monkey-patch a vendor class (especially powerful when combined with \n   `Threads` to get access to the runnable of another thread).\n    \n- Special Groovy API  \n  - Use `Extractors` as Groovy [category](http://groovy-lang.org/metaprogramming.html#categories) \n    to decorate any object with `peekField()/pokeField()`, which can be used access private or \n    final fields as in this example: `foobar.peekField('finalField', Integer)`\n  - Any `java.lang.Class` will gain `peekField()/pokeField()` as \n    [extension methods](http://groovy-lang.org/metaprogramming.html#_extension_modules)\n    that can be used to access static private or final fields - i.e. \n    `SomeClass.pokeField('someFinalField', newValue)`\n  - Use `closure.named('name')` to decorate Closures with human-readable `toString()`\n  - Use `DelegatedClosure` when you want to write a decorator intercepting a \n    method or two of a wrapped closure.\n  - `Ports` supports array-like indexing to get ports by ID (i.e. one can write \n    `ports['http']`), as well as DSL configuration such as: \n    ```\n     def ports = Ports.continuousBlock(10) // easy config for default setup\n     ports.withPortSpec(5000) { // easy registration\n        id \"foo\"\n        id \"bar\" offset 1\n        id \"baz\"\n     }\n    ```\n  - `Threads` allows access to the runnable of threads with unique name within the scope by using\n     square-brackets notation - i.e. `threadPool['worker-thread-1']`\n  - `ReflectionProxy` allows the usage of square brackets to \n    access fields, as well as specify resolution type for shadowed fields.\n    For example, if a private field `foo` is declared in both `Parent` and `Child`\n    you can access te parent's `foo` from a child instance by doing\n    `childProxy[Parent]['foo']`.\n  - Each object gets an extra `reflectionDsl()` method which allows to use the `ReflectionProxy`\n    in more idiomatic way. Just call the methods and access the fields as properties.\n    Use square brackets to specify a resolution type. I.e. the above example would translate to\n    `chieldProxyDsl[Parent].foo`      \n        \n- Special Kotlin API\n  - Transform Exceptions in more natural way, by adding `throwable.transform {...}`\n    extension method. Added few extension methods to the transform builder.\n  - Access encapsulated fields by using `clazz.peek/pokeStaticField(...)` \n    and `instance.peek/pokeField(...)`\n  - Added `col(name) { ... }` extension method for more natural config \n    of a table column.    \n  - `Ports` supports array-like indexing to get ports by ID (i.e. one can write \n    `ports['http']`), as well as DSL configuration such as: \n    ```\n     def ports = portsBlock(10) // easy config for default setup\n     ports.withPorts(5000) { reserve -\u003e // easy registration\n        reserve port \"foo\"\n        reserve port \"bar\" at 5\n        reserve port \"baz\"\n     }\n    ```\n    \n### Non-functional Features:\n- Fat-jar friendly (don't add yet another jar to your distribution)\n  - no 3rd party dependencies at runtime \n  - some optional features take advantage of `@Inject`, `Groovy` and `Kotlin` \n    if they happen to be on the class path\n  - all components are designed with dependencies in mind, making it trivial \n    to strip the parts you don't use with something like `ProGuard`. \n- high quality testing and javadoc\n  - tested on OS X, Windows and Linux\n  - code quality checked by Findbugs, Checkstyle and Coverity\n  - test coverage tracked by Codecov\n  - Codacy dashboard tracks multiple metrics over time\n- annotated with the JetBrains annotations (helps if you use IntelliJ IDEA)\n- the naming of static methods is chosen to be easily recognizable, \n  yet reduce the chance of clashing when imported statically.\n- The performance should be reasonable, though that is not a requirement for now.\n- Most of the classes are thread-safe, and thread safety and threading policies are\n  documented in the class and method Javadoc.\n- Many of the classes are abusing reflection to flip the `accessible` bit on fields \n  and methods. As usual, if you are using security manager you need to do your testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddimtirov%2Fnuggets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddimtirov%2Fnuggets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddimtirov%2Fnuggets/lists"}