8251325: Miss 'L' for long value in if statement
Erik Gahlin
erik.gahlin at oracle.com
Mon Aug 10 21:52:16 UTC 2020
Hi Yuta,
If you are cleaning this up, you might as well change it to:
if (delay < 1_000_000_000) {
The ‘L’ is not necessary.
Thanks
Erik
> On 10 Aug 2020, at 14:19, 齋藤悠太 <uc4w6c at bma.biglobe.ne.jp> wrote:
>
> Hi,
> I want to correct typo.
> JBS : https://bugs.openjdk.java.net/browse/JDK-8251325 <https://bugs.openjdk.java.net/browse/JDK-8251325>
>
> This will be my first contribution.
> In other logic has' L 'at the end of all three, so I think it's a simple typo. (DCmdStart.java: 128)
>
> If there is no problem with the revision, I would like someone to sponsor me.
> I will sign the OCA tomorrow.
>
> The modifications are as follows.
>
> ```
> $ hg diff -g
> diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java
> --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java
> +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java
> @@ -132,7 +132,7 @@
> }
>
> if (delay != null) {
> - if (delay < 1000L * 1000L * 1000) {
> + if (delay < 1000L * 1000L * 1000L) {
> // to avoid typo, delay shorter than 1s makes no sense.
> throw new DCmdException("Could not start recording, delay must be at least 1 second.");
> }
> ```
>
> Thanks to Chihiro Ito for reporting this.
>
> Thanks.
>
> Yuta Saito
>
More information about the hotspot-jfr-dev
mailing list