{"record":{"id":"7c0e457f7b0a2e57","repo":"xpipe-io/xpipe","slug":"name-is-empty","errorCode":null,"errorMessage":"Name is empty","messagePattern":"Name is empty","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java","lineNumber":181,"sourceCode":"                null,\n                null);\n    }\n\n    public static DataStoreEntry createNew(@NonNull NameableStore store) {\n        return createNew(\n                UUID.randomUUID(), DataStorage.get().getSelectedCategory().getUuid(), store.getName(), store);\n    }\n\n    public static DataStoreEntry createNew(@NonNull String name, DataStore store) {\n        return createNew(\n                UUID.randomUUID(), DataStorage.get().getSelectedCategory().getUuid(), name, store);\n    }\n\n    @SneakyThrows\n    public static DataStoreEntry createNew(\n            @NonNull UUID uuid, @NonNull UUID categoryUuid, @NonNull String name, DataStore store) {\n        if (name.isBlank()) {\n            throw new IllegalArgumentException(\"Name is empty\");\n        }\n\n        var storeNode = DataStoreEntryNode.of(store);\n        var validity =\n                store == null ? Validity.LOAD_FAILED : store.isComplete() ? Validity.COMPLETE : Validity.INCOMPLETE;\n        var now = Instant.now();\n        var entry = new DataStoreEntry(\n                null,\n                uuid,\n                categoryUuid,\n                name.strip(),\n                now,\n                now,\n                now,\n                true,\n                validity,\n                null,\n                false,","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/xpipe-io/xpipe/blob/d85ca821baa46092a320ebb13546d7240adb74f8/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java#L163-L199","documentation":"DataStoreEntry.createNew(uuid, categoryUuid, name, store) validates that the entry name is non-blank before creating the storage entry, because names are used as identifiers/labels in the vault UI and storage. A blank name (empty or whitespace-only) throws IllegalArgumentException.","triggerScenarios":"Calling DataStoreEntry.createNew(...) with name == \"\" or a whitespace-only string; the method is annotated @NonNull so passing null fails even earlier; typically reached from createNew overloads that generate a name from user input.","commonSituations":"Adding a store connection via API/script where the name field was left empty; a UI dialog bypassed or automated that did not enforce a name; import/migration code that lost the name field.","solutions":["Provide a non-blank name, e.g. default to a generated name when input is blank.","Trim and validate user-supplied names before calling createNew.","If the name comes from an import file, check the source record has a populated name field."],"exampleFix":"// before\nvar entry = DataStoreEntry.createNew(uuid, catId, userInputName, store); // throws if blank\n// after\nString name = userInputName == null || userInputName.isBlank() ? \"New store \" + uuid : userInputName.trim();\nvar entry = DataStoreEntry.createNew(uuid, catId, name, store);","handlingStrategy":"validation","validationCode":"if (name == null || name.isBlank()) {\n    name = \"Store \" + UUID.randomUUID();\n}","typeGuard":null,"tryCatchPattern":"try {\n    DataStoreEntry.createNew(uuid, catId, name, store);\n} catch (IllegalArgumentException e) {\n    // retry with a generated default name\n}","preventionTips":["Validate/trim names at input boundaries (UI, scripts, imports).","Generate a default name when user input is blank.","Enforce @NonNull-style checks before calling storage APIs."],"tags":["java","validation","illegal-argument","blank-name"],"backgroundTag":"empty-required-field","analyzedSha":"d85ca821baa46092a320ebb13546d7240adb74f8","analyzedAt":"2026-09-06T14:30:08.251Z","contentChangedAt":"2026-09-06T14:30:08.251Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}