8304537: Ant-based langtools build fails after JDK-8015831 Add lint check for calling overridable methods from a constructor

Reviewed-by: vromero, erikj
This commit is contained in:
Jan Lahoda 2023-03-21 07:33:56 +00:00
parent a6b72f56f5
commit c4df9b5f17
6 changed files with 8 additions and 9 deletions

View File

@ -23,8 +23,6 @@
# questions. # questions.
# #
DISABLED_WARNINGS_java += this-escape
DOCLINT += -Xdoclint:all/protected \ DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*' '-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*'
JAVAC_FLAGS += -XDstringConcat=inline JAVAC_FLAGS += -XDstringConcat=inline

View File

@ -25,8 +25,6 @@
COPY += .txt COPY += .txt
DISABLED_WARNINGS_java += this-escape
CLEAN_FILES += $(wildcard \ CLEAN_FILES += $(wildcard \
$(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \ $(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \
$(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties) $(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties)

View File

@ -23,6 +23,4 @@
# questions. # questions.
# #
DISABLED_WARNINGS_java += this-escape
COPY += .jsh .properties COPY += .jsh .properties

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2023, 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
@ -67,6 +67,7 @@ public class Dependencies {
/** /**
* Thrown when a class file cannot be found. * Thrown when a class file cannot be found.
*/ */
@SuppressWarnings("this-escape")
public static class ClassFileNotFoundException extends Exception { public static class ClassFileNotFoundException extends Exception {
private static final long serialVersionUID = 3632265927794475048L; private static final long serialVersionUID = 3632265927794475048L;
@ -86,6 +87,7 @@ public class Dependencies {
/** /**
* Thrown when an exception is found processing a class file. * Thrown when an exception is found processing a class file.
*/ */
@SuppressWarnings("this-escape")
public static class ClassFileError extends Error { public static class ClassFileError extends Error {
private static final long serialVersionUID = 4111110813961313203L; private static final long serialVersionUID = 4111110813961313203L;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2023, 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
@ -81,6 +81,7 @@ public class JdiInitiator {
* @param customConnectorArgs custom arguments passed to the connector. * @param customConnectorArgs custom arguments passed to the connector.
* These are JDI com.sun.jdi.connect.Connector arguments. * These are JDI com.sun.jdi.connect.Connector arguments.
*/ */
@SuppressWarnings("this-escape")
public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent, public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent,
boolean isLaunch, String host, int timeout, boolean isLaunch, String host, int timeout,
Map<String, String> customConnectorArgs) { Map<String, String> customConnectorArgs) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2023, 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
@ -428,6 +428,7 @@ public interface ExecutionControl extends AutoCloseable {
private final String causeExceptionClass; private final String causeExceptionClass;
@SuppressWarnings("this-escape")
public UserException(String message, String causeExceptionClass, StackTraceElement[] stackElements) { public UserException(String message, String causeExceptionClass, StackTraceElement[] stackElements) {
super(message); super(message);
this.causeExceptionClass = causeExceptionClass; this.causeExceptionClass = causeExceptionClass;
@ -467,6 +468,7 @@ public interface ExecutionControl extends AutoCloseable {
* @param id An internal identifier of the specific method * @param id An internal identifier of the specific method
* @param stackElements the stack trace * @param stackElements the stack trace
*/ */
@SuppressWarnings("this-escape")
public ResolutionException(int id, StackTraceElement[] stackElements) { public ResolutionException(int id, StackTraceElement[] stackElements) {
super("resolution exception: " + id); super("resolution exception: " + id);
this.id = id; this.id = id;