added javadoc
fixed a bug where boolean constant comparison would fail because of case