尝试为Web服务器设置ETag时,将EntityTag(由我生成)与IfNoneMatch请求标头进行比较时,出现了StackOverflowError。我是在误解这里的东西还是错误?
import akka.http.javadsl.model.headers.*;
public class EntityTagTest {
public static void main(String[] args){
System.out.println(
"VERSIONS: akka:" + akka.Version.current() +
"; akka-http: " + akka.http.Version.current());
// Output: VERSIONS: akka 2.5.22; akka-http: 10.1.8
boolean isWeak = false;
EntityTag tag = EntityTag.create("foo", isWeak);
EntityTagRange range = EntityTagRange.create(tag);
boolean matches = EntityTag.matchesRange(tag, range, isWeak);
/*
Exception in thread "main" java.lang.StackOverflowError
at akka.http.javadsl.model.headers.EntityTag.matches(EntityTag.java:18)
at akka.http.javadsl.model.headers.EntityTag.matches(EntityTag.java:18)
at akka.http.javadsl.model.headers.EntityTag.matches(EntityTag.java:18)
...
*/
System.out.println(matches);
}
}