From 90bf45a3ba27186d4d0a874fba9bca5501b289ea Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Thu, 12 Jun 2025 11:14:37 +0100 Subject: [PATCH] Fix docs --- .../InitCallsSubclass/InitCallsSubclassMethod.qhelp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.qhelp b/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.qhelp index e729f7b5892..81e16aacd26 100644 --- a/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.qhelp +++ b/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.qhelp @@ -24,16 +24,17 @@ discourage external users of the library from overriding it and observing partia

In the following case, the `__init__` method of `Super` calls the `set_up` method that is overriden by `Sub`. -This results in `Sun.set_up` being called with a partially initialized instance of `Super` which may be unexpected. - -

In the following case, the initialization methods are separate between the superclass and the subclass. +This results in `Sun.set_up` being called with a partially initialized instance of `Super` which may be unexpected.

+ +

In the following case, the initialization methods are separate between the superclass and the subclass.

+
  • CERT Secure Coding: Rule MET05-J. Reference discusses Java but is applicable to object oriented programming in many languages.
  • -
  • StackOverflow: Overridable method calls in constructors.
  • +
  • StackOverflow: Overridable method calls in constructors.