diff --git a/README.md b/README.md index 3efd85b085f77882143995fef4bfe18df14ed737..606c3a76c0fe6a7890e9d5caa72bb06cd73af327 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,7 @@ projectPager.lazyStream().limit(5).map(Project::getName).forEach(name -> System. ### **Java 8 Optional Support** 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: ```java -Optional optionalGroup = gitlabApi.getGroupApi().getGroup("my-group-path"); +Optional optionalGroup = gitlabApi.getGroupApi().getOptionalGroup("my-group-path"); if (optionalGroup.isPresent()) return optionalGroup.get();