Matrix4d blockTr = null; try { blockTr = Calc.getTransformation(rot[bs], shift[bs]); } catch (IndexOutOfBoundsException e) { blockTr = ident; Matrix4d transformB = Calc.getTransformation(rotB, shiftB); blockSet.setTransformations(Arrays.asList(ident, transformB)); Matrix4d blockTr = null; try { blockTr = Calc.getTransformation(rot[0], shift[0]); } catch (IndexOutOfBoundsException e) { blockTr = ident;