JdkOrderEntry (@NotNull ModuleRootModel model, @Nullable Sdk sdk) { if (sdk == null) return null; for (OrderEntry orderEntry : model.getOrderEntries()) { if (orderEntry instanceof JdkOrderEntry && sdk.equals(((JdkOrderEntry)orderEntry).getJdk())) { return (JdkOrderEntry)orderEntry; } } return null; }