@@ -25,7 +25,7 @@ import org.sonar.api.rule.RuleKey; | |||
public interface Check { | |||
public Class<Check>[] ALL = new Class[] {TemplateRuleCheck.class}; | |||
Class<Check>[] ALL = new Class[] {TemplateRuleCheck.class}; | |||
void execute(SensorContext context, InputFile file, RuleKey ruleKey); | |||
@@ -36,10 +36,8 @@ import org.jfree.ui.RectangleEdge; | |||
public abstract class BaseChart { | |||
public static final Color BASE_COLOR = new Color(51, 51, 51); | |||
public static final Color BASE_COLOR_LIGHT = new Color(204, 204, 204); | |||
public static final Color SERIE_BORDER_COLOR = new Color(67, 119, 166); | |||
public static final Color[] COLORS = { | |||
protected static final Color[] COLORS = { | |||
new Color(5, 141, 199), | |||
new Color(80, 180, 50), | |||
new Color(237, 86, 27), |
@@ -25,7 +25,7 @@ import org.jfree.chart.renderer.category.BarRenderer; | |||
public class CustomBarRenderer extends BarRenderer { | |||
public static final Paint[] COLORS = { | |||
protected static final Paint[] COLORS = { | |||
Color.red, Color.blue, Color.green, | |||
Color.yellow, Color.orange, Color.cyan, | |||
Color.magenta, Color.blue}; |
@@ -39,7 +39,7 @@ public enum SearchAdditionalField { | |||
USERS("users"); | |||
public static final String ALL_ALIAS = "_all"; | |||
public static final EnumSet<SearchAdditionalField> ALL_ADDITIONAL_FIELDS = EnumSet.allOf(SearchAdditionalField.class); | |||
static final EnumSet<SearchAdditionalField> ALL_ADDITIONAL_FIELDS = EnumSet.allOf(SearchAdditionalField.class); | |||
private final String label; | |||
@@ -45,15 +45,15 @@ public class StaticResourcesServlet extends HttpServlet { | |||
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |||
String pluginKey = getPluginKey(request); | |||
String resource = getResourcePath(request); | |||
PluginRepository pluginRepository = Platform.getInstance().getContainer().getComponentByType(PluginRepository.class); | |||
if (!pluginRepository.hasPlugin(pluginKey)) { | |||
response.sendError(HttpServletResponse.SC_NOT_FOUND); | |||
return; | |||
} | |||
InputStream in = null; | |||
OutputStream out = null; | |||
try { | |||
PluginRepository pluginRepository = Platform.getInstance().getContainer().getComponentByType(PluginRepository.class); | |||
if (!pluginRepository.hasPlugin(pluginKey)) { | |||
response.sendError(HttpServletResponse.SC_NOT_FOUND); | |||
return; | |||
} | |||
in = pluginRepository.getPluginInstance(pluginKey).getClass().getClassLoader().getResourceAsStream(resource); | |||
if (in != null) { | |||
// mime type must be set before writing response body |