Skip to content

Commit 7c9a3d2

Browse files
committed
fix: Fix typo in Affordances
Signed-off-by: freeftr <[email protected]>
1 parent 3a9d0ba commit 7c9a3d2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/**
3939
* Primary API to construct {@link Affordance} instances.
4040
*
41-
* @author Oliver Drotbohm
41+
* @author Oliver Drotbohm, Jongha Park
4242
* @see #afford(HttpMethod)
4343
*/
4444
public class Affordances implements AffordanceOperations {
@@ -100,19 +100,19 @@ private static class AffordanceBuilder implements ConfigurableAffordance, Config
100100
private final Affordances context;
101101
private final HttpMethod method;
102102
private final Link target;
103-
private final InputPayloadMetadata inputMetdata;
103+
private final InputPayloadMetadata inputMetadata;
104104
private final PayloadMetadata outputMetadata;
105105

106106
private List<QueryParameter> parameters = Collections.emptyList();
107107
private @Nullable String name;
108108

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

112112
this.context = context;
113113
this.method = method;
114114
this.target = target;
115-
this.inputMetdata = inputMetdata;
115+
this.inputMetadata = inputMetadata;
116116
this.outputMetadata = outputMetadata;
117117
this.parameters = parameters;
118118
this.name = name;
@@ -205,7 +205,7 @@ public ConfigurableAffordance withOutput(ResolvableType type) {
205205
*/
206206
@Override
207207
public ConfigurableAffordance withOutput(PayloadMetadata metadata) {
208-
return new AffordanceBuilder(context, method, target, inputMetdata, metadata, parameters, name);
208+
return new AffordanceBuilder(context, method, target, inputMetadata, metadata, parameters, name);
209209
}
210210

211211
/*
@@ -223,7 +223,7 @@ public ConfigurableAffordance withInputMediaType(MediaType inputMediaType) {
223223
*/
224224
@Override
225225
public ConfigurableAffordance withInputMediaTypes(List<MediaType> inputMediaTypes) {
226-
return withInput(inputMetdata.withMediaTypes(inputMediaTypes));
226+
return withInput(inputMetadata.withMediaTypes(inputMediaTypes));
227227
}
228228

229229
/*
@@ -241,7 +241,7 @@ public ConfigurableAffordance withParameters(QueryParameter... parameters) {
241241
*/
242242
@Override
243243
public ConfigurableAffordance withParameters(List<QueryParameter> parameters) {
244-
return new AffordanceBuilder(context, method, target, inputMetdata, outputMetadata, parameters, name);
244+
return new AffordanceBuilder(context, method, target, inputMetadata, outputMetadata, parameters, name);
245245
}
246246

247247
/*
@@ -255,7 +255,7 @@ public ConfigurableAffordance addParameters(QueryParameter... parameters) {
255255
newParameters.addAll(this.parameters);
256256
newParameters.addAll(Arrays.asList(parameters));
257257

258-
return new AffordanceBuilder(context, method, target, inputMetdata, outputMetadata, newParameters, name);
258+
return new AffordanceBuilder(context, method, target, inputMetadata, outputMetadata, newParameters, name);
259259
}
260260

261261
/*
@@ -268,7 +268,7 @@ public ConfigurableAffordance withTarget(Link target) {
268268
Assert.notNull(target, "Target must not be null!");
269269

270270
return this.target == target ? this
271-
: new AffordanceBuilder(this.context, this.method, target, this.inputMetdata, this.outputMetadata,
271+
: new AffordanceBuilder(this.context, this.method, target, this.inputMetadata, this.outputMetadata,
272272
this.parameters, this.name);
273273
}
274274

@@ -280,7 +280,7 @@ public ConfigurableAffordance withTarget(Link target) {
280280
public ConfigurableAffordance withName(@Nullable String name) {
281281

282282
return this.name == name ? this
283-
: new AffordanceBuilder(this.context, this.method, this.target, this.inputMetdata, this.outputMetadata,
283+
: new AffordanceBuilder(this.context, this.method, this.target, this.inputMetadata, this.outputMetadata,
284284
this.parameters, name);
285285
}
286286

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

324324
String name = method.toString().toLowerCase();
325325

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

330330
return type == null ? name : name.concat(type.getSimpleName());
@@ -345,7 +345,7 @@ public HttpMethod getMethod() {
345345
*/
346346
@Override
347347
public InputPayloadMetadata getInputMetadata() {
348-
return inputMetdata;
348+
return inputMetadata;
349349
}
350350

351351
/*

0 commit comments

Comments
 (0)