Skip to content

Commit

Permalink
Fixed constant name to upper-case
Browse files Browse the repository at this point in the history
  • Loading branch information
ao-apps committed Sep 17, 2023
1 parent ee83b83 commit 95e6b5c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class SiteMapRobotsTxtServlet extends HttpServlet {
* The modified time is based on the modified time of the class file for this servlet.
* This is preferred over build timestamps in support of reproducible builds.
*/
private static final long lastModified;
private static final long LAST_MODIFIED;

static {
try {
Expand All @@ -75,20 +75,20 @@ public class SiteMapRobotsTxtServlet extends HttpServlet {
}
URLConnection conn = classFile.openConnection();
conn.setUseCaches(false);
long lm = conn.getLastModified();
long lastModified = conn.getLastModified();
conn.getInputStream().close();
if (lm == 0) {
if (lastModified == 0) {
throw new IOException("Unknown last-modified in class file: " + classFilename);
}
lastModified = lm;
LAST_MODIFIED = lastModified;
} catch (IOException e) {
throw new ExceptionInInitializerError(e);
}
}

@Override
protected long getLastModified(HttpServletRequest req) {
return SiteMapIndexServlet.truncateToSecond(lastModified);
return SiteMapIndexServlet.truncateToSecond(LAST_MODIFIED);
}

@Override
Expand Down

0 comments on commit 95e6b5c

Please sign in to comment.