testdata for IDEA-133935

This commit is contained in:
Anna Kozlova
2015-02-13 19:12:21 +01:00
parent 5522152407
commit 36b066ea54
2 changed files with 28 additions and 0 deletions

View File

@@ -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);
}
}

View File

@@ -366,6 +366,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testIDEA133935() throws Exception {
doTest();
}
private void doTest() {
doTest(false);
}