Hello Core Libs Dev team,

I would like to propose a patch [1] that applies pattern matching for 'instanceof' (JEP-394) and 'switch-case' (JEP-433) on java.base. I suppose this enchantment will improve readability and reduce the code redundancy in cases of casts after 'inctanceof' checking.
For better reviewing this improvement can be split into 4 tasks 1 for each package: java [2], javax [3], sun [4] and com.sun.crypto [5].

Please share your thoughts on whether such an improvement might be applied.

Thank you for your help!
 
Best regards,
Felix Desyatirikov

[1] https://github.com/openjdk/jdk/commit/fbc562aa0ae1a47040f885f7da495ec8856ad179
[2] https://github.com/openjdk/jdk/commit/11dbf7144265ad35ff3c73bd87b9e8dcc95ba2ab
[3] https://github.com/openjdk/jdk/commit/a554dccc5d5428673a5398b43f7d9d03b2ae3273
[4] https://github.com/openjdk/jdk/commit/957546a0668f64e69375408c63e4cb5376740e8b
[5] https://github.com/openjdk/jdk/commit/0003f0898874f3458b455caaedcf949ac69ce248

Reply via email to