oza/fluent-logger-scala — pull request #3 by xuwei-k (2012-11-16 06:48:52+00:00)
Title: Fix unsupported operation exception bug

このtree

ef10b409ea2ad82873f7476a4b268d5e57817e64

の状態でtestすると以下のようなエラーがでます

```
[info] - test normal 1 *** FAILED ***
[info] java.lang.UnsupportedOperationException:
[info] at java.util.AbstractMap.put(AbstractMap.java:186)
[info] at org.fluentd.logger.scala.FluentLogger.log(FluentLogger.scala:17)
[info] at org.fluentd.logger.scala.FluentLogger.log(FluentLogger.scala:12)
[info] at org.fluentd.logger.scala.FluentLoggerSuite$$anonfun$1.apply$mcV$sp(FluentLoggerSuite.scala:46)
[info] at org.fluentd.logger.scala.FluentLoggerSuite$$anonfun$1.apply(FluentLoggerSuite.scala:32)
[info] at org.fluentd.logger.scala.FluentLoggerSuite$$anonfun$1.apply(FluentLoggerSuite.scala:32)
[info] at org.scalatest.FunSuite$$anon$1.apply(FunSuite.scala:1265)
[info] at org.scalatest.Suite$class.withFixture(Suite.scala:1974)
[info] at org.fluentd.logger.scala.FluentLoggerSuite.withFixture(FluentLoggerSuite.scala:29)
[info] at org.scalatest.FunSuite$class.invokeWithFixture$1(FunSuite.scala:1262)
```

ここ

https://github.com/oza/fluent-logger-scala/blob/4915e4e34e1a94af92623db24c7cf27c26a4297a/src/main/scala/org/fluentd/logger/scala/FluentLogger.scala#L16-L18

で、まず scala の immutable な `Map` に対して `put` を呼ぶ => つまり `java.util.Map` に暗黙変換して、そのメソッドを呼んでますが、 scalaのimmutableな `Map` から `java.util.Map` に暗黙変換しても、型が`java.util.Map` になっただけで実態はimmutableなので、これでは **必ず** `UnsupportedOperationException` がでます。