Skip to content

Commit

Permalink
8304537: Ant-based langtools build fails after JDK-8015831 Add lint c…
Browse files Browse the repository at this point in the history
…heck for calling overridable methods from a constructor

Reviewed-by: vromero, erikj
  • Loading branch information
lahodaj committed Mar 21, 2023
1 parent a6b72f5 commit c4df9b5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 0 additions & 2 deletions make/modules/jdk.compiler/Java.gmk
Expand Up @@ -23,8 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*'
JAVAC_FLAGS += -XDstringConcat=inline
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.jdeps/Java.gmk
Expand Up @@ -25,8 +25,6 @@

COPY += .txt

DISABLED_WARNINGS_java += this-escape

CLEAN_FILES += $(wildcard \
$(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \
$(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties)
2 changes: 0 additions & 2 deletions make/modules/jdk.jshell/Java.gmk
Expand Up @@ -23,6 +23,4 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

COPY += .jsh .properties
@@ -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.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -67,6 +67,7 @@ public class Dependencies {
/**
* Thrown when a class file cannot be found.
*/
@SuppressWarnings("this-escape")
public static class ClassFileNotFoundException extends Exception {
private static final long serialVersionUID = 3632265927794475048L;

Expand All @@ -86,6 +87,7 @@ public ClassFileNotFoundException(String className, Throwable cause) {
/**
* Thrown when an exception is found processing a class file.
*/
@SuppressWarnings("this-escape")
public static class ClassFileError extends Error {
private static final long serialVersionUID = 4111110813961313203L;

Expand Down
@@ -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.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -81,6 +81,7 @@ public class JdiInitiator {
* @param customConnectorArgs custom arguments passed to the connector.
* These are JDI com.sun.jdi.connect.Connector arguments.
*/
@SuppressWarnings("this-escape")
public JdiInitiator(int port, List<String> remoteVMOptions, String remoteAgent,
boolean isLaunch, String host, int timeout,
Map<String, String> customConnectorArgs) {
Expand Down
@@ -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.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -428,6 +428,7 @@ public static class UserException extends RunException {

private final String causeExceptionClass;

@SuppressWarnings("this-escape")
public UserException(String message, String causeExceptionClass, StackTraceElement[] stackElements) {
super(message);
this.causeExceptionClass = causeExceptionClass;
Expand Down Expand Up @@ -467,6 +468,7 @@ public static class ResolutionException extends RunException {
* @param id An internal identifier of the specific method
* @param stackElements the stack trace
*/
@SuppressWarnings("this-escape")
public ResolutionException(int id, StackTraceElement[] stackElements) {
super("resolution exception: " + id);
this.id = id;
Expand Down

1 comment on commit c4df9b5

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.