use constants

Signed-off-by: Raymond Auge <raymond.auge@liferay.com>
don't strip unless needed

Signed-off-by: Raymond Auge <raymond.auge@liferay.com>
propagate status if no handler

Signed-off-by: Raymond Auge <raymond.auge@liferay.com>