mirror of
https://github.com/twitter/the-algorithm.git
synced 2025-01-05 09:01:54 +01:00
posible polynomial runtime due to backtracking
This commit is contained in:
parent
ec83d01dca
commit
8117b5adbd
@ -200,10 +200,10 @@ public class FeatureUpdateController implements FeatureUpdateService.ServiceIfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<PenguinVersion> getPenguinVersions(String penguinVersionsStr) {
|
private List<PenguinVersion> getPenguinVersions(String penguinVersionsStr) {
|
||||||
String[] tokens = penguinVersionsStr.split("\\s*,\\s*");
|
String[] tokens = penguinVersionsStr.split(",");
|
||||||
List<PenguinVersion> listOfPenguinVersions = Lists.newArrayListWithCapacity(tokens.length);
|
List<PenguinVersion> listOfPenguinVersions = Lists.newArrayListWithCapacity(tokens.length);
|
||||||
for (String token : tokens) {
|
for (String token : tokens) {
|
||||||
listOfPenguinVersions.add(PenguinVersion.valueOf(token.toUpperCase()));
|
listOfPenguinVersions.add(PenguinVersion.valueOf(token.trim().toUpperCase()));
|
||||||
}
|
}
|
||||||
LOG.info(String.format("Using Penguin Versions: %s", listOfPenguinVersions));
|
LOG.info(String.format("Using Penguin Versions: %s", listOfPenguinVersions));
|
||||||
return listOfPenguinVersions;
|
return listOfPenguinVersions;
|
||||||
|
Loading…
Reference in New Issue
Block a user