{"record":{"id":"03a7ce819c86b322","repo":"quarkusio/quarkus","slug":"values-was-null","errorCode":null,"errorMessage":"values was null","messagePattern":"values was null","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/jaxrs/LinkBuilderImpl.java","lineNumber":115,"sourceCode":"            throw new IllegalArgumentException(\"param was null\");\n        URI built = null;\n        if (uriBuilder == null) {\n            built = baseUri;\n        } else {\n            built = this.uriBuilder.build(values);\n        }\n        if (!built.isAbsolute() && baseUri != null) {\n            built = baseUri.resolve(built);\n        }\n        return new LinkImpl(built, this.map);\n    }\n\n    @Override\n    public Link buildRelativized(URI uri, Object... values) {\n        if (uri == null)\n            throw new IllegalArgumentException(\"URI was null\");\n        if (values == null)\n            throw new IllegalArgumentException(\"values was null\");\n        URI built = uriBuilder.build(values);\n        URI with = built;\n        if (baseUri != null)\n            with = baseUri.resolve(built);\n        return new LinkImpl(uri.relativize(with), this.map);\n    }\n\n    @Override\n    public Link.Builder baseUri(URI uri) {\n        this.baseUri = uri;\n        return this;\n    }\n\n    @Override\n    public Link.Builder baseUri(String uri) {\n        this.baseUri = URI.create(uri);\n        return this;\n    }","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/jaxrs/LinkBuilderImpl.java#L97-L133","documentation":"IllegalArgumentException from LinkBuilderImpl.buildRelativized (and the related build overloads): the varargs values array passed for URI template substitution is null. A sentinel null-check guard on builder input; the values argument is at fault.","triggerScenarios":"Calling buildRelativized(uri, (Object[]) null).","commonSituations":"Nullable arrays built at runtime; passing a null List's toArray result from an uninitialized collection.","solutions":["Pass an empty array instead of null when no values are needed.","Initialize: values != null ? values : new Object[0].","Ensure collections feeding the array are initialized."],"exampleFix":"// before\nLink link = builder.buildRelativized(uri, params);\n// after\nLink link = builder.buildRelativized(uri, params != null ? params : new Object[0]);","handlingStrategy":"validation","validationCode":"Object[] safeValues = values != null ? values : new Object[0];","typeGuard":"Object[] nonNullOrArray(Object[] values) { return values != null ? values : new Object[0]; }","tryCatchPattern":"try { return builder.buildRelativized(uri, values); } catch (IllegalArgumentException e) { return builder.buildRelativized(uri); }","preventionTips":["Initialize collections feeding the values array","Pass an empty array instead of null for no template values","Add null-checks at API boundaries that forward varargs"],"tags":["jax-rs","null-argument","uri-template"],"backgroundTag":"null-argument-illegal-argument","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"}