Skip to content

Commit

Permalink
Refactor deleteCursor method: Change to private and reset cursorId af…
Browse files Browse the repository at this point in the history
…ter deletion

- Changed the visibility of the deleteCursor method to private to encapsulate cursor deletion logic.
- Added logic to reset cursorId to null after successfully deleting the cursor.
- Ensured better encapsulation and state management within the KintoneClient class.
  • Loading branch information
kentoyoshida committed Jul 3, 2024
1 parent 7ea1790 commit 4eebddc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/embulk/input/kintone/KintoneClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ public void createCursor(final PluginTask task, final Schema schema)
}
}

public void deleteCursor()
private void deleteCursor()
{
if (this.cursorId != null) {
try {
this.recordClient.deleteCursor(this.cursorId);
this.cursorId = null;
}
catch (KintoneApiRuntimeException e) {
this.logger.error(e.toString());
Expand Down

0 comments on commit 4eebddc

Please sign in to comment.