Bosco, I am working on these defects,
Thanks, Ramesh On 8/6/17, 1:10 PM, "Don Bosco Durai" <bo...@apache.org> wrote: >Please review and fix. > >Thanks > >Bosco > > >On 8/6/17, 12:44 AM, "scan-ad...@coverity.com" <scan-ad...@coverity.com> >wrote: > > > Hi, > > Please find the latest report on new defect(s) introduced to Apache >Ranger found with Coverity Scan. > > 2 new defect(s) introduced to Apache Ranger found with Coverity Scan. > > > New defect(s) Reported-by: Coverity Scan > Showing 2 of 2 defect(s) > > > ** CID 166171: FindBugs: Multithreaded correctness >(FB.RU_INVOKE_RUN) > >/agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProvider >Factory.java: 117 in >org.apache.ranger.audit.provider.AuditProviderFactory.shutdown()() > > > >__________________________________________________________________________ >______________________________ > *** CID 166171: FindBugs: Multithreaded correctness >(FB.RU_INVOKE_RUN) > >/agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProvider >Factory.java: 117 in >org.apache.ranger.audit.provider.AuditProviderFactory.shutdown()() > 111 /** > 112 * call shutdown hook to provide a way to > 113 * shutdown gracefully in addition to the ShutdownHook >mechanism > 114 */ > 115 public void shutdown() { > 116 if (isInitDone() && jvmShutdownHook != null) { > >>> CID 166171: FindBugs: Multithreaded correctness >(FB.RU_INVOKE_RUN) > >>> >org.apache.ranger.audit.provider.AuditProviderFactory.shutdown() >explicitly invokes run on a thread (did you mean to start it instead?). > 117 jvmShutdownHook.run(); > 118 } > 119 } > 120 > 121 public synchronized void init(Properties props, String >appType) { > 122 LOG.info("AuditProviderFactory: initializing.."); > > ** CID 166170: Control flow issues (NESTING_INDENT_MISMATCH) > >/agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditD >estination.java: 199 in >org.apache.ranger.audit.destination.HDFSAuditDestination.flush()() > > > >__________________________________________________________________________ >______________________________ > *** CID 166170: Control flow issues (NESTING_INDENT_MISMATCH) > >/agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditD >estination.java: 199 in >org.apache.ranger.audit.destination.HDFSAuditDestination.flush()() > 193 synchronized (this) { > 194 if (ostream != null) > 195 // 1) PrinterWriter > does not have bufferring of its own >so > 196 // we need to flush its > underlying stream > 197 // 2) HDFS flush() does > not really flush all the way to >disk. > 198 ostream.hflush(); > >>> CID 166170: Control flow issues (NESTING_INDENT_MISMATCH) > >>> This statement is indented to column 49, as if it were >nested within the preceding parent statement, but it is not. > 199 logger.info("Flush HDFS > audit logs completed....."); > 200 } > 201 } catch (IOException e) { > 202 logger.error("Error on flushing log > writer: " + >e.getMessage() + > 203 "\nException will be ignored. name=" + > getName() + ", >fileName=" + currentFileName); > 204 } > > > >__________________________________________________________________________ >______________________________ > To view the defects in Coverity Scan visit, >https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V >05UPxvVjWch-2Bd2MGckcRZSbhom32dlDl11LWEm9nX11zsOWMf5dv3Q9Mogo-2FGua3FsLRTF >ft2V-2FOFC9o0P2e0-3D_d04ZgyDzSjlwpjXIuOFYDNE6R93Lal83MDClQK32PZv33XLds5st2 >CH16GjUjfPDIC28Lk2AlHQ2-2BKTWLfVhhV4FUtxSH-2BQ-2FYdiREYij94dL6Vnyx3h86Wdgp >d9-2Fq10Q7jqbIroRL1-2FvMV-2FOO483ZsHqVoHPsly3MZ-2B-2F5WjaCjwhmF-2Fz5-2F2SR >i18UKgQmkJsXC3iUEFy8HsU4Ji7c8e4TA-3D-3D > > To manage Coverity Scan email notifications for "bo...@apache.org", >click >https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V >05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4HK0JLY-2BbZ-2FD0yvjg-2BbWSwq >uqqdEYtbR9nIDW-2BM81kI8TiABM2LsH3tiPfMWf-2FvOsjZSWngS5IRVC-2FH5Pl4zyaK1OE6 >Dh-2BhR6pXASEFJKZLM-3D_d04ZgyDzSjlwpjXIuOFYDNE6R93Lal83MDClQK32PZv33XLds5s >t2CH16GjUjfPDu9D6-2FiICYejLSuAywfM1j4jBCjl449cBsU7cKc1B6BCx-2BDSASW9dUTiEo >AdcTj-2FAP-2FIcCKkeRevD-2FxKiZ5t5tTOtoT7TFe9DXg3C5TeI-2FuLIaHM-2BJrzyK5rxg >lD2SY0eVa0HwhK4xEM3-2F5x2-2FhNrZQ-3D-3D > > > >