Skip to content

Commit 51e57bd

Browse files
committed
Minor refactor.
1 parent d6615c6 commit 51e57bd

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

data/src/main/java/com/fernandocejas/android10/sample/data/exception/RepositoryErrorBundle.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,7 +16,6 @@
1616
package com.fernandocejas.android10.sample.data.exception;
1717

1818
import com.fernandocejas.android10.sample.domain.exception.ErrorBundle;
19-
import com.fernandocejas.frodo.core.strings.Strings;
2019

2120
/**
2221
* Wrapper around Exceptions used to manage errors in the repository.
@@ -36,7 +35,7 @@ public Exception getException() {
3635

3736
@Override
3837
public String getErrorMessage() {
39-
String message = Strings.EMPTY;
38+
String message = "";
4039
if (this.exception != null) {
4140
message = this.exception.getMessage();
4241
}

data/src/main/java/com/fernandocejas/android10/sample/data/net/RestApiImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ public RestApiImpl(Context context, UserEntityJsonMapper userEntityJsonMapper) {
9292
}
9393

9494
private String getUserEntitiesFromApi() throws MalformedURLException {
95-
return ApiConnection.createGET(RestApi.API_URL_GET_USER_LIST).requestSyncCall();
95+
return ApiConnection.createGET(API_URL_GET_USER_LIST).requestSyncCall();
9696
}
9797

9898
private String getUserDetailsFromApi(int userId) throws MalformedURLException {
99-
String apiUrl = RestApi.API_URL_GET_USER_DETAILS + userId + ".json";
99+
String apiUrl = API_URL_GET_USER_DETAILS + userId + ".json";
100100
return ApiConnection.createGET(apiUrl).requestSyncCall();
101101
}
102102

data/src/main/java/com/fernandocejas/android10/sample/data/repository/datasource/CloudUserDataStore.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* {@link UserDataStore} implementation based on connections to the api (Cloud).
2727
*/
28-
public class CloudUserDataStore implements UserDataStore {
28+
class CloudUserDataStore implements UserDataStore {
2929

3030
private final RestApi restApi;
3131
private final UserCache userCache;
@@ -42,7 +42,7 @@ public class CloudUserDataStore implements UserDataStore {
4242
* @param restApi The {@link RestApi} implementation to use.
4343
* @param userCache A {@link UserCache} to cache data retrieved from the api.
4444
*/
45-
public CloudUserDataStore(RestApi restApi, UserCache userCache) {
45+
CloudUserDataStore(RestApi restApi, UserCache userCache) {
4646
this.restApi = restApi;
4747
this.userCache = userCache;
4848
}

data/src/main/java/com/fernandocejas/android10/sample/data/repository/datasource/DiskUserDataStore.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* {@link UserDataStore} implementation based on file system data store.
2525
*/
26-
public class DiskUserDataStore implements UserDataStore {
26+
class DiskUserDataStore implements UserDataStore {
2727

2828
private final UserCache userCache;
2929

@@ -32,7 +32,7 @@ public class DiskUserDataStore implements UserDataStore {
3232
*
3333
* @param userCache A {@link UserCache} to cache data retrieved from the api.
3434
*/
35-
public DiskUserDataStore(UserCache userCache) {
35+
DiskUserDataStore(UserCache userCache) {
3636
this.userCache = userCache;
3737
}
3838

data/src/test/java/com/fernandocejas/android10/sample/data/ApplicationTestCase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
* Inherit from this class to create a test.
2525
*/
2626
@RunWith(RobolectricGradleTestRunner.class)
27-
@Config(constants = BuildConfig.class, application = ApplicationStub.class)
27+
@Config(constants = BuildConfig.class, application = ApplicationStub.class, sdk = 21)
2828
public abstract class ApplicationTestCase {}

0 commit comments

Comments
 (0)