was环境中自定义编写Filter中出现httpRequest.getAttributeNames()循环遍历死循环现象,无法终止以下循环,
Enumeration newAttributeNames = httpRequest.getAttributeNames();
Map<String,Integer> map = new HashMap<String,Integer>(); List<String> result = new ArrayList<String>(); while (oldAttributeNames .hasMoreElements()) { String attributeName;attributeName = (String) oldAttributeNames .nextElement(); map.put(attributeName, 1); }Enumeration oldAttributeNames = httpRequest.getAttributeNames();
近排查发现是循环前加入了下面语句导致,request.setAttribute(Constants.REDIRECT_FLAG, redirectFlag);原因后期排查。