Consistently use character encoding constants
Use the java.nio.charset.StandardCharsets.{ISO_8859_1,UTF_8} constants'
name() methods instead of hard-coding the strings.
Where possible, use method variants that take a Charset rather than
a String. This removes the need to catch UnsupportedEncodingException
in some cases.
Change-Id: I4ac1ba0a753de715e1f38ce631842f527b9e127c
			
			
This commit is contained in:
		| @@ -819,7 +819,7 @@ public class RestApiServlet extends HttpServlet { | ||||
|     } | ||||
|     res.setHeader("X-FYI-Content-Encoding", "base64"); | ||||
|     res.setHeader("X-FYI-Content-Type", src.getContentType()); | ||||
|     return b64.setContentType("text/plain").setCharacterEncoding("ISO-8859-1"); | ||||
|     return b64.setContentType("text/plain").setCharacterEncoding(ISO_8859_1.name()); | ||||
|   } | ||||
|  | ||||
|   private static BinaryResult stackGzip(HttpServletResponse res, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Pursehouse
					David Pursehouse