no need for protected access modifier

This commit is contained in:
Kermina Awad 2020-06-09 23:23:42 -04:00
parent 4f41b7aa6e
commit b4a4519876
5 changed files with 12 additions and 12 deletions

View File

@ -23,7 +23,7 @@ class BitlyURLShortener extends URLShortener {
* {@inheritDoc}
*/
@Override
protected String encodeData(String data) {
String encodeData(String data) {
JSONObject json = new JSONObject();
json.put("domain", "j.mp");
json.put("long_url", data);
@ -34,7 +34,7 @@ class BitlyURLShortener extends URLShortener {
* {@inheritDoc}
*/
@Override
protected String encodeData(Map<String, String> data) {
String encodeData(Map<String, String> data) {
throw new UnsupportedOperationException();
}

View File

@ -21,14 +21,14 @@ public class GitHubPasteService extends PasteService {
}
@Override
public String encodeData(String data) {
String encodeData(String data) {
Map<String, String> mapData = new HashMap<String, String>();
mapData.put("multiverse.txt", data);
return this.encodeData(mapData);
}
@Override
public String encodeData(Map<String, String> files) {
String encodeData(Map<String, String> files) {
JSONObject root = new JSONObject();
root.put("description", "Multiverse-Core Debug Info");
root.put("public", !this.isPrivate);

View File

@ -21,7 +21,7 @@ class HastebinPasteService extends PasteService {
* {@inheritDoc}
*/
@Override
public String encodeData(String data) {
String encodeData(String data) {
return data;
}
@ -29,7 +29,7 @@ class HastebinPasteService extends PasteService {
* {@inheritDoc}
*/
@Override
public String encodeData(Map<String, String> data) {
String encodeData(Map<String, String> data) {
throw new UnsupportedOperationException();
}

View File

@ -23,7 +23,7 @@ public abstract class HttpAPIClient {
/**
* Types of data that can be sent.
*/
protected enum ContentType {
enum ContentType {
JSON,
PLAINTEXT,
URLENCODED
@ -53,7 +53,7 @@ public abstract class HttpAPIClient {
* @param data The raw data to encode.
* @return A URL-encoded string.
*/
protected abstract String encodeData(String data);
abstract String encodeData(String data);
/**
* Encode the given Map data into a format suitable for transmission in an HTTP request.
@ -61,7 +61,7 @@ public abstract class HttpAPIClient {
* @param data The raw data to encode.
* @return A URL-encoded string.
*/
protected abstract String encodeData(Map<String, String> data);
abstract String encodeData(Map<String, String> data);
/**
* Executes this API-Request.
@ -70,7 +70,7 @@ public abstract class HttpAPIClient {
* @return The result (as text).
* @throws IOException When the I/O-operation failed.
*/
protected final String exec(String payload, ContentType type) throws IOException {
final String exec(String payload, ContentType type) throws IOException {
BufferedReader rd = null;
OutputStreamWriter wr = null;

View File

@ -21,7 +21,7 @@ class PastebinPasteService extends PasteService {
* {@inheritDoc}
*/
@Override
public String encodeData(String data) {
String encodeData(String data) {
try {
return URLEncoder.encode("api_dev_key", "UTF-8") + "=" + URLEncoder.encode("d61d68d31e8e0392b59b50b277411c71", "UTF-8") +
"&" + URLEncoder.encode("api_option", "UTF-8") + "=" + URLEncoder.encode("paste", "UTF-8") +
@ -38,7 +38,7 @@ class PastebinPasteService extends PasteService {
* {@inheritDoc}
*/
@Override
public String encodeData(Map<String, String> data) {
String encodeData(Map<String, String> data) {
throw new UnsupportedOperationException();
}