Posts

Fixing scala error: bad symbolic reference

If you write Scala code, you’re almost guaranteed to end up with incompatible class files somewhere in the chain. This is particularly irritating when it happens within libraries you don’t control, because the scala compiler apparently decides not to give you any useful information, like so: [error] bad symbolic reference. A signature in DefaultWrites.class refers […]

Scala: match on value

IF you want to match on a value in Scala you can do so simply. Here, I’m using it to handle commands from RabbitMQ in this format: index,garysieling.com update,garysieling.com,12345 Here is the code: val items = message.split(",") val command = items(0);   command match { case "index" => { val domain = items(1) … } […]