langchain4j/langchain4j-coherence/src
Harikrishna f727e27a81
Refactor addInternal to remove redundant HashMap initialization (#3618)
### Summary
Simplified the `addInternal` method by removing unnecessary `HashMap`
initialization and redundant `putAll` call.
The method now directly inserts the chunk into `documentChunks`.

### Details
- Removed temporary `HashMap` creation used only for a single entry.
- Removed redundant `documentChunks.putAll(map)` and second `put()`
call.
- Final implementation calls `createChunk()` once and directly stores
the result in `documentChunks`.

Co-authored-by: Harikrishna <harikrishna.gurram@walmart.com>
2025-09-08 16:48:43 +02:00
..
main/java/dev/langchain4j/store Refactor addInternal to remove redundant HashMap initialization (#3618) 2025-09-08 16:48:43 +02:00
test/java/dev/langchain4j/store Add unit tests for default map name handling and fix Javadoc in Coher… (#3507) 2025-08-27 17:52:57 +02:00