mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
Fix Typo
This commit is contained in:
@@ -159,7 +159,7 @@ public abstract class AbstractManagerResource<T extends ModelObject,
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.error("error during create", ex);
|
logger.error("error during create", ex);
|
||||||
response = createErrorResonse(ex);
|
response = createErrorResponse(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
@@ -195,7 +195,7 @@ public abstract class AbstractManagerResource<T extends ModelObject,
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.error("error during delete", ex);
|
logger.error("error during delete", ex);
|
||||||
response = createErrorResonse(ex);
|
response = createErrorResponse(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,13 +227,13 @@ public abstract class AbstractManagerResource<T extends ModelObject,
|
|||||||
}
|
}
|
||||||
catch (AuthorizationException ex)
|
catch (AuthorizationException ex)
|
||||||
{
|
{
|
||||||
logger.warn("update not allowd", ex);
|
logger.warn("update not allowed", ex);
|
||||||
response = Response.status(Response.Status.FORBIDDEN).build();
|
response = Response.status(Response.Status.FORBIDDEN).build();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.error("error during update", ex);
|
logger.error("error during update", ex);
|
||||||
response = createErrorResonse(ex);
|
response = createErrorResponse(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
@@ -370,9 +370,9 @@ public abstract class AbstractManagerResource<T extends ModelObject,
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected Response createErrorResonse(Throwable throwable)
|
protected Response createErrorResponse(Throwable throwable)
|
||||||
{
|
{
|
||||||
return createErrorResonse(Status.INTERNAL_SERVER_ERROR,
|
return createErrorResponse(Status.INTERNAL_SERVER_ERROR,
|
||||||
throwable.getMessage(), throwable);
|
throwable.getMessage(), throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,9 +385,9 @@ public abstract class AbstractManagerResource<T extends ModelObject,
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected Response createErrorResonse(Status status, Throwable throwable)
|
protected Response createErrorResponse(Status status, Throwable throwable)
|
||||||
{
|
{
|
||||||
return createErrorResonse(status, throwable.getMessage(), throwable);
|
return createErrorResponse(status, throwable.getMessage(), throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -400,7 +400,7 @@ public abstract class AbstractManagerResource<T extends ModelObject,
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected Response createErrorResonse(Status status, String message,
|
protected Response createErrorResponse(Status status, String message,
|
||||||
Throwable throwable)
|
Throwable throwable)
|
||||||
{
|
{
|
||||||
return Response.status(status).entity(new RestExceptionResult(message,
|
return Response.status(status).entity(new RestExceptionResult(message,
|
||||||
|
|||||||
@@ -42,12 +42,10 @@ import com.webcohesion.enunciate.metadata.rs.ResponseCode;
|
|||||||
import com.webcohesion.enunciate.metadata.rs.ResponseHeader;
|
import com.webcohesion.enunciate.metadata.rs.ResponseHeader;
|
||||||
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||||
import com.webcohesion.enunciate.metadata.rs.TypeHint;
|
import com.webcohesion.enunciate.metadata.rs.TypeHint;
|
||||||
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.apache.shiro.authz.AuthorizationException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import sonia.scm.config.ScmConfiguration;
|
import sonia.scm.config.ScmConfiguration;
|
||||||
import sonia.scm.repository.BlameResult;
|
import sonia.scm.repository.BlameResult;
|
||||||
import sonia.scm.repository.Branches;
|
import sonia.scm.repository.Branches;
|
||||||
@@ -76,13 +74,6 @@ import sonia.scm.util.HttpUtil;
|
|||||||
import sonia.scm.util.IOUtil;
|
import sonia.scm.util.IOUtil;
|
||||||
import sonia.scm.util.Util;
|
import sonia.scm.util.Util;
|
||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
import javax.ws.rs.DELETE;
|
import javax.ws.rs.DELETE;
|
||||||
import javax.ws.rs.DefaultValue;
|
import javax.ws.rs.DefaultValue;
|
||||||
@@ -101,7 +92,11 @@ import javax.ws.rs.core.Response;
|
|||||||
import javax.ws.rs.core.Response.Status;
|
import javax.ws.rs.core.Response.Status;
|
||||||
import javax.ws.rs.core.StreamingOutput;
|
import javax.ws.rs.core.StreamingOutput;
|
||||||
import javax.ws.rs.core.UriInfo;
|
import javax.ws.rs.core.UriInfo;
|
||||||
import org.apache.shiro.authz.AuthorizationException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Repository related RESTful Web Service Endpoint.
|
* Repository related RESTful Web Service Endpoint.
|
||||||
@@ -218,7 +213,7 @@ public class RepositoryResource extends AbstractManagerResource<Repository, Repo
|
|||||||
catch (RepositoryException | IOException ex)
|
catch (RepositoryException | IOException ex)
|
||||||
{
|
{
|
||||||
logger.error("error during create", ex);
|
logger.error("error during create", ex);
|
||||||
response = createErrorResonse(ex);
|
response = createErrorResponse(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -823,7 +818,7 @@ public class RepositoryResource extends AbstractManagerResource<Repository, Repo
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.error("could not retrive content", ex);
|
logger.error("could not retrive content", ex);
|
||||||
response = createErrorResonse(ex);
|
response = createErrorResponse(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
@@ -908,7 +903,7 @@ public class RepositoryResource extends AbstractManagerResource<Repository, Repo
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.error("could not create diff", ex);
|
logger.error("could not create diff", ex);
|
||||||
response = createErrorResonse(ex);
|
response = createErrorResponse(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
Reference in New Issue
Block a user