Skip to content

Commit 8d0b8e9

Browse files
committed
Fixed various javadoc related warning
1 parent 2444906 commit 8d0b8e9

File tree

7 files changed

+29
-41
lines changed

7 files changed

+29
-41
lines changed

drfapi/src/main/java/com/civilmachines/drfapi/DefaultAPIErrorListener.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@
44

55

66
/**
7-
* A class that implements all abstract method of DjangoErrorListener via a
8-
* blank body.
7+
* A class that implements all abstract method of DjangoErrorListener with blank
8+
* function body. It requires user to override and implement the same in activity
9+
* where Django Request is being created. This way, user has access to all activity/
10+
* context based variables.
911
*
1012
* Programmer is expected to use this in a following manner:
11-
* <pre>
12-
* {@code
13-
* new DefaultAPIErrorListener() {
14-
* @Override
15-
* public void onNetworkError(String response){
16-
* // Do something
17-
* // Use variable present in activity/class such as alert dialog etc.
18-
* }
19-
* }
20-
* }
21-
* </pre>
22-
* @author Himanshu Shankar (https://himanshus.com)
23-
* @author Divya Tiwari (https://divyatiwari.me)
13+
*
14+
* <pre>{@code
15+
* new DefaultAPIErrorListener(){
16+
* public void onNetworkError(String response){
17+
* // Do something
18+
* // Use variable present in activity/class such as alert dialog etc.
19+
* }
20+
* };
21+
* }</pre>
22+
*
23+
* @author <a href=https://himanshus.com target=_blank>Himanshu Shankar</a>
24+
* @author <a href="https://divyatiwari.me" target="_blank">Divya Tiwari</a>
2425
*/
2526
public class DefaultAPIErrorListener extends DjangoErrorListener {
2627

drfapi/src/main/java/com/civilmachines/drfapi/DjangoBaseRequest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
*
3535
* @param <T> specifies the format in which response will come
3636
*
37-
* @author Himanshu Shankar (https://himanshus.com)
38-
* @author Divya Tiwari (https://divyatiwari.me)
37+
* @author <a href="https://himanshus.com" target="_blank">Himanshu Shankar</a>
38+
* @author <a href="https://divyatiwari.me" target="_blank">Divya Tiwari</a>
3939
*/
4040
public abstract class DjangoBaseRequest<T> extends JsonRequest<T> {
4141

@@ -58,8 +58,6 @@ public abstract class DjangoBaseRequest<T> extends JsonRequest<T> {
5858
* @param errorListener Error listener, or null to ignore errors.
5959
* @param context Context for accessing SharedPreference (used in headers)
6060
*
61-
* @author Himanshu Shankar (https://himanshus.com)
62-
* @author Divya Tiwari (https://divyatiwari.me)
6361
*/
6462
public DjangoBaseRequest(int method,
6563
String url,
@@ -78,7 +76,6 @@ public DjangoBaseRequest(int method,
7876
* Sets Content-Type to application/json
7977
* Checks for presence of token in SharedPreferenceAdapter and sets it.
8078
* @return Map a Map of headers
81-
* @author Himanshu Shankar (https://himanshus.com)
8279
*/
8380
@Override
8481
public Map<String, String> getHeaders() {

drfapi/src/main/java/com/civilmachines/drfapi/DjangoErrorListener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@
3030
import org.json.JSONObject;
3131

3232
/**
33-
* An abstract class that implements {@link Response.ErrorListener} and handles
33+
* An abstract class that implements {@link com.android.volley.Response.ErrorListener} and handles
3434
* error commonly raised by Django REST Framework based REST APIs.
3535
*
3636
* This class has 18 abstract functions that are required to be implemented.
3737
*
3838
* onErrorResponse function parses an error from API and invokes appropriate
3939
* function.
4040
*
41-
* @author Himanshu Shankar (https://himanshus.com)
42-
* @author Divya Tiwar (https://divyatiwari.me)
41+
* @author <a href="https://himanshus.com" target="_blank">Himanshu Shankar</a>
42+
* @author <a href="https://divyatiwari.me" target="_blank">Divya Tiwari</a>
4343
*/
4444
public abstract class DjangoErrorListener implements Response.ErrorListener {
4545

drfapi/src/main/java/com/civilmachines/drfapi/DjangoJSONArrayResponseRequest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* Creates request on Django APIs where response is in JSONArray format while request is in
3737
* JSONObject format
3838
*
39-
* @author Himanshu Shankar (https://himanshus.com)
40-
* @author Divya Tiwari (https://divyatiwari.me)
39+
* @author <a href="https://himanshus.com" target="_blank">Himanshu Shankar</a>
40+
* @author <a href="https://divyatiwari.me" target="_blank">Divya Tiwari</a>
4141
*/
4242
public class DjangoJSONArrayResponseRequest extends DjangoBaseRequest<JSONArray> {
4343
/**
@@ -52,8 +52,6 @@ public class DjangoJSONArrayResponseRequest extends DjangoBaseRequest<JSONArray>
5252
* @param errorListener Error listener, or null to ignore errors.
5353
* @param context A {@link Activity} to handle create {@link SharedPreferenceAdapter} object for token.
5454
*
55-
* @author Himanshu Shankar (https://himanshus.com)
56-
* @author Divya Tiwari (https://divyatiwari.me)
5755
*/
5856
public DjangoJSONArrayResponseRequest(int method,
5957
String url,
@@ -78,7 +76,6 @@ public DjangoJSONArrayResponseRequest(int method,
7876
* @param errorListener error listener (must implement {@link DjangoErrorListener}
7977
* @param context context for accessing SharedPreference
8078
*
81-
* @author Himanshu Shankar (https://himanshus.com)
8279
*/
8380
public DjangoJSONArrayResponseRequest(String url,
8481
@Nullable JSONObject jsonRequest,
@@ -97,8 +94,6 @@ public DjangoJSONArrayResponseRequest(String url,
9794
* @return Response.success with JSONArray format of response or
9895
* Response.error when response in non-JSONArray format
9996
*
100-
* @author Himanshu Shankar (https://himanshus.com)
101-
* @author Divya Tiwari (https://divyatiwari.me)
10297
*/
10398
@Override
10499
protected Response<JSONArray> parseNetworkResponse(NetworkResponse response) {

drfapi/src/main/java/com/civilmachines/drfapi/DjangoJSONObjectRequest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* Creates request on Django APIs where response is in JSONObject format and request is also in
3737
* JSONObject format
3838
*
39-
* @author Himanshu Shankar (https://himanshus.com)
40-
* @author Divya Tiwari (https://divyatiwari.me)
39+
* @author <a href="https://himanshus.com" target="_blank">Himanshu Shankar</a>
40+
* @author <a href="https://divyatiwari.me" target="_blank">Divya Tiwari</a>
4141
*/
4242
public class DjangoJSONObjectRequest extends DjangoBaseRequest<JSONObject> {
4343

@@ -53,8 +53,6 @@ public class DjangoJSONObjectRequest extends DjangoBaseRequest<JSONObject> {
5353
* @param errorListener Error listener, or null to ignore errors.
5454
* @param context A {@link Activity} to handle create {@link SharedPreferenceAdapter} object for token.
5555
*
56-
* @author Himanshu Shankar (https://himanshus.com)
57-
* @author Divya Tiwari (https://divyatiwari.me)
5856
*/
5957
public DjangoJSONObjectRequest(int method,
6058
String url,
@@ -77,7 +75,6 @@ public DjangoJSONObjectRequest(int method,
7775
* @param errorListener error listener (must implement {@link DjangoErrorListener}
7876
* @param context context for accessing SharedPreference
7977
*
80-
* @author Himanshu Shankar (https://himanshus.com)
8178
*/
8279
public DjangoJSONObjectRequest(String url,
8380
@Nullable JSONObject jsonRequest,
@@ -96,8 +93,6 @@ public DjangoJSONObjectRequest(String url,
9693
* @return Response.success with JSONObject format of response or
9794
* Response.error when response in non-JSONObject format
9895
*
99-
* @author Himanshu Shankar (https://himanshus.com)
100-
* @author Divya Tiwari (https://divyatiwari.me)
10196
*/
10297
@Override
10398
protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {

drfapi/src/main/java/com/civilmachines/drfapi/SharedPreferenceAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
/**
3131
* An adapter to handle Shared Preference in a uniform manner
3232
*
33-
* @author Himanshu Shankar (https://himanshus.com)
34-
* @author Divya Tiwari (https://divyatiwari.me)
33+
* @author <a href="https://himanshus.com" target="_blank">Himanshu Shankar</a>
34+
* @author <a href="https://divyatiwari.me" target="_blank">Divya Tiwari</a>
3535
*/
3636
public class SharedPreferenceAdapter {
3737

drfapi/src/main/java/com/civilmachines/drfapi/UserSharedPreferenceAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* UserSharedPreferenceAdapter.keyToken = "userToken";
1717
* </pre>
1818
*
19-
* @author Himanshu Shankar (https://himanshus.com)
20-
* @author Divya Tiwari (https://divyatiwari.me)
19+
* @author <a href="https://himanshus.com" target="_blank">Himanshu Shankar</a>
20+
* @author <a href="https://divyatiwari.me" target="_blank">Divya Tiwari</a>
2121
*/
2222
public class UserSharedPreferenceAdapter extends SharedPreferenceAdapter {
2323
public static String userPrivate = "user_private";

0 commit comments

Comments
 (0)