Skip to content

Commit 1cb6069

Browse files
committed
Polishing
1 parent 4b68227 commit 1cb6069

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-core/src/main/java/org/springframework/core/SerializableTypeWrapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ public MethodInvokeTypeProvider(TypeProvider provider, Method method, int index)
389389
public Type getType() {
390390
Object result = this.result;
391391
if (result == null) {
392-
// Lazy invocation of the target method
392+
// Lazy invocation of the target method on the provided type
393393
result = ReflectionUtils.invokeMethod(this.method, this.provider.getType());
394-
// Cache the result for further calls
394+
// Cache the result for further calls to getType()
395395
this.result = result;
396396
}
397397
return (result instanceof Type[] ? ((Type[]) result)[this.index] : (Type) result);
@@ -405,7 +405,7 @@ public Object getSource() {
405405
private void readObject(ObjectInputStream inputStream) throws IOException, ClassNotFoundException {
406406
inputStream.defaultReadObject();
407407
this.method = ReflectionUtils.findMethod(this.provider.getType().getClass(), this.methodName);
408-
Assert.state(this.method.getReturnType() == Type.class || this.method.getReturnType() == Type[].class);
408+
Assert.state(Type.class == this.method.getReturnType() || Type[].class == this.method.getReturnType());
409409
}
410410
}
411411

src/asciidoc/web-mvc.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ also <<mvc-config-content-negotiation>> for content negotiation configuration.
867867

868868

869869
[[mvc-ann-requestmapping-rfd]]
870-
==== Suffix Suffix Pattern Matching and RFD
870+
==== Suffix Pattern Matching and RFD
871871

872872
Reflected file download (RFD) attack was first described in a
873873
https://www.trustwave.com/Resources/SpiderLabs-Blog/Reflected-File-Download---A-New-Web-Attack-Vector/[paper by Trustwave]
@@ -907,7 +907,7 @@ Below are additional recommendations from the report:
907907
For an example of how to do that with Spring see https://github.com/rwinch/spring-jackson-owasp[spring-jackson-owasp].
908908
* Configure suffix pattern matching to be turned off or restricted to explicitly
909909
registered suffixes only.
910-
* Configure content negotiation with the properties useJaf and “ignoreUknownPathExtension”
910+
* Configure content negotiation with the properties "useJaf" and "ignoreUnknownPathExtensions"
911911
set to false which would result in a 406 response for URLs with unknown extensions.
912912
Note however that this may not be an option if URLs are naturally expected to have
913913
a dot towards the end.

0 commit comments

Comments
 (0)