Skip to content

Commit

Permalink
8274244: ReportOnImportedModuleAnnotation.java fails on rerun
Browse files Browse the repository at this point in the history
Reviewed-by: jjg
  • Loading branch information
jddarcy committed Oct 5, 2021
1 parent 3789065 commit c391e59
Showing 1 changed file with 9 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2021, 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,7 +27,10 @@
* 8235458
* @summary javac shouldn't fail when an annotation processor report a message about an annotation on a module
* javac should process annotated module when imports statement are present
* @library /tools/lib
* @modules jdk.compiler
* @build toolbox.ToolBox
* @run main ReportOnImportedModuleAnnotation
*/

import java.io.PrintWriter;
Expand All @@ -41,6 +44,8 @@
import javax.tools.StandardLocation;
import javax.tools.ToolProvider;

import toolbox.ToolBox;

public class ReportOnImportedModuleAnnotation {

public static void main(String[] args) throws Exception {
Expand All @@ -49,6 +54,9 @@ public static void main(String[] args) throws Exception {

final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();

// Clean any existing files in output directory
(new ToolBox()).cleanDirectory(testOutputPath);

// Compile annotation and processor modules
StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
fileManager.setLocationFromPaths(StandardLocation.MODULE_SOURCE_PATH, List.of(testBasePath.resolve("mods-src1/")));
Expand Down

3 comments on commit c391e59

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on c391e59 Mar 10, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on c391e59 Mar 10, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-c391e59e in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit c391e59e from the openjdk/jdk repository.

The commit being backported was authored by Joe Darcy on 5 Oct 2021 and was reviewed by Jonathan Gibbons.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-c391e59e:GoeLin-backport-c391e59e
$ git checkout GoeLin-backport-c391e59e
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-c391e59e

Please sign in to comment.