Role of threading dislocations and point defects in the performance of GaN-based metal-semiconductor-metal ultraviolet photodetectors