test/hotspot/jtreg/runtime/RedefineTests/ModifyAnonymous.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
open Cdiff test/hotspot/jtreg/runtime/RedefineTests/ModifyAnonymous.java
test/hotspot/jtreg/runtime/RedefineTests/ModifyAnonymous.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2016, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 107,117 ****
}
static void runTest() {
while (!done) {
Class[] allLoadedClasses = inst.getAllLoadedClasses();
! for (Class clazz : allLoadedClasses) {
final String name = clazz.getName();
if (name.contains("$$Lambda$") && name.contains("App")) {
if (inst.isModifiableClass(clazz)) {
throw new RuntimeException ("Class should not be modifiable");
}
--- 107,124 ----
}
static void runTest() {
while (!done) {
Class[] allLoadedClasses = inst.getAllLoadedClasses();
! int len = allLoadedClasses.length;
! for (int idx = 0; idx < len; idx++) {
! Class clazz = allLoadedClasses[idx];
! if (clazz == null) {
! System.out.println(" null clazz, allLoadedClasses[] length: " +
! len + " index: " + idx);
! continue;
! }
final String name = clazz.getName();
if (name.contains("$$Lambda$") && name.contains("App")) {
if (inst.isModifiableClass(clazz)) {
throw new RuntimeException ("Class should not be modifiable");
}
test/hotspot/jtreg/runtime/RedefineTests/ModifyAnonymous.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File