Skip to content
Snippets Groups Projects
Commit d2617456 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Prevent NoSuchElementException at mount parsing

parent 2f602fbf
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ public class AndroidDevices {
final StringTokenizer tokens = new StringTokenizer(line, " ");
final String device = tokens.nextToken();
final String mountpoint = tokens.nextToken();
final String type = tokens.nextToken();
final String type = tokens.hasMoreTokens() ? tokens.nextToken() : null;
// skip if already in list or if type/mountpoint is blacklisted
if (list.contains(mountpoint) || typeBL.contains(type) || Strings.startsWith(mountBL, mountpoint))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment