author | hseigel |
Mon, 23 Oct 2017 10:42:26 -0400 | |
changeset 47684 | c3c04b6e14f8 |
permissions | -rw-r--r-- |
47684
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
1 |
/* |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
4 |
* |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
8 |
* |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
13 |
* accompanied this code). |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
14 |
* |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
18 |
* |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
21 |
* questions. |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
22 |
*/ |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
23 |
|
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
24 |
package p5; |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
25 |
|
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
26 |
import java.lang.Module; |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
27 |
import p2.c2; |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
28 |
|
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
29 |
public class c5 { |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
30 |
public void method5(p2.c2 param) { |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
31 |
// The invokedynamic opcode that gets generated for the '+' string |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
32 |
// concatenation operator throws an IllegalAccessError when trying to |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
33 |
// access 'param'. |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
34 |
System.out.println("In c5's method5 with param = " + param); |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
35 |
} |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
36 |
|
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
37 |
public void methodAddReadEdge(Module m) { |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
38 |
// Add a read edge from p5/c5's module (first_mod) to second_mod |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
39 |
c5.class.getModule().addReads(m); |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
40 |
} |
c3c04b6e14f8
8174954: Parameter target type is allowed access after a module read edge or a package export has occurred after failed resolution
hseigel
parents:
diff
changeset
|
41 |
} |