Код: Выделить всё
private void ...(){
HierarchyForm hForm = (HierarchyForm)
Integer id = hForm.getId();
if (id != null && id.intValue() > 0){
Подробнее здесь: [url]https://stackoverflow.com/questions/21911511/java-exception-when-checking-if-integer-value-is-null[/url]
Мобильная версия