Skip to content

Commit

Permalink
Merge upstream-jdk
Browse files Browse the repository at this point in the history
  • Loading branch information
corretto-github-robot committed Jul 10, 2024
2 parents c5076c9 + 70ad622 commit 51f4f62
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ protected void preprocessArgument(Object arg) {
if (arg instanceof Type type) {
preprocessType(type);
}
else if (arg instanceof JCDiagnostic.AnnotatedType type) {
preprocessType(type.type());
}
else if (arg instanceof Symbol symbol) {
preprocessSymbol(symbol);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2024, 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
Expand Down Expand Up @@ -27,6 +27,7 @@
* @test TestMinInitialErgonomics
* @bug 8006088
* @requires vm.gc.Parallel
* @requires vm.compMode != "Xcomp"
* @summary Test Parallel GC ergonomics decisions related to minimum and initial heap size.
* @library /test/lib
* @library /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public static void main(String[] argv)
// threads block after doing some computation
waitUntilThreadBlocked();


long times[] = mbean.getThreadCpuTime(ids);
long userTimes[] = mbean.getThreadUserTime(ids);

Expand Down Expand Up @@ -222,6 +221,8 @@ private static void waitUntilThreadBlocked()
}
}
}
// Account for threads using CPU for a few millis after their WAITING state is visible:
goSleep(500);
}

public static void doit() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* @test /nodynamiccopyright/
* @bug 8334757
* @compile/fail/ref=CantAnnotateClassWithTypeVariable.out -XDrawDiagnostics CantAnnotateClassWithTypeVariable.java
*/

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

public class CantAnnotateClassWithTypeVariable {
@Target(ElementType.TYPE_USE)
@interface TA {}

static class A {
static class B<T> {}
}

<T> @TA A.B<T> f() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CantAnnotateClassWithTypeVariable.java:18:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @CantAnnotateClassWithTypeVariable.TA), CantAnnotateClassWithTypeVariable.A, @CantAnnotateClassWithTypeVariable.TA CantAnnotateClassWithTypeVariable.A.B<T>
1 error

0 comments on commit 51f4f62

Please sign in to comment.