Skip to content

Commit 0cfe611

Browse files
committed
Renamed NotAuthroizedException to NotAuthorizedException.
1 parent be0c771 commit 0cfe611

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

src/main/java/io/taliox/zulip/calls/ZulipRestAPICall.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import io.taliox.zulip.controller.HttpController;
2424
import io.taliox.zulip.exceptions.BadRequestException;
2525
import io.taliox.zulip.exceptions.InvalidArgumentException;
26-
import io.taliox.zulip.exceptions.NotAuthroizedException;
26+
import io.taliox.zulip.exceptions.NotAuthorizedException;
2727

2828
public abstract class ZulipRestAPICall implements Callable {
2929

@@ -127,8 +127,8 @@ protected String performRequest(HashMap<String, String> parameters, HttpRequestB
127127
}
128128

129129
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
130-
throw new NotAuthroizedException(
131-
"Unauthroized request. Please check server settings and your provided credentials :"
130+
throw new NotAuthorizedException(
131+
"Unauthorized request. Please check server settings and your provided credentials :"
132132
+ builder.toString());
133133
}
134134

@@ -142,7 +142,7 @@ protected String performRequest(HashMap<String, String> parameters, HttpRequestB
142142
e.printStackTrace();
143143
} catch (IOException e) {
144144
e.printStackTrace();
145-
} catch (NotAuthroizedException e) {
145+
} catch (NotAuthorizedException e) {
146146
e.printStackTrace();
147147
} catch (BadRequestException e) {
148148
e.printStackTrace();
@@ -174,8 +174,8 @@ private String handleHttpUpload(File file, HttpPost post) {
174174
HttpResponse response = client.execute(post);
175175

176176
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
177-
throw new NotAuthroizedException(
178-
"Unauthroized request. Please check server settings and your provided credentials :"
177+
throw new NotAuthorizedException(
178+
"Unauthorized request. Please check server settings and your provided credentials :"
179179
+ response.getStatusLine());
180180
}
181181

@@ -190,7 +190,7 @@ private String handleHttpUpload(File file, HttpPost post) {
190190
e.printStackTrace();
191191
} catch (IOException e) {
192192
e.printStackTrace();
193-
} catch (NotAuthroizedException e) {
193+
} catch (NotAuthorizedException e) {
194194
e.printStackTrace();
195195
}
196196

Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
package io.taliox.zulip.exceptions;
2-
3-
/**
4-
* Thrown when the user credentials you provided are not valid for the Zulip
5-
* server.
6-
*/
7-
public class NotAuthroizedException extends Exception {
8-
9-
/** The Constant serialVersionUID. */
10-
private static final long serialVersionUID = 1L;
11-
12-
/** The message which is displayed when raising this exception. */
13-
private static String message;
14-
15-
/**
16-
* Instantiates a new not authroized exception.
17-
*
18-
* @param message
19-
* the message
20-
*/
21-
public NotAuthroizedException(String message) {
22-
NotAuthroizedException.message = message;
23-
}
24-
25-
/*
26-
* (non-Javadoc)
27-
*
28-
* @see java.lang.Throwable#toString()
29-
*/
30-
public String toString() {
31-
return message;
32-
}
33-
34-
}
1+
package io.taliox.zulip.exceptions;
2+
3+
/**
4+
* Thrown when the user credentials you provided are not valid for the Zulip
5+
* server.
6+
*/
7+
public class NotAuthorizedException extends Exception {
8+
9+
/** The Constant serialVersionUID. */
10+
private static final long serialVersionUID = 1L;
11+
12+
/** The message which is displayed when raising this exception. */
13+
private static String message;
14+
15+
/**
16+
* Instantiates a new not authorized exception.
17+
*
18+
* @param message
19+
* the message
20+
*/
21+
public NotAuthorizedException(String message) {
22+
NotAuthorizedException.message = message;
23+
}
24+
25+
/*
26+
* (non-Javadoc)
27+
*
28+
* @see java.lang.Throwable#toString()
29+
*/
30+
public String toString() {
31+
return message;
32+
}
33+
34+
}

0 commit comments

Comments
 (0)