Wisdom tooth or the third molar is the most commonly partially erupted or impacted tooth as it is the last tooth to erupt in the oral cavity or mouth. If there is a cavity in third molar there can be a number of treatment lines. 

1. Filling is the primary line of treatment if the tooth is perfectly erupted or in maintainable condition and cavity is not deep that is involving nerves or pulp.

2. Root canal treatment if the cavity is deep and 2nd molar is missing and 3rd molar is needed to be used as abutment or support in bridge placement for replacement of missing tooth.

3. Extraction if all other teeth are healthy, third molar is not properly erupted, angulated third molars, third molar partly covered with layer of gums, third molars out of proper arch form. 

Although while deciding about the treatment protocol,Clinical judgement and clinicians skills are best in such cases.