Skip to content

Commit a39276a

Browse files
committed
Polishing
1 parent b5127dc commit a39276a

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
3030

3131
/**
3232
* {@link Resource} implementation for {@code java.io.File} handles.
33-
* Obviously supports resolution as File, and also as URL.
33+
* Supports resolution as a {@code File} and also as a {@code URL}.
3434
* Implements the extended {@link WritableResource} interface.
3535
*
3636
* @author Juergen Hoeller
@@ -85,7 +85,6 @@ public final String getPath() {
8585
return this.path;
8686
}
8787

88-
8988
/**
9089
* This implementation returns whether the underlying file exists.
9190
* @see java.io.File#exists()

spring-core/src/main/java/org/springframework/core/io/UrlResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
/**
3434
* {@link Resource} implementation for {@code java.net.URL} locators.
35-
* <p>Supports resolution as a {@code URL} and also as a {@code File} in
35+
* Supports resolution as a {@code URL} and also as a {@code File} in
3636
* case of the {@code "file:"} protocol.
3737
*
3838
* @author Juergen Hoeller
@@ -134,6 +134,7 @@ public UrlResource(String protocol, String location, String fragment) throws Mal
134134
}
135135
}
136136

137+
137138
/**
138139
* Determine a cleaned URL for the given original URL.
139140
* @param originalUrl the original URL
@@ -152,7 +153,6 @@ private URL getCleanedUrl(URL originalUrl, String originalPath) {
152153
}
153154
}
154155

155-
156156
/**
157157
* This implementation opens an InputStream for the given URL.
158158
* <p>It sets the {@code useCaches} flag to {@code false},

spring-core/src/main/java/org/springframework/util/ClassUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -56,16 +56,16 @@ public abstract class ClassUtils {
5656
/** Prefix for internal non-primitive array class names: "[L" */
5757
private static final String NON_PRIMITIVE_ARRAY_PREFIX = "[L";
5858

59-
/** The package separator character '.' */
59+
/** The package separator character: '.' */
6060
private static final char PACKAGE_SEPARATOR = '.';
6161

62-
/** The path separator character '/' */
62+
/** The path separator character: '/' */
6363
private static final char PATH_SEPARATOR = '/';
6464

65-
/** The inner class separator character '$' */
65+
/** The inner class separator character: '$' */
6666
private static final char INNER_CLASS_SEPARATOR = '$';
6767

68-
/** The CGLIB class separator character "$$" */
68+
/** The CGLIB class separator: "$$" */
6969
public static final String CGLIB_CLASS_SEPARATOR = "$$";
7070

7171
/** The ".class" file suffix */

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,7 @@ public void setBeanName(String name) {
131131
@Override
132132
public void afterPropertiesSet() throws Exception {
133133
if (this.servletClass == null) {
134-
throw new IllegalArgumentException("servletClass is required");
135-
}
136-
if (!Servlet.class.isAssignableFrom(this.servletClass)) {
137-
throw new IllegalArgumentException("servletClass [" + this.servletClass.getName() +
138-
"] needs to implement interface [javax.servlet.Servlet]");
134+
throw new IllegalArgumentException("'servletClass' is required");
139135
}
140136
if (this.servletName == null) {
141137
this.servletName = this.beanName;

0 commit comments

Comments
 (0)