Skip to content

Commit dadb5b3

Browse files
committed
C#: avoid call to Location::toString() in cs/expose-implementation
1 parent 79b3a8c commit dadb5b3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

csharp/ql/src/Bad Practices/Implementation Hiding/ExposeRepresentation.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ where
7878
exposesByStore(c, f, why, whyText)
7979
select c,
8080
"'" + c.getName() + "' exposes the internal representation stored in field '" + f.getName() +
81-
"'. The value may be modified $@.", why.getLocation(), whyText
81+
"'. The value may be modified $@.", why, whyText
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| ExposeRepresentation.cs:8:21:8:23 | Set | 'Set' exposes the internal representation stored in field 'rarray'. The value may be modified $@. | ExposeRepresentation.cs:16:9:16:9 | ExposeRepresentation.cs:16:9:16:9 | through the variable a |
2-
| ExposeRepresentationBad.cs:18:22:18:24 | Get | 'Get' exposes the internal representation stored in field 'rarray'. The value may be modified $@. | ExposeRepresentationBad.cs:24:23:24:29 | ExposeRepresentationBad.cs:24:23:24:29 | after this call to Get |
1+
| ExposeRepresentation.cs:8:21:8:23 | Set | 'Set' exposes the internal representation stored in field 'rarray'. The value may be modified $@. | ExposeRepresentation.cs:16:9:16:9 | access to local variable a | through the variable a |
2+
| ExposeRepresentationBad.cs:18:22:18:24 | Get | 'Get' exposes the internal representation stored in field 'rarray'. The value may be modified $@. | ExposeRepresentationBad.cs:24:23:24:29 | call to method Get | after this call to Get |

0 commit comments

Comments
 (0)