This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlet-helpers.git


The following commit(s) were added to refs/heads/master by this push:
     new 4343dca  cosmetic: move supported operations above the comment 
"unsupported operations"
4343dca is described below

commit 4343dcac120d115b1d4a0acf076beffe15cdf2c8
Author: sseifert <[email protected]>
AuthorDate: Mon Oct 28 17:39:17 2019 +0100

    cosmetic: move supported operations above the comment "unsupported 
operations"
---
 .../MockSlingHttpServletRequest.java               | 63 +++++++++++-----------
 1 file changed, 32 insertions(+), 31 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
 
b/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
index 74d65e5..2b8d6f4 100644
--- 
a/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
+++ 
b/src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
@@ -820,13 +820,6 @@ public class MockSlingHttpServletRequest extends 
SlingAdaptable implements Sling
         return AdaptableUtil.adaptToWithoutCaching(this, type);
     }
 
-    // --- unsupported operations ---
-
-    @Override
-    public RequestProgressTracker getRequestProgressTracker() {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public String getResponseContentType() {
         return responseContentType;
@@ -842,6 +835,38 @@ public class MockSlingHttpServletRequest extends 
SlingAdaptable implements Sling
     }
 
     @Override
+    public BufferedReader getReader() {
+        if (getInputStreamCalled) {
+            throw new IllegalStateException();
+        }
+        getReaderCalled = true;
+        if (this.content == null) {
+            return new BufferedReader(new StringReader(""));
+        } else {
+            String content;
+            try {
+                if (characterEncoding == null) {
+                    content = new String(this.content, 
Charset.defaultCharset());
+                } else {
+                    content = new String(this.content, characterEncoding);
+                }
+            } catch (UnsupportedEncodingException e) {
+                content = new String(this.content, Charset.defaultCharset());
+            }
+            return new BufferedReader(new StringReader(content));
+        }
+
+    }
+
+
+    // --- unsupported operations ---
+
+    @Override
+    public RequestProgressTracker getRequestProgressTracker() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
     public String getPathTranslated() {
         throw new UnsupportedOperationException();
     }
@@ -907,30 +932,6 @@ public class MockSlingHttpServletRequest extends 
SlingAdaptable implements Sling
     }
 
     @Override
-    public BufferedReader getReader() {
-        if (getInputStreamCalled) {
-            throw new IllegalStateException();
-        }
-        getReaderCalled = true;
-        if (this.content == null) {
-            return new BufferedReader(new StringReader(""));
-        } else {
-            String content;
-            try {
-                if (characterEncoding == null) {
-                    content = new String(this.content, 
Charset.defaultCharset());
-                } else {
-                    content = new String(this.content, characterEncoding);
-                }
-            } catch (UnsupportedEncodingException e) {
-                content = new String(this.content, Charset.defaultCharset());
-            }
-            return new BufferedReader(new StringReader(content));
-        }
-
-    }
-
-    @Override
     public String getRealPath(String path) {
         throw new UnsupportedOperationException();
     }

Reply via email to