Re: RFR 8065998: Avoid use of _ as a one-character identifier
On 01/12/2014 13:37, Jan Lahoda wrote: : In TypeCheckMicroBenchmark then ignore is might be a misleading too given that the ArrayStoreException causes a CCE to be thrown. I've updated the patch to use expected where the exception appears to be expected and unused where exception appears to be unexpected, but the variable is not used. Updated patches: jaxp: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jaxp/ jdk: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jdk/ webrev.01 looks good to me. -Alan
Re: RFR 8065998: Avoid use of _ as a one-character identifier
Thanks to all for the comments! Jan On 2.12.2014 11:15, Alan Bateman wrote: On 01/12/2014 13:37, Jan Lahoda wrote: : In TypeCheckMicroBenchmark then ignore is might be a misleading too given that the ArrayStoreException causes a CCE to be thrown. I've updated the patch to use expected where the exception appears to be expected and unused where exception appears to be unexpected, but the variable is not used. Updated patches: jaxp: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jaxp/ jdk: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jdk/ webrev.01 looks good to me. -Alan
Re: RFR 8065998: Avoid use of _ as a one-character identifier
On Mon, Dec 01, 2014 at 01:10:29PM +0100, Jan Lahoda wrote: Hi, In a preparation for JDK-8061549, I'd like to rename all uses of '_' as a one-character identifier in the jaxp and jdk repositories. All the uses I was able to find are in tests, and the identifier is used as a name of a catch parameter. The proposed new name is ignore, but if a different name would be more appropriate, I'll be happy to use it. To me ignore signals I don't care if this exception occurred. In tests, when an exception *should* occurr, I usually name the variable expected. Ignore is a bit shorter though, so in the end it's a matter of taste I guess. -- Andreas
Re: RFR 8065998: Avoid use of _ as a one-character identifier
I know this is descending into bike shedding - but I like that split of definition, shamelessly stealing for my future projects, thanks! Cheers, Martijn On 1 December 2014 at 13:01, Andreas Lundblad andreas.lundb...@oracle.com wrote: On Mon, Dec 01, 2014 at 01:10:29PM +0100, Jan Lahoda wrote: Hi, In a preparation for JDK-8061549, I'd like to rename all uses of '_' as a one-character identifier in the jaxp and jdk repositories. All the uses I was able to find are in tests, and the identifier is used as a name of a catch parameter. The proposed new name is ignore, but if a different name would be more appropriate, I'll be happy to use it. To me ignore signals I don't care if this exception occurred. In tests, when an exception *should* occurr, I usually name the variable expected. Ignore is a bit shorter though, so in the end it's a matter of taste I guess. -- Andreas
Re: RFR 8065998: Avoid use of _ as a one-character identifier
On 01/12/2014 12:10, Jan Lahoda wrote: Hi, In a preparation for JDK-8061549, I'd like to rename all uses of '_' as a one-character identifier in the jaxp and jdk repositories. All the uses I was able to find are in tests, and the identifier is used as a name of a catch parameter. The proposed new name is ignore, but if a different name would be more appropriate, I'll be happy to use it. Webrev for the jaxp repository: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.00/jaxp/ Webrev for the jdk repository: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.00/jdk/ In JAXP test Bug4969089 then ignore looks a bit odd given that it's in a method declaration. In TypeCheckMicroBenchmark then ignore is might be a misleading too given that the ArrayStoreException causes a CCE to be thrown. -Alan
Re: RFR 8065998: Avoid use of _ as a one-character identifier
Thanks, makes sense. I've updated the patches so that in cases where (I think) the exception is expected, the name is expected. I used unused in other cases where the fact that an exception was thrown is not ignored, but where the value of the exception parameter is not used. I've forgot (sorry for that) that in jaxp tests, there are two unused method parameters named _ - I've named them unused as well. Updated patches: jaxp: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jaxp/ jdk: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jdk/ Does this make sense? Thanks! Jan On 1.12.2014 14:01, Andreas Lundblad wrote: On Mon, Dec 01, 2014 at 01:10:29PM +0100, Jan Lahoda wrote: Hi, In a preparation for JDK-8061549, I'd like to rename all uses of '_' as a one-character identifier in the jaxp and jdk repositories. All the uses I was able to find are in tests, and the identifier is used as a name of a catch parameter. The proposed new name is ignore, but if a different name would be more appropriate, I'll be happy to use it. To me ignore signals I don't care if this exception occurred. In tests, when an exception *should* occurr, I usually name the variable expected. Ignore is a bit shorter though, so in the end it's a matter of taste I guess. -- Andreas
Re: RFR 8065998: Avoid use of _ as a one-character identifier
On 1.12.2014 14:20, Alan Bateman wrote: On 01/12/2014 12:10, Jan Lahoda wrote: Hi, In a preparation for JDK-8061549, I'd like to rename all uses of '_' as a one-character identifier in the jaxp and jdk repositories. All the uses I was able to find are in tests, and the identifier is used as a name of a catch parameter. The proposed new name is ignore, but if a different name would be more appropriate, I'll be happy to use it. Webrev for the jaxp repository: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.00/jaxp/ Webrev for the jdk repository: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.00/jdk/ In JAXP test Bug4969089 then ignore looks a bit odd given that it's in a method declaration. Sorry for that - I've forgot about these uses in method declarations. I've updated the patch to use unused for them. In TypeCheckMicroBenchmark then ignore is might be a misleading too given that the ArrayStoreException causes a CCE to be thrown. I've updated the patch to use expected where the exception appears to be expected and unused where exception appears to be unexpected, but the variable is not used. Updated patches: jaxp: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jaxp/ jdk: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jdk/ Thanks, Jan -Alan
Re: RFR 8065998: Avoid use of _ as a one-character identifier
The changes looks fine to me Jan. -Chris. On 01/12/14 13:25, Jan Lahoda wrote: Thanks, makes sense. I've updated the patches so that in cases where (I think) the exception is expected, the name is expected. I used unused in other cases where the fact that an exception was thrown is not ignored, but where the value of the exception parameter is not used. I've forgot (sorry for that) that in jaxp tests, there are two unused method parameters named _ - I've named them unused as well. Updated patches: jaxp: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jaxp/ jdk: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jdk/ Does this make sense? Thanks! Jan On 1.12.2014 14:01, Andreas Lundblad wrote: On Mon, Dec 01, 2014 at 01:10:29PM +0100, Jan Lahoda wrote: Hi, In a preparation for JDK-8061549, I'd like to rename all uses of '_' as a one-character identifier in the jaxp and jdk repositories. All the uses I was able to find are in tests, and the identifier is used as a name of a catch parameter. The proposed new name is ignore, but if a different name would be more appropriate, I'll be happy to use it. To me ignore signals I don't care if this exception occurred. In tests, when an exception *should* occurr, I usually name the variable expected. Ignore is a bit shorter though, so in the end it's a matter of taste I guess. -- Andreas
Re: RFR 8065998: Avoid use of _ as a one-character identifier
Hi Jan, The changes look good to me; thanks, -Joe On 12/1/2014 5:37 AM, Jan Lahoda wrote: On 1.12.2014 14:20, Alan Bateman wrote: On 01/12/2014 12:10, Jan Lahoda wrote: Hi, In a preparation for JDK-8061549, I'd like to rename all uses of '_' as a one-character identifier in the jaxp and jdk repositories. All the uses I was able to find are in tests, and the identifier is used as a name of a catch parameter. The proposed new name is ignore, but if a different name would be more appropriate, I'll be happy to use it. Webrev for the jaxp repository: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.00/jaxp/ Webrev for the jdk repository: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.00/jdk/ In JAXP test Bug4969089 then ignore looks a bit odd given that it's in a method declaration. Sorry for that - I've forgot about these uses in method declarations. I've updated the patch to use unused for them. In TypeCheckMicroBenchmark then ignore is might be a misleading too given that the ArrayStoreException causes a CCE to be thrown. I've updated the patch to use expected where the exception appears to be expected and unused where exception appears to be unexpected, but the variable is not used. Updated patches: jaxp: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jaxp/ jdk: http://cr.openjdk.java.net/~jlahoda/8065998/webrev.01/jdk/ Thanks, Jan -Alan