The short answer is that it depends on what type of injury you have. A good rule of thumb is to never massage directly onto an injury if not advised to do so. However it can be beneficial to treat near surrounding areas to increase circulation and relive tenses.
It can be a good tool to help relieve some of the negative compensatory effect an injury can entail, but the most important thing to remember is in order to prevent future injurys you need to find the cause the of injury/inflammation. If in contact with a physiotherapist or a doctor, you should advice with him/her.