-
-
Save anonymous/1343b1745c030a047fe35c390384bf2e to your computer and use it in GitHub Desktop.
write a test for this?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* private method to convert a string to an array | |
* | |
* @return boolean | |
*/ | |
private String [] mailToToArray(){ | |
List<String> mailToList = new ArrayList<String>(); | |
try(Scanner emailScanner = new Scanner(mailTo) ){ | |
emailScanner.useDelimiter(":"); | |
while ( emailScanner.hasNext() ){ | |
mailToList.add(emailScanner.next()); | |
} | |
} | |
return mailToList.toArray(new String[mailToList.size()]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment