library.md: Clean up code snippet

This commit is contained in:
Karol Lewandowski 2023-10-26 12:30:56 +02:00
parent def244146b
commit b1630619ef

View File

@ -26,7 +26,7 @@ Package [`com.intellij.openapi.roots.libraries`](%gh-ic%/platform/projectModel-a
To get the list of libraries that a module depends on, use `OrderEnumerator.forEachLibrary` as follows.
```java
final List<String> libraryNames = new ArrayList<String>();
List<String> libraryNames = new ArrayList<>();
ModuleRootManager.getInstance(module).orderEntries().forEachLibrary(library -> {
libraryNames.add(library.getName());
return true;