it is illegal, but... I got a ticket for that in nyc (I was drinking a 40 with a brown paper bag around it, talk about ghetto lol). Went to court, and there were about 15 cases just like mine, and the judge dismissed them all because the cops didn't have probable cause to look inside the bag (or inside your coffee cup) in the first place. Now, if you were acting strange or suspicious, that would give them probable cause. So technically, you should be able to get out of it. But a coffee cup with a straw was a little suspicious, and as everyone else said the shore pigs pretty much do whatever the fuck they feel like.