WebTarget w0 = webTarget;
WebTarget w1 = webTarget.queryParam("throwException", true);
WebTarget w2 = webTarget.path(path);
System.out.println(w0.getClass());
if (w0 == w1) {
int x = 10;
x = 20;
}
if (w1 == w2) {
int x = 10;
x = 20;
}
所有这些都将永远不会进入。webtarget总是返回新对象。这真的很奇怪。为什么它不返回这个引用?
暂无答案!
目前还没有任何答案,快来回答吧!