{"record":{"id":"c10dc70fb177a584","repo":"quarkusio/quarkus","slug":"member-cannot-be-null-c10dc7","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/GeoSearchStoreArgs.java","lineNumber":40,"sourceCode":"    private GeoUnit unit;\n\n    private long count = -1;\n    private boolean any;\n\n    /**\n     * The direction (ASC or DESC)\n     */\n    private String direction;\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 GeoSearchStoreArgs}\n     */\n    public GeoSearchStoreArgs<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 GeoSearchStoreArgs}\n     */\n    private GeoSearchStoreArgs<V> fromCoordinate(double longitude, double latitude) {\n        this.longitude = longitude;\n        this.latitude = latitude;\n        return this;\n    }\n","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/geo/GeoSearchStoreArgs.java#L22-L58","documentation":"GeoSearchStoreArgs.fromMember(member) requires a non-null member since it becomes the FROMMEMBER origin of the GEOSEARCHSTORE command. Passing null would produce an invalid Redis command, so the library fails fast with IllegalArgumentException.","triggerScenarios":"Calling geoSearchStore(...).fromMember(null), typically because the member variable was null (missing key entry, failed lookup, unmapped optional).","commonSituations":"A map lookup for the member returned null; a record/DTO field defaulted to null; refactoring changed a guaranteed member into an Optional that is passed raw.","solutions":["Pass a non-null member name that exists in the geoset","Guard the value before calling fromMember and skip the search if null","Log/handle the null case upstream instead of passing it into the args builder"],"exampleFix":"// before\nString member = members.get(name); // may be null\nargs.fromMember(member);\n// after\nString member = members.get(name);\nif (member != null) {\n    args.fromMember(member);\n}","handlingStrategy":"validation","validationCode":"Objects.requireNonNull(member, \"member must not be null\");\nargs.fromMember(member);","typeGuard":"boolean isValidMember(V member) { return member != null; }","tryCatchPattern":"try {\n    args.fromMember(member);\n} catch (IllegalArgumentException e) {\n    log.warn(\"Skipping geoSearchStore: member is null\");\n}","preventionTips":["Check the member lookup result for null before building args","Use Optional<V> for possibly-missing members and unwrap explicitly","Reject nulls at the API boundary of your service"],"tags":["redis","null-argument","argument-validation","geo-commands"],"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"}