[jboss-jira] [JBoss JIRA] (WFLY-7951) Coverity static analysis: Performace optimalization in map iterating

Martin Choma (JIRA) issues at jboss.org
Tue Jan 24 08:24:01 EST 2017


Martin Choma created WFLY-7951:
----------------------------------

             Summary: Coverity static analysis: Performace optimalization in map iterating
                 Key: WFLY-7951
                 URL: https://issues.jboss.org/browse/WFLY-7951
             Project: WildFly
          Issue Type: Bug
          Components: Security
            Reporter: Martin Choma
            Assignee: Darran Lofthouse
            Priority: Minor


Coverity static analysis found iterating over map can be enhanced

https://scan7.coverity.com/reports.htm#v23632/p12664/fileInstanceId=8486751&defectInstanceId=2122705&mergedDefectId=1389593

Instead of Map.keySet() + Map.get() combo use just Map.entrySet().
 
{code:java|title=ElytronHttpExchange#getRequestParameters}
for (String name : queryParameters.keySet()) {
    List<String> values = new ArrayList<>(queryParameters.get(name));
{code}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list