Skip to content
Snippets Groups Projects
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: default avatarSusanne Moog <look@susi.dev>
Tested-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: default avatarStefan Froemken <froemken@gmail.com>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
parent acb12f21
Branches
Tags
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