[
https://issues.apache.org/jira/browse/WICKET-3713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033588#comment-13033588
]
Richard Emberson commented on WICKET-3713:
------------------------------------------
Also, why not move the splitting of the notAllowed into the notAllowedList out
of the
matches method:
String[] notAllowedList = Strings.split(notAllowed, ',');
and into the constructor so that it splits only once rather than each time the
matches
method is called.
> g/apache/wicket/protocol/http/request/UserAgent matches method is not correct
> -----------------------------------------------------------------------------
>
> Key: WICKET-3713
> URL: https://issues.apache.org/jira/browse/WICKET-3713
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC4
> Environment: all
> Reporter: Richard Emberson
> Priority: Minor
>
> In the UserAgent Enum matches method, the loop over detectionStrings is at
> most executed once:
> for (List<String> detectionGroup : detectionStrings)
> {
> for (String detectionString : detectionGroup)
> {
> if (!userAgent.contains(detectionString))
> {
> return false;
> }
> }
> return true;
> }
> It returns true after only processing the first element in the
> detectionStrings list.
> It never looks at any of the other elements of the list.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira