Skip to content

Commit c67c7f2

Browse files
committed
update comment
1 parent 81aaf3b commit c67c7f2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

connector/src/main/java/io/questdb/kafka/TimestampParserCompiler.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
class TimestampParserCompiler {
88
private static TimestampFormatCompiler compiler;
99
private static final Object MUTEX = new Object();
10-
// we assume that there will just a few patterns
10+
// we assume that there will just a few patterns hence to issue with unbounded cache growth
1111
private static CharSequenceObjHashMap<DateFormat> cache;
1212

1313
public static DateFormat compilePattern(String timestampPattern) {
1414
synchronized (MUTEX) {
1515
if (compiler == null) {
1616
compiler = new TimestampFormatCompiler();
17-
}
18-
// DateFormat instances are thread-safe, so we can cache them and use for multiple workers
19-
if (cache == null) {
17+
// DateFormat instances are thread-safe, so we can cache them and use for multiple workers
2018
cache = new CharSequenceObjHashMap<>();
2119
}
2220
DateFormat format = cache.get(timestampPattern);

0 commit comments

Comments
 (0)