{"record":{"id":"cee209a53d457540","repo":"quarkusio/quarkus","slug":"stream-id-does-not-include-any-release","errorCode":null,"errorMessage":"Stream ${id} does not include any release","messagePattern":"Stream (.+?) does not include any release","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/catalog/PlatformStream.java","lineNumber":26,"sourceCode":"import io.quarkus.registry.json.JsonBuilder;\n\npublic interface PlatformStream {\n\n    String getId();\n\n    String getName();\n\n    Collection<PlatformRelease> getReleases();\n\n    Map<String, Object> getMetadata();\n\n    PlatformRelease getRelease(PlatformReleaseVersion version);\n\n    @JsonIgnore\n    default PlatformRelease getRecommendedRelease() {\n        final Collection<PlatformRelease> releases = getReleases();\n        if (releases.isEmpty()) {\n            throw new RuntimeException(\"Stream \" + getId() + \" does not include any release\");\n        }\n        return releases.iterator().next();\n    }\n\n    default Mutable mutable() {\n        return new PlatformStreamImpl.Builder(this);\n    }\n\n    interface Mutable extends PlatformStream, JsonBuilder<PlatformStream> {\n        Mutable setId(String id);\n\n        Mutable setName(String name);\n\n        Mutable setReleases(Collection<PlatformRelease> releases);\n\n        Mutable addRelease(PlatformRelease platformRelease);\n\n        Mutable setMetadata(Map<String, Object> metadata);","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/catalog/PlatformStream.java#L8-L44","documentation":"PlatformStream.getRecommendedRelease() returns the first release of the stream. When the stream contains no releases it throws RuntimeException naming the stream id, since there is no release to recommend. This signals incomplete platform stream data in the registry catalog.","triggerScenarios":"Calling getRecommendedRelease() on a PlatformStream whose releases array is empty — a stream entry published without any PlatformRelease, or all releases removed/filtered from the stream in the platform catalog JSON.","commonSituations":"A stream placeholder (e.g. 3.99.x) created before any release was published; a mirrored registry out of sync; releases pruned from a stream by registry maintenance.","solutions":["Check getReleases().isEmpty() before calling getRecommendedRelease().","Target a stream that has published releases (usually a released stream, not a placeholder).","Republish/fix the stream's releases in the registry catalog.","Catch the RuntimeException and fall back to another stream or platform."],"exampleFix":"// before\nPlatformRelease r = stream.getRecommendedRelease(); // throws if empty\n// after\nif (!stream.getReleases().isEmpty()) {\n    PlatformRelease r = stream.getRecommendedRelease();\n}","handlingStrategy":"type-guard","validationCode":"// Java\nif (stream == null || stream.getReleases() == null || stream.getReleases().isEmpty()) {\n    // choose a stream that actually has releases\n}","typeGuard":"// Java\nstatic Optional<PlatformRelease> recommendedReleaseOrNull(PlatformStream s) {\n    return (s == null || s.getReleases().isEmpty())\n            ? Optional.empty()\n            : Optional.of(s.getReleases().iterator().next());\n}","tryCatchPattern":"// Java\ntry {\n    PlatformRelease r = stream.getRecommendedRelease();\n} catch (RuntimeException e) {\n    if (e.getMessage().endsWith(\"does not include any release\")) {\n        // fall back to a released stream\n    }\n    throw e;\n}","preventionTips":["Guard getReleases().isEmpty() before calling getRecommendedRelease().","Treat placeholder streams (pre-release tracks) as possibly empty.","Use getRelease(version) with an explicit version when you know the target.","Verify mirrored platform catalogs include all published releases."],"tags":["catalog","platform","empty-collection"],"backgroundTag":"empty-stream-releases","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}