Javac doesn't report errors on duplicate provides with different service implementations

XMLWordPrintable

    • b156
    • Verified

        The spec says:

        "It is a compile-time error if more than one provides statement in a module declaration specifies the same service interface. "

        If the service implementations of these provides statements are different then compiler does not produce an error.

        module m {
            provides I with A;
            provides I with B;
        }

              Assignee:
              Jonathan Gibbons
              Reporter:
              Victor Rudometov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: