On Wed, 10 Mar 2021 12:59:18 GMT, Patrick Concannon <pconcan...@openjdk.org> wrote:
> Hi, > > Could someone please review my code for updating the code in the `java.lang` > package to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 313: > 311: @Override > 312: public boolean equals(Object ob) { > 313: if (!(ob instanceof Requires that)) it would be nicer if you inverted this to return (ob instanced Requires that) && ... Same thing for the equals methods in Exports, Opens, Provides, ... ------------- PR: https://git.openjdk.java.net/jdk/pull/2913