[
https://issues.apache.org/jira/browse/CASSANDRA-12566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15449108#comment-15449108
]
Dave Brosius commented on CASSANDRA-12566:
------------------------------------------
it also appears to be conflating classpath resources and files, which isn't a
good thing.
> Null Dereference
> ----------------
>
> Key: CASSANDRA-12566
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12566
> Project: Cassandra
> Issue Type: Sub-task
> Reporter: Eduardo Aguinaga
>
> Overview:
> In May through June of 2016 a static analysis was performed on version 3.0.5
> of the Cassandra source code. The analysis included an automated analysis
> using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools
> Understand v4. The results of that analysis includes the issue below.
> Issue:
> In the file CassandraDaemon.java on line 350 the line of code calls
> getResource and getClassLoader. Both of these calls can return a null and if
> so will result in a null dereference in this line of code.
> {code:java}
> CassandraDaemon.java, lines 348-356:
> 348 try
> 349 {
> 350 String reportFileLocation =
> CassandraDaemon.class.getClassLoader().getResource(metricsReporterConfigFile).getFile();
> 351
> ReporterConfig.loadFromFile(reportFileLocation).enableAll(CassandraMetricsRegistry.Metrics);
> 352 }
> 353 catch (Exception e)
> 354 {
> 355 logger.warn("Failed to load metrics-reporter-config, metric sinks
> will not be activated", e);
> 356 }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)