Skip to content

Commit

Permalink
Use ArrayList instead of String[] so that if we access non-existing i…
Browse files Browse the repository at this point in the history
…ndices via array[123] we'll get null instead of an ArrayIndexOutOfBoundsException

@see https://www.filebot.net/forums/viewtopic.php?f=11&p=23683#p23683
  • Loading branch information
rednoah committed Oct 9, 2016
1 parent cea9e7e commit 89441cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions amc.groovy
Expand Up @@ -33,10 +33,10 @@ def extractFolder = tryQuietly{ extractFolder.toString() }
def skipExtract = tryQuietly{ skipExtract.toBoolean() }
def deleteAfterExtract = tryQuietly{ deleteAfterExtract.toBoolean() }
def excludeList = tryQuietly{ (excludeList as File).isAbsolute() ? (excludeList as File) : new File(outputFolder, excludeList as String).getCanonicalFile() }
def myepisodes = tryQuietly{ myepisodes.split(':', 2) }
def gmail = tryQuietly{ gmail.split(':', 2) }
def mail = tryQuietly{ mail.split(':', 5) }
def pushover = tryQuietly{ pushover.split(':', 2) }
def myepisodes = tryQuietly{ myepisodes.split(':', 2) as List }
def gmail = tryQuietly{ gmail.split(':', 2) as List }
def mail = tryQuietly{ mail.split(':', 5) as List }
def pushover = tryQuietly{ pushover.split(':', 2) as List }
def pushbullet = tryQuietly{ pushbullet.toString() }
def storeReport = tryQuietly{ storeReport.toBoolean() }
def reportError = tryQuietly{ reportError.toBoolean() }
Expand Down

0 comments on commit 89441cd

Please sign in to comment.