Skip to content

Commit 6be4b3b

Browse files
authored
Merge pull request github#6725 from emilejq/date-format
Java: Remove requirements for final and access mods from DateFormatThreadUnsafe
2 parents f14e3f6 + 83fb41e commit 6be4b3b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

java/ql/src/Likely Bugs/Concurrency/DateFormatThreadUnsafe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class DateFormattingThread implements Runnable {
2-
private static DateFormat dateF = new SimpleDateFormat("yyyyMMdd"); // Static field declared
2+
public static DateFormat dateF = new SimpleDateFormat("yyyyMMdd"); // Static field declared
33

44
public void run() {
55
for(int i=0; i < 10; i++){

java/ql/src/Likely Bugs/Concurrency/DateFormatThreadUnsafe.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import java
1616
from Field f, Class dateFormat
1717
where
1818
f.isStatic() and
19-
f.isFinal() and
2019
(f.isPublic() or f.isProtected()) and
2120
dateFormat.hasQualifiedName("java.text", "DateFormat") and
2221
f.getType().(RefType).hasSupertype*(dateFormat) and

0 commit comments

Comments
 (0)