Browse code

Format tweaking.

PlayN uses two character indents.

Michael Bayne authored on 07/05/2014 14:05:58
Showing 1 changed files
... ...
@@ -84,35 +84,33 @@ class AndroidNet extends NetImpl {
84 84
 
85 85
           ResponseImpl impl;
86 86
           if (entity == null) {
87
-              impl = new ResponseImpl(code) {
88
-                @Override
89
-                public String payloadString() {
90
-                    return null;
91
-                }
92
-
93
-                @Override
94
-                public byte[] payload() {
95
-                    return null;
96
-                }
97
-
98
-                @Override
99
-                protected Map<String, List<String>> extractHeaders() {
100
-                    return extractResponseHeaders(response);
101
-                }
87
+            impl = new ResponseImpl(code) {
88
+              @Override
89
+              public String payloadString() {
90
+                return null;
91
+              }
92
+              @Override
93
+              public byte[] payload() {
94
+                return null;
95
+              }
96
+              @Override
97
+              protected Map<String, List<String>> extractHeaders() {
98
+                return extractResponseHeaders(response);
99
+              }
102 100
             };
101
+
103 102
           } else {
104
-              byte[] data = EntityUtils.toByteArray(entity);
105
-              String encoding = EntityUtils.getContentCharSet(entity);
106
-              if (encoding == null) {
107
-                encoding = HTTP.UTF_8;
103
+            byte[] data = EntityUtils.toByteArray(entity);
104
+            String encoding = EntityUtils.getContentCharSet(entity);
105
+            if (encoding == null) {
106
+              encoding = HTTP.UTF_8;
107
+            }
108
+            impl = new BinaryResponse(code, data, encoding) {
109
+              @Override
110
+              protected Map<String,List<String>> extractHeaders() {
111
+                return extractResponseHeaders(response);
108 112
               }
109
-
110
-              impl = new BinaryResponse(code, data, encoding) {
111
-                  @Override
112
-                  protected Map<String,List<String>> extractHeaders() {
113
-                      return extractResponseHeaders(response);
114
-                  }
115
-                };
113
+            };
116 114
           }
117 115
 
118 116
           platform.notifySuccess(callback, impl);
... ...
@@ -127,16 +125,16 @@ class AndroidNet extends NetImpl {
127 125
       }
128 126
 
129 127
       private Map<String,List<String>> extractResponseHeaders(HttpResponse response) {
130
-          Map<String,List<String>> hmap = new HashMap<String,List<String>>();
131
-          for (org.apache.http.Header header : response.getAllHeaders()) {
132
-            String name = header.getName();
133
-            List<String> values = hmap.get(name);
134
-            if (values == null) {
135
-                hmap.put(name, values = new ArrayList<String>());
136
-            }
137
-            values.add(header.getValue());
128
+        Map<String,List<String>> hmap = new HashMap<String,List<String>>();
129
+        for (org.apache.http.Header header : response.getAllHeaders()) {
130
+          String name = header.getName();
131
+          List<String> values = hmap.get(name);
132
+          if (values == null) {
133
+            hmap.put(name, values = new ArrayList<String>());
138 134
           }
139
-          return hmap;
135
+          values.add(header.getValue());
136
+        }
137
+        return hmap;
140 138
       }
141 139
     });
142 140
   }