After refactoring of legacy code and start working with generics, I found that functions that looked like this:
T[] splitXXX() {
//blah blah
}
Produces plenty of class cast excpetions, since the jdk doesn't really support arrays of generic types. And I wonder - why is this code compiles cleanly in java? Does it have something to do with backward compatibility? (it would have saved me a lot of investigation time if I could have found this errors at compile time and not at runtime). What am I missing?