Skip to content

Commit 6287e0d

Browse files
Update deprecated-classes.md
1 parent 87806be commit 6287e0d

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

docs/checks/deprecated-classes.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,22 @@ You can check the list of supported objects in the `constructor` of the `y_check
1212

1313
### How does the check work?
1414

15-
This check searches for the usage of deprecated classes.
15+
This check searches for the usage of deprecated classes. For instance:
16+
```abap
17+
DATA aunit TYPE REF TO cl_aunit_assert.
18+
```
1619

1720
### How to solve the issue?
1821

19-
Use the newer objects instead.
22+
Reference non deprecated newer objects instead. For the above example, a corrected code would look like:
23+
```abap
24+
DATA aunit TYPE REF TO cl_abap_unit_assert.
25+
```
2026

2127
### What to do in case of exception?
2228

23-
You can suppress Code Inspector findings generated by this check using the pseudo comment `"#EC DEPRECATED_CLAS`.
24-
The pseudo comment must be placed right after the statement.
25-
26-
Before the check:
29+
In very special and restricted cases (e.g.: Keep release compatibility on downports), you can suppress Code Inspector findings generated by this check using the pseudo comment `"#EC DEPRECATED_CLAS`. The pseudo comment must be placed right after the statement:
2730
```abap
28-
DATA aunit TYPE REF TO cl_aunit_assert.
31+
DATA aunit TYPE REF TO cl_aunit_assert. "#EC DEPRECATED_CLAS`
2932
```
3033

31-
After the check:
32-
```abap
33-
DATA aunit TYPE REF TO cl_abap_unit_assert.
34-
```

0 commit comments

Comments
 (0)