mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8272515: JFR: Names should only be valid Java identifiers
Reviewed-by: mgronlun
This commit is contained in:
parent
4d95a5d6dc
commit
48aff23165
11 changed files with 285 additions and 49 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. 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
|
||||
|
@ -168,7 +168,7 @@ public final class Checks {
|
|||
* Returns true if the given string is a legal Java identifier,
|
||||
* otherwise false.
|
||||
*/
|
||||
private static boolean isJavaIdentifier(String str) {
|
||||
public static boolean isJavaIdentifier(String str) {
|
||||
if (str.isEmpty() || RESERVED.contains(str))
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue