From f50206e9a2e0eb975720bb425d3cd94f85cc4fc6 Mon Sep 17 00:00:00 2001 Date: Mon, 19 Apr 2021 15:40:09 +0800 Subject: [PATCH 1/2] Code style fix --- hotspot/src/share/vm/runtime/arguments.cpp | 2 +- hotspot/test/compiler/c2/Test8202414.java | 2 +- hotspot/test/compiler/c2/Test8217359.java | 2 +- hotspot/test/compiler/c2/TestReplaceEquivPhis.java | 2 +- .../criticalnatives/argumentcorruption/Test8167409.sh | 2 +- hotspot/test/compiler/loopopts/TestBeautifyLoops.java | 2 +- hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java | 2 +- hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java | 2 +- .../classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java | 2 +- .../classes/com/huawei/management/AdaptiveHeapMXBean.java | 2 +- jdk/src/share/classes/sun/awt/FontConfiguration.java | 7 +------ jdk/src/share/classes/sun/font/SunFontManager.java | 2 +- .../native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c | 3 ++- jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh | 2 +- 14 files changed, 15 insertions(+), 19 deletions(-) diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 170f1fd9f..7ecb7a271 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -2175,7 +2175,7 @@ void Arguments::set_boxtype_cached_max_flags() { #ifdef COMPILER2 if (!AggressiveOpts) { if (!FLAG_IS_DEFAULT(BoxTypeCachedMax)) { - int const size = 1024; + const int size = 1024; char buffer[size]; jio_snprintf(buffer, size, "java.lang.Long.LongCache.high=" INTX_FORMAT, BoxTypeCachedMax); add_property(buffer); diff --git a/hotspot/test/compiler/c2/Test8202414.java b/hotspot/test/compiler/c2/Test8202414.java index 1d8ef8d93..1f6ac4ed8 100644 --- a/hotspot/test/compiler/c2/Test8202414.java +++ b/hotspot/test/compiler/c2/Test8202414.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2019, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/c2/Test8217359.java b/hotspot/test/compiler/c2/Test8217359.java index ca0d2cc75..533bdce4b 100644 --- a/hotspot/test/compiler/c2/Test8217359.java +++ b/hotspot/test/compiler/c2/Test8217359.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2019, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/c2/TestReplaceEquivPhis.java b/hotspot/test/compiler/c2/TestReplaceEquivPhis.java index d4c93b390..229df93e5 100644 --- a/hotspot/test/compiler/c2/TestReplaceEquivPhis.java +++ b/hotspot/test/compiler/c2/TestReplaceEquivPhis.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2020, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh index 1108aaf93..62a47b6d5 100644 --- a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh +++ b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh @@ -2,7 +2,7 @@ # # Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2019 Huawei Technologies Co. LTD. All Rights Reserved. +# Copyright (c) 2019 Huawei Technologies Co., LTD. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/loopopts/TestBeautifyLoops.java b/hotspot/test/compiler/loopopts/TestBeautifyLoops.java index c831430ed..8fcafc59b 100644 --- a/hotspot/test/compiler/loopopts/TestBeautifyLoops.java +++ b/hotspot/test/compiler/loopopts/TestBeautifyLoops.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2020, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java b/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java index c53f33ff2..90fb2242f 100644 --- a/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java +++ b/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2020, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java b/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java index d9828e56f..3cf657044 100644 --- a/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java +++ b/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2019, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java index 1443fb043..223e66c50 100644 --- a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java +++ b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2019, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java index 70563b58d..69ee78d0a 100644 --- a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java +++ b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2019, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/src/share/classes/sun/awt/FontConfiguration.java b/jdk/src/share/classes/sun/awt/FontConfiguration.java index 0657b07b3..7c6368da3 100644 --- a/jdk/src/share/classes/sun/awt/FontConfiguration.java +++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java @@ -309,12 +309,7 @@ public abstract class FontConfiguration { } } foundOsSpecificFile = false; - - configFile = findImpl(baseName); - if (configFile != null) { - return configFile; - } - return null; + return (configFile = findImpl(baseName)); } /* Initialize the internal data tables from binary format font diff --git a/jdk/src/share/classes/sun/font/SunFontManager.java b/jdk/src/share/classes/sun/font/SunFontManager.java index 9e2de3cf5..6dee8b1aa 100644 --- a/jdk/src/share/classes/sun/font/SunFontManager.java +++ b/jdk/src/share/classes/sun/font/SunFontManager.java @@ -447,7 +447,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { } } catch(Exception e) { e.printStackTrace(); - System.out.println("initialize default Font fail,start use HuaweiJDK font"); + System.out.println("Initialize default font fail,try font in jre/lib/fonts if exists."); FontUtilities.isOpenJDK = false; } diff --git a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c index 1f75e7cb1..99bfff885 100644 --- a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c +++ b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020 Huawei Group Holding Limited. All Rights Reserved. + * Copyright (c) 2019 Alibaba Group Holding Limited. All Rights Reserved. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh b/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh index de8d9b4f0..d928f8c3c 100644 --- a/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh +++ b/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved. +# Copyright (c) 2020, Huawei Technologies Co., Ltd. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it -- 2.23.0