mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
testdata for IDEA-133935
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import static java.util.stream.Collectors.joining;
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
class X {
|
||||
public static Map<String, String> dumpCurrentRequestHttpHeaders(HttpServletRequest req) {
|
||||
if (req == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return req.getHeaderNames().stream().collect(toMap((String headerName) -> headerName,
|
||||
(String headerName) -> req.getHeaders(headerName).stream().collect(joining(", ")), (String s1, String s2) -> s1 + ", " + s2,
|
||||
TreeMap::new));
|
||||
}
|
||||
|
||||
interface HttpServletRequest {
|
||||
List<String> getHeaderNames();
|
||||
List<String> getHeaders(String header);
|
||||
}
|
||||
}
|
||||
@@ -366,6 +366,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testIDEA133935() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user