- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Charset c =
String charsetName;Charset.forName(charsetName)
Charset.defaultCharset()
ContentType contentType;contentType.getCharset()
- Smart code suggestions by Codota
}
@Override public List<Violation> parseReportOutput(String string) throws Exception { final List<Violation> violations = new ArrayList<>(); final Map<String, String> messagesPerType = getMessagesPerType(); try (InputStream input = new ByteArrayInputStream(string.getBytes("UTF-8"))) { final XMLInputFactory factory = XMLInputFactory.newInstance(); final XMLStreamReader xmlr = factory.createXMLStreamReader(input); while (xmlr.hasNext()) { final int eventType = xmlr.next(); if (eventType == XMLStreamConstants.START_ELEMENT) { if (xmlr.getLocalName().equalsIgnoreCase("BugInstance")) { parseBugInstance(xmlr, violations, messagesPerType); } } } } return violations; }
@Override public List<Violation> parseReportOutput(String string) throws Exception { final List<Violation> violations = new ArrayList<>(); final Map<String, String> messagesPerType = getMessagesPerType(); try (InputStream input = new ByteArrayInputStream(string.getBytes("UTF-8"))) { final XMLInputFactory factory = XMLInputFactory.newInstance(); final XMLStreamReader xmlr = factory.createXMLStreamReader(input); while (xmlr.hasNext()) { final int eventType = xmlr.next(); if (eventType == XMLStreamConstants.START_ELEMENT) { if (xmlr.getLocalName().equalsIgnoreCase("BugInstance")) { parseBugInstance(xmlr, violations, messagesPerType); } } } } return violations; }