8167314: Enable the check to detect duplicate provides in in GenModuleInfoSource
Reviewed-by: lancea
This commit is contained in:
parent
6f880d7f48
commit
8a10925316
@ -431,14 +431,12 @@ public class GenModuleInfoSource {
|
||||
}
|
||||
uses.put(name, statement);
|
||||
break;
|
||||
/* Disable this check until jdk.internal.vm.compiler generated file is fixed.
|
||||
case "provides":
|
||||
if (provides.containsKey(name)) {
|
||||
throw parser.newError("multiple " + keyword + " " + name);
|
||||
}
|
||||
provides.put(name, statement);
|
||||
break;
|
||||
*/
|
||||
}
|
||||
String lookAhead = lookAhead(parser);
|
||||
if (lookAhead.equals(statement.qualifier)) {
|
||||
|
@ -230,7 +230,11 @@ public class ModuleInfoExtraTest {
|
||||
new String[] {
|
||||
" uses s;",
|
||||
" uses s;"
|
||||
}, ".*, line .*, multiple uses s.*"
|
||||
}, ".*, line .*, multiple uses s.*",
|
||||
new String[] {
|
||||
" provides s with impl1;",
|
||||
" provides s with impl2, impl3;"
|
||||
}, ".*, line .*, multiple provides s.*"
|
||||
);
|
||||
|
||||
void errorCases() {
|
||||
|
Loading…
Reference in New Issue
Block a user