@Test public void noTransformationTest() { junitExpectedException.expect(SvgProcessingException.class); junitExpectedException.expectMessage(SvgLogMessageConstant.INVALID_TRANSFORM_DECLARATION); TransformUtils.parseTransform("Lorem ipsum"); }
public static AffineTransform parseTransform(String transform) { if (transform == null) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_NULL); } if (transform.isEmpty()) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_EMPTY); } AffineTransform matrix = new AffineTransform(); List<String> listWithTransformations = splitString(transform); for (String transformation : listWithTransformations) { AffineTransform newMatrix = transformationStringToMatrix(transformation); if (newMatrix != null) { matrix.concatenate(newMatrix); } } return matrix; }
TransformUtils { public static AffineTransform parseTransform(String transform) { if (transform == null) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_NULL); } if (transform.isEmpty()) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_EMPTY); } AffineTransform matrix = new AffineTransform(); List<String> listWithTransformations = splitString(transform); for (String transformation : listWithTransformations) { AffineTransform newMatrix = transformationStringToMatrix(transformation); if (newMatrix != null) { matrix.concatenate(newMatrix); } } return matrix; } }
TransformUtils { public static AffineTransform parseTransform(String transform) { if (transform == null) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_NULL); } if (transform.isEmpty()) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_EMPTY); } AffineTransform matrix = new AffineTransform(); List<String> listWithTransformations = splitString(transform); for (String transformation : listWithTransformations) { AffineTransform newMatrix = transformationStringToMatrix(transformation); if (newMatrix != null) { matrix.concatenate(newMatrix); } } return matrix; } private  TransformUtils(); }
TransformUtils { public static AffineTransform parseTransform(String transform) { if (transform == null) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_NULL); } if (transform.isEmpty()) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_EMPTY); } AffineTransform matrix = new AffineTransform(); List<String> listWithTransformations = splitString(transform); for (String transformation : listWithTransformations) { AffineTransform newMatrix = transformationStringToMatrix(transformation); if (newMatrix != null) { matrix.concatenate(newMatrix); } } return matrix; } private  TransformUtils(); static AffineTransform parseTransform(String transform); }
TransformUtils { public static AffineTransform parseTransform(String transform) { if (transform == null) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_NULL); } if (transform.isEmpty()) { throw new SvgProcessingException(SvgLogMessageConstant.TRANSFORM_EMPTY); } AffineTransform matrix = new AffineTransform(); List<String> listWithTransformations = splitString(transform); for (String transformation : listWithTransformations) { AffineTransform newMatrix = transformationStringToMatrix(transformation); if (newMatrix != null) { matrix.concatenate(newMatrix); } } return matrix; } private  TransformUtils(); static AffineTransform parseTransform(String transform);  }