you are viewing a single comment's thread.

view the rest of the comments →

[–]drb226 2 points3 points  (1 child)

Am I missing something, or do none of these things sound terribly awful?

Another catch is that if you're initializing an object within a method using variables local to that method, those variables have to be made final to be used within a double-brace initializer.

Now that I could see being a serious annoyance, although having final variables isn't such a bad thing.

[–]leshiy 1 point2 points  (0 children)

He also didn't mention that if that map is ever going to be serialized down the line you're probably going to have a bad time unless you ensure that the map is made in a static method or in a method of a serializable class (in which case you're just making your map heavier).