Enforce consistent operator wrapping style

pull/16/head
Andrew Gaul 2014-08-31 13:59:45 -07:00
rodzic 7883dd0574
commit 136dd679c4
3 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -110,9 +110,9 @@ public final class S3Proxy {
S3ProxyConstants.PROPERTY_ENDPOINT);
String s3ProxyAuthorization = properties.getProperty(
S3ProxyConstants.PROPERTY_AUTHORIZATION);
if (provider == null || identity == null || credential == null
|| s3ProxyEndpointString == null
|| s3ProxyAuthorization == null) {
if (provider == null || identity == null || credential == null ||
s3ProxyEndpointString == null ||
s3ProxyAuthorization == null) {
System.err.println("Properties file must contain:\n" +
Constants.PROPERTY_PROVIDER + "\n" +
Constants.PROPERTY_IDENTITY + "\n" +

Wyświetl plik

@ -650,9 +650,9 @@ final class S3ProxyHandler extends AbstractHandler {
int status = HttpServletResponse.SC_OK;
GetOptions options = new GetOptions();
String range = request.getHeader(HttpHeaders.RANGE);
if (range != null && range.startsWith("bytes=")
if (range != null && range.startsWith("bytes=") &&
// ignore multiple ranges
&& range.indexOf(',') == -1) {
range.indexOf(',') == -1) {
range = range.substring("bytes=".length());
String[] ranges = range.split("-", 2);
if (ranges[0].isEmpty()) {

Wyświetl plik

@ -63,6 +63,9 @@
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OneStatementPerLine"/>
<module name="OperatorWrap">
<property name="option" value="eol"/>
</module>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="ParenPad"/>