Skip to content

Throwable created but not thrown #129

@jens-kaiser

Description

@jens-kaiser

The code still contains concepts that were used long before Java 8 in many places. Some of these can or should now be replaced by other constructs.

Some classes (AbstractSVGLengthList, AbstractSVGNumberList, AbstractSVGPathSegList, ...) use create methods for throwables but miss to throw them.

@Override
protected void checkItemType(Object newItem) throws SVGException {
  if (!(newItem instanceof SVGLength)) {
    createSVGException(SVGException.SVG_WRONG_TYPE_ERR, "expected.length", null);
  }
}

However, throwing throwables can now lead to a completely different behavior of the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions