Skip to content

Commit 83a05ad

Browse files
authored
Fixed code sample for Optional use.
1 parent c17f960 commit 83a05ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ projectPager.lazyStream().limit(5).map(Project::getName).forEach(name -> System.
219219
### **Java 8 Optional Support**
220220
GitLab4J-API supports Java 8 Optional<T> for API calls that result in the return of a single item. Here is an example on how to use the Java 8 Optional<T> API calls:
221221
```java
222-
Optional<Group> optionalGroup = gitlabApi.getGroupApi().getGroup("my-group-path");
222+
Optional<Group> optionalGroup = gitlabApi.getGroupApi().getOptionalGroup("my-group-path");
223223
if (optionalGroup.isPresent())
224224
return optionalGroup.get();
225225

0 commit comments

Comments
 (0)