The error is coming from the logInfo, not the map. The map is most likely just fine. The error is attempting to convert the java.util.List (which is what strNames is) to a String.
That should work too but Rules DSL messes with things sometimes. Try explicitly calling toString on strNames in the logInfo.
Now I fooled myself entirely. When writing new rules I always check after each line the result. But a debug info that unnecassarily creates trouble happened to me the first time
Thanks also for you explanation Rich.
EDIT:
The above code is still not working. Just to provide the correct code here, in case somebody else falls into this trap:
You may not declare the lambda variable as a String variable
var strNames = strFileNames.split('\n').map[e | e.split(".jpg").get(0)]