Commit 863691e7 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Daniel Goerz
Browse files

[TASK] Mark TypeConverterException final

Class \TYPO3\CMS\Form\Mvc\Property\Exception\TypeConverterException
provides a factory method fromError to instantiate new instance of
itself. It's done via new static(...) which is unsafe if the class
is not final as the implementation cannot know if constructors of
sub classes have the same method signature like itself.

One solution to this issue is to make a class final, another is to
use new self() instead of new static(). In this case, the class is
made final as this is a very specific Exception already and unlikely
to be extended.

Releases: master
Resolves: #90401
Change-Id: I4f1127cc423cb1c865b8f422a3047ad5888d00f4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63275


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Tested-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Stefan Froemken's avatarStefan Froemken <froemken@gmail.com>
Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Reviewed-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
parent acb12f21
......@@ -19,7 +19,7 @@ use TYPO3\CMS\Extbase\Error\Error;
/**
* A "Type Converter" Exception
*/
class TypeConverterException extends \TYPO3\CMS\Extbase\Property\Exception\TypeConverterException
final class TypeConverterException extends \TYPO3\CMS\Extbase\Property\Exception\TypeConverterException
{
/**
* @var Error
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment