{"record":{"id":"3d57e29ba452f310","repo":"quarkusio/quarkus","slug":"member-cannot-be-null","errorCode":null,"errorMessage":"`member` cannot be `null`","messagePattern":"`member` cannot be `null`","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/geo/GeoSearchArgs.java","lineNumber":46,"sourceCode":"     * The direction (ASC or DESC)\n     */\n    private String direction;\n\n    private boolean withDistance;\n\n    private boolean withCoordinates;\n\n    private boolean withHash;\n\n    /**\n     * Use the position of the given existing {@code member} in the sorted set.\n     *\n     * @param member the member, must not be {@code null}\n     * @return the current {@code GeoSearchArgs}\n     */\n    public GeoSearchArgs<V> fromMember(V member) {\n        if (member == null) {\n            throw new IllegalArgumentException(\"`member` cannot be `null`\");\n        }\n        this.member = member;\n        return this;\n    }\n\n    /**\n     * Use the given {@code longitude} and {@code latitude} position.\n     *\n     * @param longitude the longitude\n     * @param latitude the latitude\n     * @return the current {@code GeoSearchArgs}\n     */\n    public GeoSearchArgs<V> fromCoordinate(double longitude, double latitude) {\n        this.longitude = longitude;\n        this.latitude = latitude;\n        return this;\n    }\n","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/geo/GeoSearchArgs.java#L28-L64","documentation":"GeoSearchArgs.fromMember sets the origin of a geo search to an existing sorted-set member. A null member would produce a malformed GEOSEARCH command, so the method eagerly throws IllegalArgumentException with this message. The origin must be either a member name (FROMMEMBER) or coordinates (FROMLONLAT), never null.","triggerScenarios":"Calling GeoSearchArgs.fromMember(null), typically when the member value comes from a variable, request parameter, or lookup that returned null.","commonSituations":"Member names derived from user input or an upstream database record that does not exist; deserialization producing null; passing an Optional unwrapped incorrectly.","solutions":["Check the member value for null before calling fromMember and handle the absent case in caller logic","Provide coordinates via fromLongitudeLatitude(...) instead when the member may not exist","Use Objects.requireNonNull with a clear message at the source of the value to fail earlier"],"exampleFix":"// before\nString member = lookupMember(id); // may return null\nGeoSearchArgs<String> args = GeoSearchArgs.fromMember(member);\n// after\nString member = lookupMember(id);\nif (member == null) {\n    throw new WebApplicationException(Response.Status.NOT_FOUND);\n}\nGeoSearchArgs<String> args = GeoSearchArgs.fromMember(member);","handlingStrategy":"type-guard","validationCode":"if (member == null) { throw new IllegalStateException(\"member is required\"); }","typeGuard":"boolean hasMember(String m) { return m != null && !m.isBlank(); }","tryCatchPattern":"try { args.fromMember(member); } catch (IllegalArgumentException e) { return Response.status(400, e.getMessage()).build(); }","preventionTips":["Null-check member values at the boundary (REST params, lookups)","Prefer fromLongitudeLatitude when the member may not exist","Fail fast with requireNonNull at value creation"],"tags":["redis","geo","null-check","illegal-argument"],"backgroundTag":"null-argument","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}