8328139: Prefer 'override' to 'virtual' in subclasses of 'GCInitLogger'

Reviewed-by: kbarrett, jsjolen
This commit is contained in:
Guoxiong Li 2024-03-14 15:01:44 +00:00
parent 792fc9d114
commit 51381bb13c
3 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,5 @@
/* /*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, Red Hat, Inc. All rights reserved. * Copyright (c) 2020, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -29,7 +30,7 @@
class EpsilonInitLogger : public GCInitLogger { class EpsilonInitLogger : public GCInitLogger {
protected: protected:
virtual void print_gc_specific(); void print_gc_specific() override;
public: public:
static void print(); static void print();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,9 +29,9 @@
class G1InitLogger : public GCInitLogger { class G1InitLogger : public GCInitLogger {
protected: protected:
virtual void print_heap(); void print_heap() override;
virtual void print_workers(); void print_workers() override;
virtual void print_gc_specific(); void print_gc_specific() override;
public: public:
static void print(); static void print();
}; };

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,7 @@
class ParallelInitLogger : public GCInitLogger { class ParallelInitLogger : public GCInitLogger {
protected: protected:
virtual void print_heap(); void print_heap() override;
public: public:
static void print(); static void print();
}; };