[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: RFR: 8163229: test test/tools/javac/CaptureInSubtype.java has a main method that is never execut
From:       Archie L. Cobbs <duke () openjdk ! org>
Date:       2022-12-19 15:44:08
Message-ID: sFhntGYc1A6wcU19sCZnpj0tViQgyDi-1QBoOqQfqaQ=.33765451-e9b1-4c45-aedf-41a90d7901e4 () github ! com
[Download RAW message or body]

> This PR deals with some housekeeping relating to compiler unit tests.
> 
> JDK-8163229 points out that there are several tests that have a `public static void \
> main(String[])` method, but because the test expects to fail during compilation, \
> the test is never actually run, and so these `main` methods are just clutter that \
> can be removed. 
> However, there are also some tests where the test is never run, but the `main()` \
> method generates one or more of the expected compilation errors. Obviously we need \
> to keep those, but they don't need to be declared as `public static void \
> main(String[])` which is misleading. So instead we rename these methods to \
> `meth()`, and also we remove the `String[]` parameter when it's not needed by the \
> test.

Archie L. Cobbs has updated the pull request with a new target base due to a merge or \
a rebase. The pull request now contains three commits:

 - Merge branch 'master' into JDK-8163229
 - Merge branch 'master' into JDK-8163229
 - Rename or remove "main()" methods in tests that never actually run.

-------------

Changes: https://git.openjdk.org/jdk/pull/10992/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10992&range=02
  Stats: 187 lines in 127 files changed: 0 ins; 68 del; 119 mod
  Patch: https://git.openjdk.org/jdk/pull/10992.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10992/head:pull/10992

PR: https://git.openjdk.org/jdk/pull/10992


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic