Let us reassure you about your future trip to Sri Lanka; the country is very safe. As with anywhere else in the world, obviously there are some dishonest people about but in general you won't come across anything more than minor annoyances.
Since the end of the conflict between the Tamil Tigers and the government in 2010, there is no longer any risk involved in planning a trip to Sri Lanka. Nevertheless, even though everything is back to normal at this stage you must not forget that Sri Lanka remains a poor country where petty crime exists alongside high unemployment. The risk of theft therefore exists but it is very rare. Cases of mugging or assault are even more unusual. Pickpockets tend to operate on public transport.
Another annoyance, present especially in towns and tourist sites, arebogus guides and tuk-tuk drivers, who can be quite insistent. Not only are the prices they suggest unreasonable but the abilities of bogus guides are often far from the standard of official guides. The tuk-tuk drivers will try to make you pay a higher price than normal. They will also try to earn commission on top by taking you to their choice of hotel or forcing to to go into certain shops.
Even though since 2010 there is no risk in going anywhere on the island, if you need reassurance you can always check the Foreign &Commonwealth Office website before you leave.
To avoid tempting thieves and pickpockets, it's always better not to look too much like a tourist. Don't display any obvious signs of wealth; bum bags worn around the waist are out, as are cameras worn around the neck. Keep a careful eye on your belongings on public transport, at markets and in other places where there are dense crowds.
In case of any threat, remain as calm as you can. Don't resist and hand over whatever you are asked for. It would be wise not to keep all of your money in the same place. Use multiple hiding places and always keep a sum of money, which might be enough to satisfy your assailant, easily accessible.
Refuse outright offers of bogus guides, always ask for their official card and don't believe them if they pretend to have left it at home. Always be equally firm with tuk-tuk drivers. Haggle over the price and stopin the road but never just in front of your hotel. You will be left to pay extra commission. Likewise, do not believe drivers who claim that your hotel doesn't exist, has closed down or burned down.