Github user heytitle commented on the pull request: https://github.com/apache/flink/commit/9016cce503b4d471b5a49f0abccc196945ada97e#commitcomment-24529391 In flink-runtime/src/main/java/org/apache/flink/runtime/codegeneration/SorterFactory.java: In flink-runtime/src/main/java/org/apache/flink/runtime/codegeneration/SorterFactory.java on line 188: Can we simplify it to the code below? ``` Class generatedClass = null WeakReference<Class> fromCache = generatedClassCache.getOrDefault(cacheKey, null); generatedClass = fromCache != null ? fromCache.get() : null; if ( genenetedClass == null ) { // cache miss ... } ``` So, we don't need to introduce `cacheHit` variable.
---