From 89065da8bbd59c4973d837c10cf63d967f6357cc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 7 Jun 2016 15:10:08 +0200 Subject: [PATCH] Refactoring: renamed package de.juplo.facebook.exceptions to errors --- src/main/java/de/juplo/facebook/FacebookUtils.java | 2 +- .../AccessTokenRequiredException.java | 2 +- .../CallbackVerificationFailedException.java | 2 +- .../{exceptions => errors}/FacebookErrorMessage.java | 2 +- .../{exceptions => errors}/GraphApiErrorHandler.java | 2 +- .../facebook/{exceptions => errors}/GraphApiException.java | 5 ++++- .../{exceptions => errors}/GraphMethodException.java | 3 ++- .../facebook/{exceptions => errors}/OAuthException.java | 2 +- .../{exceptions => errors}/PageMigratedException.java | 2 +- .../{exceptions => errors}/RateExceededException.java | 3 ++- .../{exceptions => errors}/UnexpectedErrorException.java | 2 +- .../{exceptions => errors}/UnknownErrorException.java | 2 +- .../{exceptions => errors}/UnmappedErrorException.java | 3 ++- .../UnsupportedGetRequestException.java | 3 ++- .../FacebookErrorMessageMappingTest.java | 6 +++--- .../{exceptions => errors}/GraphApiErrorHandlerTest.java | 5 +++-- .../MockClientHttpRequestFactory.java | 3 ++- 17 files changed, 29 insertions(+), 20 deletions(-) rename src/main/java/de/juplo/facebook/{exceptions => errors}/AccessTokenRequiredException.java (87%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/CallbackVerificationFailedException.java (86%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/FacebookErrorMessage.java (96%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/GraphApiErrorHandler.java (99%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/GraphApiException.java (99%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/GraphMethodException.java (86%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/OAuthException.java (85%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/PageMigratedException.java (95%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/RateExceededException.java (87%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/UnexpectedErrorException.java (85%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/UnknownErrorException.java (85%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/UnmappedErrorException.java (91%) rename src/main/java/de/juplo/facebook/{exceptions => errors}/UnsupportedGetRequestException.java (86%) rename src/test/java/de/juplo/facebook/{exceptions => errors}/FacebookErrorMessageMappingTest.java (90%) rename src/test/java/de/juplo/facebook/{exceptions => errors}/GraphApiErrorHandlerTest.java (99%) rename src/test/java/de/juplo/facebook/{exceptions => errors}/MockClientHttpRequestFactory.java (98%) diff --git a/src/main/java/de/juplo/facebook/FacebookUtils.java b/src/main/java/de/juplo/facebook/FacebookUtils.java index 1a76601..f6f6b37 100644 --- a/src/main/java/de/juplo/facebook/FacebookUtils.java +++ b/src/main/java/de/juplo/facebook/FacebookUtils.java @@ -1,8 +1,8 @@ package de.juplo.facebook; +import de.juplo.facebook.errors.GraphApiErrorHandler; import de.juplo.facebook.token.SignedRequestAwareAuthorizationCodeAccessTokenProvider; -import de.juplo.facebook.exceptions.GraphApiErrorHandler; import java.util.Arrays; import java.util.LinkedList; import java.util.List; diff --git a/src/main/java/de/juplo/facebook/exceptions/AccessTokenRequiredException.java b/src/main/java/de/juplo/facebook/errors/AccessTokenRequiredException.java similarity index 87% rename from src/main/java/de/juplo/facebook/exceptions/AccessTokenRequiredException.java rename to src/main/java/de/juplo/facebook/errors/AccessTokenRequiredException.java index c55fc36..5b54096 100644 --- a/src/main/java/de/juplo/facebook/exceptions/AccessTokenRequiredException.java +++ b/src/main/java/de/juplo/facebook/errors/AccessTokenRequiredException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; diff --git a/src/main/java/de/juplo/facebook/exceptions/CallbackVerificationFailedException.java b/src/main/java/de/juplo/facebook/errors/CallbackVerificationFailedException.java similarity index 86% rename from src/main/java/de/juplo/facebook/exceptions/CallbackVerificationFailedException.java rename to src/main/java/de/juplo/facebook/errors/CallbackVerificationFailedException.java index 5951471..27ef936 100644 --- a/src/main/java/de/juplo/facebook/exceptions/CallbackVerificationFailedException.java +++ b/src/main/java/de/juplo/facebook/errors/CallbackVerificationFailedException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; /** diff --git a/src/main/java/de/juplo/facebook/exceptions/FacebookErrorMessage.java b/src/main/java/de/juplo/facebook/errors/FacebookErrorMessage.java similarity index 96% rename from src/main/java/de/juplo/facebook/exceptions/FacebookErrorMessage.java rename to src/main/java/de/juplo/facebook/errors/FacebookErrorMessage.java index a1bd4b3..495c665 100644 --- a/src/main/java/de/juplo/facebook/exceptions/FacebookErrorMessage.java +++ b/src/main/java/de/juplo/facebook/errors/FacebookErrorMessage.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/de/juplo/facebook/exceptions/GraphApiErrorHandler.java b/src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java similarity index 99% rename from src/main/java/de/juplo/facebook/exceptions/GraphApiErrorHandler.java rename to src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java index 974bf85..13a93e8 100644 --- a/src/main/java/de/juplo/facebook/exceptions/GraphApiErrorHandler.java +++ b/src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; import java.io.ByteArrayInputStream; diff --git a/src/main/java/de/juplo/facebook/exceptions/GraphApiException.java b/src/main/java/de/juplo/facebook/errors/GraphApiException.java similarity index 99% rename from src/main/java/de/juplo/facebook/exceptions/GraphApiException.java rename to src/main/java/de/juplo/facebook/errors/GraphApiException.java index 375c5b8..45dd38a 100644 --- a/src/main/java/de/juplo/facebook/exceptions/GraphApiException.java +++ b/src/main/java/de/juplo/facebook/errors/GraphApiException.java @@ -1,4 +1,5 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; + import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; @@ -12,6 +13,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.oauth2.common.exceptions.OAuth2Exception; + + /** * Base exception for Facebook Graph-Api exceptions. * diff --git a/src/main/java/de/juplo/facebook/exceptions/GraphMethodException.java b/src/main/java/de/juplo/facebook/errors/GraphMethodException.java similarity index 86% rename from src/main/java/de/juplo/facebook/exceptions/GraphMethodException.java rename to src/main/java/de/juplo/facebook/errors/GraphMethodException.java index 7a8afc5..afe83cb 100644 --- a/src/main/java/de/juplo/facebook/exceptions/GraphMethodException.java +++ b/src/main/java/de/juplo/facebook/errors/GraphMethodException.java @@ -1,4 +1,5 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; + /** diff --git a/src/main/java/de/juplo/facebook/exceptions/OAuthException.java b/src/main/java/de/juplo/facebook/errors/OAuthException.java similarity index 85% rename from src/main/java/de/juplo/facebook/exceptions/OAuthException.java rename to src/main/java/de/juplo/facebook/errors/OAuthException.java index 2235dde..4153dbc 100644 --- a/src/main/java/de/juplo/facebook/exceptions/OAuthException.java +++ b/src/main/java/de/juplo/facebook/errors/OAuthException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; diff --git a/src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java b/src/main/java/de/juplo/facebook/errors/PageMigratedException.java similarity index 95% rename from src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java rename to src/main/java/de/juplo/facebook/errors/PageMigratedException.java index 88917dc..c339d83 100644 --- a/src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java +++ b/src/main/java/de/juplo/facebook/errors/PageMigratedException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; import java.util.regex.Matcher; diff --git a/src/main/java/de/juplo/facebook/exceptions/RateExceededException.java b/src/main/java/de/juplo/facebook/errors/RateExceededException.java similarity index 87% rename from src/main/java/de/juplo/facebook/exceptions/RateExceededException.java rename to src/main/java/de/juplo/facebook/errors/RateExceededException.java index adc0b4a..e57cc45 100644 --- a/src/main/java/de/juplo/facebook/exceptions/RateExceededException.java +++ b/src/main/java/de/juplo/facebook/errors/RateExceededException.java @@ -1,4 +1,5 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; + /** diff --git a/src/main/java/de/juplo/facebook/exceptions/UnexpectedErrorException.java b/src/main/java/de/juplo/facebook/errors/UnexpectedErrorException.java similarity index 85% rename from src/main/java/de/juplo/facebook/exceptions/UnexpectedErrorException.java rename to src/main/java/de/juplo/facebook/errors/UnexpectedErrorException.java index c639c26..72c071b 100644 --- a/src/main/java/de/juplo/facebook/exceptions/UnexpectedErrorException.java +++ b/src/main/java/de/juplo/facebook/errors/UnexpectedErrorException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; diff --git a/src/main/java/de/juplo/facebook/exceptions/UnknownErrorException.java b/src/main/java/de/juplo/facebook/errors/UnknownErrorException.java similarity index 85% rename from src/main/java/de/juplo/facebook/exceptions/UnknownErrorException.java rename to src/main/java/de/juplo/facebook/errors/UnknownErrorException.java index b38341a..7f5e8ff 100644 --- a/src/main/java/de/juplo/facebook/exceptions/UnknownErrorException.java +++ b/src/main/java/de/juplo/facebook/errors/UnknownErrorException.java @@ -1,4 +1,4 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; diff --git a/src/main/java/de/juplo/facebook/exceptions/UnmappedErrorException.java b/src/main/java/de/juplo/facebook/errors/UnmappedErrorException.java similarity index 91% rename from src/main/java/de/juplo/facebook/exceptions/UnmappedErrorException.java rename to src/main/java/de/juplo/facebook/errors/UnmappedErrorException.java index 2ed9b95..839de09 100644 --- a/src/main/java/de/juplo/facebook/exceptions/UnmappedErrorException.java +++ b/src/main/java/de/juplo/facebook/errors/UnmappedErrorException.java @@ -1,4 +1,5 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; + /** diff --git a/src/main/java/de/juplo/facebook/exceptions/UnsupportedGetRequestException.java b/src/main/java/de/juplo/facebook/errors/UnsupportedGetRequestException.java similarity index 86% rename from src/main/java/de/juplo/facebook/exceptions/UnsupportedGetRequestException.java rename to src/main/java/de/juplo/facebook/errors/UnsupportedGetRequestException.java index 6905808..4a5a9b8 100644 --- a/src/main/java/de/juplo/facebook/exceptions/UnsupportedGetRequestException.java +++ b/src/main/java/de/juplo/facebook/errors/UnsupportedGetRequestException.java @@ -1,4 +1,5 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; + /** diff --git a/src/test/java/de/juplo/facebook/exceptions/FacebookErrorMessageMappingTest.java b/src/test/java/de/juplo/facebook/errors/FacebookErrorMessageMappingTest.java similarity index 90% rename from src/test/java/de/juplo/facebook/exceptions/FacebookErrorMessageMappingTest.java rename to src/test/java/de/juplo/facebook/errors/FacebookErrorMessageMappingTest.java index ed1cba8..08fb372 100644 --- a/src/test/java/de/juplo/facebook/exceptions/FacebookErrorMessageMappingTest.java +++ b/src/test/java/de/juplo/facebook/errors/FacebookErrorMessageMappingTest.java @@ -1,9 +1,9 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; import com.fasterxml.jackson.core.JsonProcessingException; -import static de.juplo.facebook.exceptions.GraphApiException.OBJECT_MAPPER; -import de.juplo.facebook.exceptions.GraphApiException.Type; +import static de.juplo.facebook.errors.GraphApiException.OBJECT_MAPPER; +import de.juplo.facebook.errors.GraphApiException.Type; import java.io.IOException; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/de/juplo/facebook/exceptions/GraphApiErrorHandlerTest.java b/src/test/java/de/juplo/facebook/errors/GraphApiErrorHandlerTest.java similarity index 99% rename from src/test/java/de/juplo/facebook/exceptions/GraphApiErrorHandlerTest.java rename to src/test/java/de/juplo/facebook/errors/GraphApiErrorHandlerTest.java index 86e1dfd..9fc7fc3 100644 --- a/src/test/java/de/juplo/facebook/exceptions/GraphApiErrorHandlerTest.java +++ b/src/test/java/de/juplo/facebook/errors/GraphApiErrorHandlerTest.java @@ -1,6 +1,7 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; -import de.juplo.facebook.exceptions.GraphApiException.Type; + +import de.juplo.facebook.errors.GraphApiException.Type; import java.util.Date; import java.util.Map; import java.util.Set; diff --git a/src/test/java/de/juplo/facebook/exceptions/MockClientHttpRequestFactory.java b/src/test/java/de/juplo/facebook/errors/MockClientHttpRequestFactory.java similarity index 98% rename from src/test/java/de/juplo/facebook/exceptions/MockClientHttpRequestFactory.java rename to src/test/java/de/juplo/facebook/errors/MockClientHttpRequestFactory.java index 34dc793..d5b24c3 100644 --- a/src/test/java/de/juplo/facebook/exceptions/MockClientHttpRequestFactory.java +++ b/src/test/java/de/juplo/facebook/errors/MockClientHttpRequestFactory.java @@ -1,4 +1,5 @@ -package de.juplo.facebook.exceptions; +package de.juplo.facebook.errors; + import java.io.ByteArrayInputStream; import java.io.IOException; -- 2.20.1