Re: RFR: 8272515: JFR: Names should only be valid Java identifiers

2021-09-20 Thread Markus Grönlund
On Wed, 8 Sep 2021 13:00:17 GMT, Erik Gahlin  wrote:

> Hi,
> 
> Could I have a review of change that prevents invalid Java identifiers or 
> type names in JFR events. For rationale and compatibility issues see the CSR 
> request. The only change to java.base is making 
> jdk.modules.internal.Checks::isJavaIdentifier(String) public, so it can be 
> reused by the jdk.jfr module.
> 
> Testing: /jdk/jdk/jfr + tier1 + tier2
> 
> Thanks
> Erik

Looks good.

-

Marked as reviewed by mgronlun (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5415


Re: RFR: 8272515: JFR: Names should only be valid Java identifiers

2021-09-13 Thread Alan Bateman
On Wed, 8 Sep 2021 13:00:17 GMT, Erik Gahlin  wrote:

> Hi,
> 
> Could I have a review of change that prevents invalid Java identifiers or 
> type names in JFR events. For rationale and compatibility issues see the CSR 
> request. The only change to java.base is making 
> jdk.modules.internal.Checks::isJavaIdentifier(String) public, so it can be 
> reused by the jdk.jfr module.
> 
> Testing: /jdk/jdk/jfr + tier1 + tier2
> 
> Thanks
> Erik

src/java.base/share/classes/jdk/internal/module/Checks.java line 171:

> 169:  * otherwise false.
> 170:  */
> 171: public static boolean isJavaIdentifier(String str) {

I see Checks is already used by code in the jdk.jlink and jdk.jartool module so 
probably okay if JFR uses it. At some point we need to get back to trimming 
back the qualified exports to avoid too much back sliding into a ball of mud.

-

PR: https://git.openjdk.java.net/jdk/pull/5415


RFR: 8272515: JFR: Names should only be valid Java identifiers

2021-09-13 Thread Erik Gahlin
Hi,

Could I have a review of change that prevents invalid Java identifiers or type 
names in JFR events. For rationale and compatibility issues see the CSR 
request. The only change to java.base is making 
jdk.modules.internal.Checks::isJavaIdentifier(String) public, so it can be 
reused by the jdk.jfr module.

Testing: /jdk/jdk/jfr + tier1 + tier2

Thanks
Erik

-

Commit messages:
 - Improve guard against invalid type
 - Remove unused imports
 - Initial

Changes: https://git.openjdk.java.net/jdk/pull/5415/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5415&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8272515
  Stats: 308 lines in 11 files changed: 259 ins; 23 del; 26 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5415.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5415/head:pull/5415

PR: https://git.openjdk.java.net/jdk/pull/5415