-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Mark,
On 6/26/19 03:37, Mark Thomas wrote: >> Mark, >> >> On 6/24/19 05:58, ma...@apache.org wrote: >>> This is an automated email from the ASF dual-hosted git >>> repository. >> >>> markt pushed a commit to branch 8.5.x in repository >>> https://gitbox.apache.org/repos/asf/tomcat.git >> >>> commit 4ec3d26396e4d8804629d31fa2459eb1401bcf44 Author: Mark >>> Thomas <ma...@apache.org> AuthorDate: Mon Jun 24 10:54:54 2019 >>> +0100 >> >>> Back-port spotbugs fixes --- >>> java/org/apache/catalina/servlets/WebdavServlet.java | 12 >>> ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) >> >>> diff --git >>> a/java/org/apache/catalina/servlets/WebdavServlet.java >>> b/java/org/apache/catalina/servlets/WebdavServlet.java index >>> 5ce1678..1ad0f97 100644 --- >>> a/java/org/apache/catalina/servlets/WebdavServlet.java +++ >>> b/java/org/apache/catalina/servlets/WebdavServlet.java @@ >>> -18,6 +18,7 @@ package org.apache.catalina.servlets; >> >>> import java.io.IOException; import java.io.InputStream; >>> +import java.io.Serializable; import java.io.StringReader; >>> import java.io.StringWriter; import java.io.Writer; @@ -909,7 >>> +910,7 @@ public class WebdavServlet extends DefaultServlet { >>> return; } >> >>> - LockInfo lock = new LockInfo(); + LockInfo lock >>> = new LockInfo(maxDepth); >> >>> // Parsing lock request >> >>> @@ -2357,11 +2358,18 @@ public class WebdavServlet extends >>> DefaultServlet { /** * Holds a lock information. */ - >>> private class LockInfo { + private static class LockInfo >>> implements Serializable { + + private static final long >>> serialVersionUID = 1L; >> >> Shouldn't this be something more random? > > No. > > Since we are marking the class Serializable then we get to choose > the ID. Best practise is to start at 1 and increment whenever an > incompatible change is made. *shrug* Ok >>> + + public LockInfo(int maxDepth) { + this.maxDepth = >>> maxDepth; + } >> >> The "maxDepth" member does not seem to be used. Is this part of >> a separate commit? > > No. > > This one confused me for a while. Prior to the patch maxDepth was > a field in WebdavServlet. (It still is after the patch.) LockInfo > accessed that field directly. > > The patch makes LockInfo static so the maxDepth field in > WebdavServlet was no longer visible. The patch adds a maxDepth > field to LockInfo and sets it in the constructor from > WebdavServlet#maxDepth. > > The code the reads maxDepth is unchanged. It now reads the field > from LockInfo rather than WebdavServlet. Aha, thanks for the explanation. - -chris -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0TqksACgkQHPApP6U8 pFhzsw/9GagZFDC6pFK78eul5b5pftoSrWCb4TQmwyKOIYd0Ad1CxwXETfbsiNzO 7TwG+1gpWhfSIPNmHkjle/3hkHMjydMsAnUkam9oC/o52rBpn5vrqleGaSKlUmm8 bm1JeZcZiSJUDxjvhnq3HxhPRqmJiBB+BuRY1B6+G2tJOZSTa0Ru9b1SUqgbBaH4 tVELvUYjjL/UCjB59ARSA6fxzSGA3XSWA+A0Supb9HV3T/PWnb9fuH7sCDX22rtQ 2XKt+1Iwp2BPp54tYsq7HSrsUfc2firGBfB2WwjjCjpAkMJ308VPiwSF/ay8m/Iq jFjaAmxKSdh4jy3rBSG+Ex9HbMZdSC5eE/jw6TsvVC08m46UbZi5/iPVQYoIkm8g hYiUCTocTHpi5VsRxFVAEEa8DtSIbbh7iluJOA5gKUYF6z9BQ5wEaz/fcQe/wrjq dImORgwIJ5dr6GMn8vaD68mx2zO+dEiTmTkpM40KYPR+TdWeAiZGyMedgYPOHl0F zVxJjlLGHZ9FfPIEOVTmVt82Pvv7UkeCNZYMcHYPEjd7xkNDbuRlIlNgagahva7y 8LT6dYuXZ5JXVB8g4gzNPJt0J4Bf1h+bcSYyXJcysTMNTIfWHhCRUtZqBHu6bVGt M6+3vkxAYO6KkAA10WUK/2cR2FB4FVMD7EtC8lkUJzHrP4s3sts= =cvg7 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org