se.bjurr.violations.lib.util.Utils Java Examples
The following examples show how to use
se.bjurr.violations.lib.util.Utils.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FindbugsParser.java From violations-lib with Apache License 2.0 | 6 votes |
private Map<String, String> getMessagesPerType() { final Map<String, String> messagesPerType = new HashMap<>(); try { if (isNullOrEmpty(findbugsMessagesXml)) { final String messagesResourceFilename = "/findbugs/messages.xml"; final URL resource = FindbugsParser.class.getResource(messagesResourceFilename); if (resource == null) { throw new RuntimeException("Unable to find resource " + messagesResourceFilename); } findbugsMessagesXml = Utils.toString(resource); } final List<String> bugPatterns = getChunks(findbugsMessagesXml, "<BugPattern", "</BugPattern>"); for (final String bugPattern : bugPatterns) { final String type = getAttribute(bugPattern, "type"); final String shortDescription = getContent(bugPattern, "ShortDescription"); final String details = getContent(bugPattern, "Details"); messagesPerType.put(type, shortDescription + "\n\n" + details); } } catch (final IOException e) { LOG.log(SEVERE, e.getMessage(), e); } return messagesPerType; }
Example #2
Source File: UpdateReadmeTest.java From violation-comments-to-github-plugin with MIT License | 4 votes |
@Test public void doUpdateReadmeWithReporters() throws IOException { Utils.updateReadmeWithReporters(); }
Example #3
Source File: ReporterTest.java From violations-lib with Apache License 2.0 | 4 votes |
@Test public void test() throws IOException { Utils.updateReadmeWithReporters(); }
Example #4
Source File: UpdateReadmeTest.java From violation-comments-to-stash-plugin with MIT License | 4 votes |
@Test public void doUpdateReadmeWithReporters() throws IOException { Utils.updateReadmeWithReporters(); }