[
https://issues.apache.org/jira/browse/HBASE-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629695#comment-14629695
]
Duo Zhang commented on HBASE-14100:
-----------------------------------
{code:title=WALSplitter.java}
1208 for (WriterThread t : writerThreads) {
1209 t.finish();
1210 }
1211 if (interrupt) {
1212 for (WriterThread t : writerThreads) {
1213 t.interrupt(); // interrupt the writer threads. We are stopping
now.
1214 }
1215 }
1216
1217 for (WriterThread t : writerThreads) {
1218 if (!progress_failed && reporter != null && !reporter.progress()) {
1219 progress_failed = true;
1220 }
1221 try {
1222 t.join();
1223 } catch (InterruptedException ie) {
1224 IOException iie = new InterruptedIOException();
1225 iie.initCause(ie);
1226 throw iie;
1227 }
1228 }
1229 controller.checkForErrors();
1230 LOG.info((this.writerThreads == null? 0: this.writerThreads.size())
+ // here we do a null check, but the above code use writeThreads directly
without a null check
1231 " split writers finished; closing...");
{code}
And here is the defination of writerThreads
{code:title=WALSplitter.java}
1131 protected final List<WriterThread> writerThreads =
Lists.newArrayList();
{code}
It is initialized at construction and marked as final, so I think we could just
remove the null check?
> Fix high priority findbugs warnings
> -----------------------------------
>
> Key: HBASE-14100
> URL: https://issues.apache.org/jira/browse/HBASE-14100
> Project: HBase
> Issue Type: Bug
> Reporter: Duo Zhang
> Assignee: Duo Zhang
>
> See here:
> https://builds.apache.org/job/HBase-TRUNK/6654/findbugsResult/HIGH/
> We have 6 high priority findbugs warnings. A high priority findbugs warning
> is usually a bug.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)