#806 - Polishing.

This commit is contained in:
Oliver Drotbohm
2019-02-11 14:43:37 +01:00
parent aca2cc578a
commit f830d3d641
2 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2017 the original author or authors. * Copyright 2017-2019 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2017 the original author or authors. * Copyright 2017-2019 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import org.springframework.http.MediaType;
import org.springframework.plugin.core.Plugin; import org.springframework.plugin.core.Plugin;
/** /**
*
* @author Greg Turnquist * @author Greg Turnquist
* @author Oliver Gierke * @author Oliver Gierke
*/ */
@@ -50,7 +49,8 @@ public interface AffordanceModelFactory extends Plugin<MediaType> {
* @param outputType * @param outputType
* @return * @return
*/ */
AffordanceModel getAffordanceModel(String name, Link link, HttpMethod httpMethod, ResolvableType inputType, List<QueryParameter> queryMethodParameters, ResolvableType outputType); AffordanceModel getAffordanceModel(String name, Link link, HttpMethod httpMethod, ResolvableType inputType,
List<QueryParameter> queryMethodParameters, ResolvableType outputType);
/** /**
* Returns if a plugin should be invoked according to the given delimiter. * Returns if a plugin should be invoked according to the given delimiter.
@@ -61,8 +61,8 @@ public interface AffordanceModelFactory extends Plugin<MediaType> {
@Override @Override
default boolean supports(MediaType delimiter) { default boolean supports(MediaType delimiter) {
return Optional.ofNullable(getMediaType()) return Optional.ofNullable(getMediaType()) //
.map(mediaType -> mediaType.equals(delimiter)) .map(mediaType -> mediaType.equals(delimiter)) //
.orElse(false); .orElse(false);
} }
} }