Skip to content

Commit 1785e9b

Browse files
committed
Fix some codacy issues
1 parent c712b56 commit 1785e9b

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

app/src/main/java/fr/free/nrw/commons/CommonsApplication.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ public CommonsApplication() {
9898
}
9999

100100
public static CommonsApplication getInstance() {
101-
if(instance == null) {
101+
if (instance == null) {
102102
instance = new CommonsApplication();
103103
}
104104
return instance;
105105
}
106106

107107
public AbstractHttpClient getHttpClient() {
108-
if(httpClient == null) {
108+
if (httpClient == null) {
109109
httpClient = newHttpClient();
110110
}
111111
return httpClient;
@@ -123,7 +123,7 @@ private AbstractHttpClient newHttpClient() {
123123
}
124124

125125
public MWApi getMWApi() {
126-
if(api == null) {
126+
if (api == null) {
127127
api = newMWApi();
128128
}
129129
return api;
@@ -134,14 +134,14 @@ private MWApi newMWApi() {
134134
}
135135

136136
public CacheController getCacheData() {
137-
if(cacheData == null) {
137+
if (cacheData == null) {
138138
cacheData = new CacheController();
139139
}
140140
return cacheData;
141141
}
142142

143143
public RequestQueue getVolleyQueue() {
144-
if(volleyQueue == null) {
144+
if (volleyQueue == null) {
145145
DiskBasedCache cache = new DiskBasedCache(getCacheDir(), 16 * 1024 * 1024);
146146
volleyQueue = new RequestQueue(cache, new BasicNetwork(new HurlStack()));
147147
volleyQueue.start();
@@ -150,7 +150,7 @@ public RequestQueue getVolleyQueue() {
150150
}
151151

152152
public synchronized DBOpenHelper getDBOpenHelper() {
153-
if(dbOpenHelper == null) {
153+
if (dbOpenHelper == null) {
154154
dbOpenHelper = new DBOpenHelper(this);
155155
}
156156
return dbOpenHelper;

app/src/main/java/fr/free/nrw/commons/auth/SignupActivity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
4040
//Signup success, so clear cookies, notify user, and load LoginActivity again
4141
Timber.d("Overriding URL %s", url);
4242

43-
Toast toast = Toast.makeText(CommonsApplication.getInstance(), "Account created!", Toast.LENGTH_LONG);
43+
Toast toast = Toast.makeText(
44+
CommonsApplication.getInstance(),
45+
"Account created!",
46+
Toast.LENGTH_LONG
47+
);
4448
toast.show();
4549

4650
Intent intent = new Intent(CommonsApplication.getInstance(), LoginActivity.class);

0 commit comments

Comments
 (0)