Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-05 Thread Harsha Wardhana B
Thanks for the review, Dmitry. Harsha On Tuesday 06 September 2016 12:27 PM, Dmitry Samersoff wrote: Harsha, OK. The fix looks good for me. -Dmitry On 2016-09-06 09:49, Harsha Wardhana B wrote: Dmitry, The scope of the issue was to fix parfait warnings though I have gone to some extent to

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-05 Thread Dmitry Samersoff
Harsha, OK. The fix looks good for me. -Dmitry On 2016-09-06 09:49, Harsha Wardhana B wrote: > Dmitry, > > The scope of the issue was to fix parfait warnings though I have gone to > some extent to refactor the file. > > Agree that macro can be used, but we have to stop here and raise a new > i

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-05 Thread Harsha Wardhana B
Dmitry, The scope of the issue was to fix parfait warnings though I have gone to some extent to refactor the file. Agree that macro can be used, but we have to stop here and raise a new issue to carry-on with the refactoring process. Thanks Harsha On Tuesday 06 September 2016 12:03 PM, Dm

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-05 Thread Harsha Wardhana B
Thanks for the review David. On Tuesday 06 September 2016 11:35 AM, David Holmes wrote: Hi Harsha, On 6/09/2016 3:47 PM, Harsha Wardhana B wrote: Hi David, Please find revised webrev. http://cr.openjdk.java.net/~hb/8161448/webrev.03/ You lost the earlier fix to not throw the exception her

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-05 Thread Dmitry Samersoff
Harsha, EXCEPTION_CHECK_AND_FREE macro could be used at ll.76 after FindClass -Dmitry On 2016-09-06 08:47, Harsha Wardhana B wrote: > Hi David, > > Please find revised webrev. > > http://cr.openjdk.java.net/~hb/8161448/webrev.03/ > > -Harsha > > On Thursday 01 September 2016 03:31 PM, David

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-05 Thread David Holmes
Hi Harsha, On 6/09/2016 3:47 PM, Harsha Wardhana B wrote: Hi David, Please find revised webrev. http://cr.openjdk.java.net/~hb/8161448/webrev.03/ You lost the earlier fix to not throw the exception here: 202 if (obj == NULL) { 203 free(dcmd_info_array); 204 JNU_

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-05 Thread Harsha Wardhana B
Hi David, Please find revised webrev. http://cr.openjdk.java.net/~hb/8161448/webrev.03/ -Harsha On Thursday 01 September 2016 03:31 PM, David Holmes wrote: On 1/09/2016 6:05 PM, Harsha Wardhana B wrote: Hi David, On Thursday 01 September 2016 01:14 PM, David Holmes wrote: Hi Harsha, Sorry

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-01 Thread David Holmes
On 1/09/2016 6:05 PM, Harsha Wardhana B wrote: Hi David, On Thursday 01 September 2016 01:14 PM, David Holmes wrote: Hi Harsha, Sorry these style issues are proving to be so painful, normally there would be more direct guidance from an existing team member. On 30/08/2016 4:51 PM, Harsha Wardh

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-01 Thread Harsha Wardhana B
Hi David, On Thursday 01 September 2016 01:14 PM, David Holmes wrote: Hi Harsha, Sorry these style issues are proving to be so painful, normally there would be more direct guidance from an existing team member. On 30/08/2016 4:51 PM, Harsha Wardhana B wrote: Hello, Please find below webrev

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-09-01 Thread David Holmes
Hi Harsha, Sorry these style issues are proving to be so painful, normally there would be more direct guidance from an existing team member. On 30/08/2016 4:51 PM, Harsha Wardhana B wrote: Hello, Please find below webrev addressing David's and Dmitry's comments. http://cr.openjdk.java.net/~

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-29 Thread Harsha Wardhana B
Hello, Please find below webrev addressing David's and Dmitry's comments. http://cr.openjdk.java.net/~hb/8161448/webrev.02/ -Harsha On Tuesday 30 August 2016 09:46 AM, David Holmes wrote: On 30/08/2016 2:06 PM, Harsha Wardhana B wrote: Error checking might distract the main flow of code but

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-29 Thread David Holmes
On 30/08/2016 2:06 PM, Harsha Wardhana B wrote: Error checking might distract the main flow of code but it would be far-fetched to call that it obfuscates the code. Ideally error checking You claimed macros obfuscate so the same word seemed appropriate. I don't necessarily equate readability w

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-29 Thread Harsha Wardhana B
Error checking might distract the main flow of code but it would be far-fetched to call that it obfuscates the code. Ideally error checking could have been made a function (inline if possible) instead of a macro but since it is context sensitive in this case (have to free variables depending on

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-29 Thread David Holmes
On 30/08/2016 1:47 PM, Harsha Wardhana B wrote: Hi Dmitry, I am not sure how using macro will help in this context. As far as I know, macros must be sparingly used as they are error-prone, obfuscate the code and hard to debug. Most of best coding practice for c/c++ (inluding Scott Myers Effectiv

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-29 Thread Harsha Wardhana B
Hi Dmitry, I am not sure how using macro will help in this context. As far as I know, macros must be sparingly used as they are error-prone, obfuscate the code and hard to debug. Most of best coding practice for c/c++ (inluding Scott Myers Effective C++ ) advocate using macros only if it is a

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-29 Thread Dmitry Samersoff
Harsha, I'm for macro. You can define a macro right before a place where you uses it and undef it when you don't need it anymore. -Dmitry On 2016-08-25 11:19, Harsha Wardhana B wrote: > Hello All, > > Please find below the revised webrev below. > > http://cr.openjdk.java.net/~hb/8161448/webr

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-28 Thread David Holmes
Hi Harsha, On 29/08/2016 8:12 PM, Harsha Wardhana B wrote: Hi David, The reason I fixed the indent was to maintain 80 character line width. I am not too familiar with coding conventions being followed w.r.t indentations. Could you point me to coding conventions for native code if we are followi

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-28 Thread Harsha Wardhana B
Hi David, The reason I fixed the indent was to maintain 80 character line width. I am not too familiar with coding conventions being followed w.r.t indentations. Could you point me to coding conventions for native code if we are following anything of that sort Thanks Harsha On Friday 26 Aug

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-25 Thread David Holmes
On 25/08/2016 6:19 PM, Harsha Wardhana B wrote: Hello All, Please find below the revised webrev below. http://cr.openjdk.java.net/~hb/8161448/webrev.01/ Functional changes seem okay. Exception management seems consistent. You have made numerous other incidental changes which not only make it

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-25 Thread Harsha Wardhana B
Hello All, Please find below the revised webrev below. http://cr.openjdk.java.net/~hb/8161448/webrev.01/ Regards Harsha On Wednesday 24 August 2016 11:48 AM, Harsha Wardhana B wrote: Hi David, On Tuesday 23 August 2016 12:41 PM, David Holmes wrote: Hi Harsha, On 22/08/2016 6:30 PM, Hars

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-23 Thread Harsha Wardhana B
Hi David, On Tuesday 23 August 2016 12:41 PM, David Holmes wrote: Hi Harsha, On 22/08/2016 6:30 PM, Harsha Wardhana B wrote: Hello All, Please review the below parfait fixes for DiagnosticCommandImpl.c Issue : https://bugs.openjdk.java.net/browse/JDK-8161448 webrev : http://cr.openjdk.java

Re: RFR: 8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c

2016-08-23 Thread David Holmes
Hi Harsha, On 22/08/2016 6:30 PM, Harsha Wardhana B wrote: Hello All, Please review the below parfait fixes for DiagnosticCommandImpl.c Issue : https://bugs.openjdk.java.net/browse/JDK-8161448 webrev : http://cr.openjdk.java.net/~hb/8161448/webrev.00/ Looks functionally correct, but I would