Skip to content

Commit 2b249ef

Browse files
freeftrodrotbohm
authored andcommitted
GH-2346 - Fix typo in Affordances.
Signed-off-by: freeftr <[email protected]>
1 parent 546e833 commit 2b249ef

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/main/java/org/springframework/hateoas/mediatype/Affordances.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* Primary API to construct {@link Affordance} instances.
4040
*
4141
* @author Oliver Drotbohm
42+
* @author Jongha Park
4243
* @see #afford(HttpMethod)
4344
*/
4445
public class Affordances implements AffordanceOperations {
@@ -100,19 +101,19 @@ private static class AffordanceBuilder implements ConfigurableAffordance, Config
100101
private final Affordances context;
101102
private final HttpMethod method;
102103
private final Link target;
103-
private final InputPayloadMetadata inputMetdata;
104+
private final InputPayloadMetadata inputMetadata;
104105
private final PayloadMetadata outputMetadata;
105106

106107
private List<QueryParameter> parameters = Collections.emptyList();
107108
private @Nullable String name;
108109

109-
private AffordanceBuilder(Affordances context, HttpMethod method, Link target, InputPayloadMetadata inputMetdata,
110+
private AffordanceBuilder(Affordances context, HttpMethod method, Link target, InputPayloadMetadata inputMetadata,
110111
PayloadMetadata outputMetadata, List<QueryParameter> parameters, @Nullable String name) {
111112

112113
this.context = context;
113114
this.method = method;
114115
this.target = target;
115-
this.inputMetdata = inputMetdata;
116+
this.inputMetadata = inputMetadata;
116117
this.outputMetadata = outputMetadata;
117118
this.parameters = parameters;
118119
this.name = name;
@@ -205,7 +206,7 @@ public ConfigurableAffordance withOutput(ResolvableType type) {
205206
*/
206207
@Override
207208
public ConfigurableAffordance withOutput(PayloadMetadata metadata) {
208-
return new AffordanceBuilder(context, method, target, inputMetdata, metadata, parameters, name);
209+
return new AffordanceBuilder(context, method, target, inputMetadata, metadata, parameters, name);
209210
}
210211

211212
/*
@@ -223,7 +224,7 @@ public ConfigurableAffordance withInputMediaType(MediaType inputMediaType) {
223224
*/
224225
@Override
225226
public ConfigurableAffordance withInputMediaTypes(List<MediaType> inputMediaTypes) {
226-
return withInput(inputMetdata.withMediaTypes(inputMediaTypes));
227+
return withInput(inputMetadata.withMediaTypes(inputMediaTypes));
227228
}
228229

229230
/*
@@ -241,7 +242,7 @@ public ConfigurableAffordance withParameters(QueryParameter... parameters) {
241242
*/
242243
@Override
243244
public ConfigurableAffordance withParameters(List<QueryParameter> parameters) {
244-
return new AffordanceBuilder(context, method, target, inputMetdata, outputMetadata, parameters, name);
245+
return new AffordanceBuilder(context, method, target, inputMetadata, outputMetadata, parameters, name);
245246
}
246247

247248
/*
@@ -255,7 +256,7 @@ public ConfigurableAffordance addParameters(QueryParameter... parameters) {
255256
newParameters.addAll(this.parameters);
256257
newParameters.addAll(Arrays.asList(parameters));
257258

258-
return new AffordanceBuilder(context, method, target, inputMetdata, outputMetadata, newParameters, name);
259+
return new AffordanceBuilder(context, method, target, inputMetadata, outputMetadata, newParameters, name);
259260
}
260261

261262
/*
@@ -268,7 +269,7 @@ public ConfigurableAffordance withTarget(Link target) {
268269
Assert.notNull(target, "Target must not be null!");
269270

270271
return this.target == target ? this
271-
: new AffordanceBuilder(this.context, this.method, target, this.inputMetdata, this.outputMetadata,
272+
: new AffordanceBuilder(this.context, this.method, target, this.inputMetadata, this.outputMetadata,
272273
this.parameters, this.name);
273274
}
274275

@@ -280,7 +281,7 @@ public ConfigurableAffordance withTarget(Link target) {
280281
public ConfigurableAffordance withName(@Nullable String name) {
281282

282283
return this.name == name ? this
283-
: new AffordanceBuilder(this.context, this.method, this.target, this.inputMetdata, this.outputMetadata,
284+
: new AffordanceBuilder(this.context, this.method, this.target, this.inputMetadata, this.outputMetadata,
284285
this.parameters, name);
285286
}
286287

@@ -323,8 +324,8 @@ public String getNameOrDefault() {
323324

324325
String name = method.toString().toLowerCase();
325326

326-
Class<?> type = TypeBasedPayloadMetadata.class.isInstance(inputMetdata) //
327-
? TypeBasedPayloadMetadata.class.cast(inputMetdata).getType() //
327+
Class<?> type = TypeBasedPayloadMetadata.class.isInstance(inputMetadata) //
328+
? TypeBasedPayloadMetadata.class.cast(inputMetadata).getType() //
328329
: null;
329330

330331
return type == null ? name : name.concat(type.getSimpleName());
@@ -345,7 +346,7 @@ public HttpMethod getMethod() {
345346
*/
346347
@Override
347348
public InputPayloadMetadata getInputMetadata() {
348-
return inputMetdata;
349+
return inputMetadata;
349350
}
350351

351352
/*

0 commit comments

Comments
 (0)