]> git.ktnx.net Git - mobile-ledger.git/commitdiff
whitespace
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 12 Jan 2019 12:43:10 +0000 (12:43 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 12 Jan 2019 12:43:10 +0000 (12:43 +0000)
app/src/main/java/net/ktnx/mobileledger/async/SaveTransactionTask.java
app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java

index c4cc9a3ea7fa4171ac7844ef7d3fd671c965ea07..fb520d4f37b449e329450a797ba19c5752d74bfd 100644 (file)
@@ -88,7 +88,8 @@ public class SaveTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
                 if (http.getResponseCode() == 303) {
                     // everything is fine
                     return true;
-                } else if (http.getResponseCode() == 200) {
+                }
+                else if (http.getResponseCode() == 200) {
                     // get the new cookie
                     {
                         Pattern reSessionCookie = Pattern.compile("_SESSION=([^;]+);.*");
@@ -101,17 +102,21 @@ public class SaveTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
                             if (m.matches()) {
                                 session = m.group(1);
                                 Log.d("network", "new session is " + session);
-                            } else {
+                            }
+                            else {
                                 Log.d("network", "set-cookie: " + cookie);
-                                Log.w("network", "Response Set-Cookie headers is not a _SESSION one");
+                                Log.w("network",
+                                        "Response Set-Cookie headers is not a _SESSION one");
                             }
-                        } else {
+                        }
+                        else {
                             Log.w("network", "Response has no Set-Cookie header");
                         }
                     }
                     // the token needs to be updated
                     BufferedReader reader = new BufferedReader(new InputStreamReader(resp));
-                    Pattern re = Pattern.compile("<input type=\"hidden\" name=\"_token\" value=\"([^\"]+)\">");
+                    Pattern re = Pattern.compile(
+                            "<input type=\"hidden\" name=\"_token\" value=\"([^\"]+)\">");
                     String line;
                     while ((line = reader.readLine()) != null) {
                         //Log.d("dump", line);
@@ -124,8 +129,10 @@ public class SaveTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
                         }
                     }
                     throw new IOException("Can't find _token string");
-                } else {
-                    throw new IOException(String.format("Error response code %d", http.getResponseCode()));
+                }
+                else {
+                    throw new IOException(
+                            String.format("Error response code %d", http.getResponseCode()));
                 }
             }
         }
index 6e5ac129f4da2b87c413ffa09cf03edaab9decc4..8514e71d04816918f009df20c229dc5ddb8f213c 100644 (file)
@@ -126,21 +126,21 @@ public final class MobileLedgerProfile {
     public String getName() {
         return name;
     }
-    public void setName(CharSequence text) {
-        setName(String.valueOf(text));
-    }
     public void setName(String name) {
         this.name = name;
     }
+    public void setName(CharSequence text) {
+        setName(String.valueOf(text));
+    }
     public String getUrl() {
         return url;
     }
-    public void setUrl(CharSequence text) {
-        setUrl(String.valueOf(text));
-    }
     public void setUrl(String url) {
         this.url = url;
     }
+    public void setUrl(CharSequence text) {
+        setUrl(String.valueOf(text));
+    }
     public boolean isAuthEnabled() {
         return authEnabled;
     }
@@ -150,21 +150,21 @@ public final class MobileLedgerProfile {
     public String getAuthUserName() {
         return authUserName;
     }
-    public void setAuthUserName(CharSequence text) {
-        setAuthUserName(String.valueOf(text));
-    }
     public void setAuthUserName(String authUserName) {
         this.authUserName = authUserName;
     }
+    public void setAuthUserName(CharSequence text) {
+        setAuthUserName(String.valueOf(text));
+    }
     public String getAuthPassword() {
         return authPassword;
     }
-    public void setAuthPassword(CharSequence text) {
-        setAuthPassword(String.valueOf(text));
-    }
     public void setAuthPassword(String authPassword) {
         this.authPassword = authPassword;
     }
+    public void setAuthPassword(CharSequence text) {
+        setAuthPassword(String.valueOf(text));
+    }
     public void storeInDB() {
         SQLiteDatabase db = MLDB.getWritableDatabase();
         db.beginTransaction();