Skip to content

Commit 4eebddc

Browse files
committed
Refactor deleteCursor method: Change to private and reset cursorId after 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.
1 parent 7ea1790 commit 4eebddc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/embulk/input/kintone/KintoneClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,12 @@ public void createCursor(final PluginTask task, final Schema schema)
125125
}
126126
}
127127

128-
public void deleteCursor()
128+
private void deleteCursor()
129129
{
130130
if (this.cursorId != null) {
131131
try {
132132
this.recordClient.deleteCursor(this.cursorId);
133+
this.cursorId = null;
133134
}
134135
catch (KintoneApiRuntimeException e) {
135136
this.logger.error(e.toString());

0 commit comments

Comments
 (0)