Mercurial Hosting > luan
diff src/org/eclipse/jetty/util/resource/Resource.java @ 827:f89abbfb3a8f
remove Resource.getWeakETag()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 15 Sep 2016 16:21:56 -0600 |
parents | 7fb7c1915788 |
children | 7c737c376bc3 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/util/resource/Resource.java Wed Sep 14 18:51:34 2016 -0600 +++ b/src/org/eclipse/jetty/util/resource/Resource.java Thu Sep 15 16:21:56 2016 -0600 @@ -31,7 +31,6 @@ import java.util.Arrays; import java.util.Date; -import java.util.Base64; import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.Loader; import org.eclipse.jetty.util.StringUtil; @@ -641,24 +640,6 @@ } /* ------------------------------------------------------------ */ - public String getWeakETag() - { - StringBuilder b = new StringBuilder(32); - b.append("W/\""); - - long lhash = lastModified() ^ getName().hashCode() ^ length(); - byte[] a = new byte[Long.BYTES]; - for( int i=0; i<a.length; i++ ) { - a[i] = (byte)lhash; - lhash >>= 8; - } - b.append( Base64.getEncoder().encodeToString(a) ); - - b.append('"'); - return b.toString(); - } - - /* ------------------------------------------------------------ */ /** Generate a properly encoded URL from a {@link File} instance. * @param file Target file. * @return URL of the target file.