Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 3d500082 authored by tobiasKaminsky's avatar tobiasKaminsky
Browse files

fixed lint warnings / errors

parent 306980a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,8 +60,8 @@ android {
        abortOnError false
        htmlReport true
        htmlOutput file("$project.buildDir/reports/lint/lint.html")
        disable 'MissingTranslation'
    }

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28

lint.xml

0 → 100644
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="InvalidPackage">
        <ignore path="**/jackrabbit-webdav-2.12.6.jar" />
    </issue>
</lint>

sample_client/lint.xml

0 → 100644
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="InvalidPackage">
        <ignore path="**/jackrabbit-webdav-2.12.6.jar" />
    </issue>
</lint>
+12 −11
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import org.apache.commons.httpclient.params.HttpParams;

import java.io.IOException;
import java.io.InputStream;
import java.util.Locale;

public class OwnCloudClient extends HttpClient {
	
@@ -383,13 +384,14 @@ public class OwnCloudClient extends HttpClient {

	private void logCookiesAtRequest(Header[] headers, String when) {
        int counter = 0;
        for (int i=0; i<headers.length; i++) {
        	if (headers[i].getName().toLowerCase().equals("cookie")) {
        for (Header header : headers) {
            if ("cookie".equals(header.getName().toLowerCase(Locale.US))) {
                Log_OC.d(TAG + " #" + mInstanceNumber,
                        "Cookies at request (" + when + ") (" + counter++ + "): " +
        						headers[i].getValue());
                                header.getValue());
            }
        }

        if (counter == 0) {
            Log_OC.d(TAG + " #" + mInstanceNumber, "No cookie at request (" + when + ")");
        }
@@ -414,10 +416,9 @@ public class OwnCloudClient extends HttpClient {

	private void logSetCookiesAtResponse(Header[] headers) {
        int counter = 0;
        for (int i=0; i<headers.length; i++) {
        	if (headers[i].getName().toLowerCase().equals("set-cookie")) {
        		Log_OC.d(TAG + " #" + mInstanceNumber, 
        				"Set-Cookie (" + counter++ + "): " + headers[i].getValue());
        for (Header header : headers) {
            if ("set-cookie".equals(header.getName().toLowerCase(Locale.US))) {
                Log_OC.d(TAG + " #" + mInstanceNumber, "Set-Cookie (" + counter++ + "): " + header.getValue());
            }
        }
        if (counter == 0) {
+4 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

package com.owncloud.android.lib.common.network;

import java.util.Map;
import com.owncloud.android.lib.common.utils.Log_OC;

import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HttpMethod;
@@ -34,7 +34,8 @@ import org.apache.commons.httpclient.auth.AuthenticationException;
import org.apache.commons.httpclient.auth.InvalidCredentialsException;
import org.apache.commons.httpclient.auth.MalformedChallengeException;

import com.owncloud.android.lib.common.utils.Log_OC;
import java.util.Locale;
import java.util.Map;



@@ -262,7 +263,7 @@ public class BearerAuthScheme implements AuthScheme /*extends RFC2617Scheme*/ {
        if (mParams == null) {
            return null;
        }
        return (String) mParams.get(name.toLowerCase());
        return (String) mParams.get(name.toLowerCase(Locale.US));
    }

    /**
Loading