Skip to content

Commit fdfb28f

Browse files
committed
Rename param variable name in cursoradapter and loader libraries to resolve refdoc generation issues
If method A has JavaDoc for its param name and method B overrides method A, method B's param variable(s) must match the spelling of method A's param variable(s). If they don't match, Dackka errors when processing the JavaDoc. Bug: 19208685 Test: presubmit Change-Id: Idc96605c52ef03e82f74ba37207b0769e0e831f0
1 parent 5c05e73 commit fdfb28f

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎cursoradapter/cursoradapter/src/main/java/androidx/cursoradapter/widget/SimpleCursorAdapter.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,12 @@ private void findColumns(Cursor c, String[] from) {
328328
}
329329

330330
@Override
331-
public Cursor swapCursor(Cursor c) {
331+
public Cursor swapCursor(Cursor newCursor) {
332332
// super.swapCursor() will notify observers before we have
333333
// a valid mapping, make sure we have a mapping before this
334334
// happens
335-
findColumns(c, mOriginalFrom);
336-
return super.swapCursor(c);
335+
findColumns(newCursor, mOriginalFrom);
336+
return super.swapCursor(newCursor);
337337
}
338338

339339
/**

‎loader/loader/src/main/java/androidx/loader/content/CursorLoader.java‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,22 @@ public void cancelLoadInBackground() {
9696

9797
/* Runs on the UI thread */
9898
@Override
99-
public void deliverResult(@Nullable Cursor cursor) {
99+
public void deliverResult(@Nullable Cursor data) {
100100
if (isReset()) {
101101
// An async query came in while the loader is stopped
102-
if (cursor != null) {
103-
cursor.close();
102+
if (data != null) {
103+
data.close();
104104
}
105105
return;
106106
}
107107
Cursor oldCursor = mCursor;
108-
mCursor = cursor;
108+
mCursor = data;
109109

110110
if (isStarted()) {
111-
super.deliverResult(cursor);
111+
super.deliverResult(data);
112112
}
113113

114-
if (oldCursor != null && oldCursor != cursor && !oldCursor.isClosed()) {
114+
if (oldCursor != null && oldCursor != data && !oldCursor.isClosed()) {
115115
oldCursor.close();
116116
}
117117
}
@@ -171,9 +171,9 @@ protected void onStopLoading() {
171171
}
172172

173173
@Override
174-
public void onCanceled(@Nullable Cursor cursor) {
175-
if (cursor != null && !cursor.isClosed()) {
176-
cursor.close();
174+
public void onCanceled(@Nullable Cursor data) {
175+
if (data != null && !data.isClosed()) {
176+
data.close();
177177
}
178178
}
179179

0 commit comments

Comments
 (0)