- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    8, 9, 10
- 
        b01
                    As part of analysis of JDK-8187936, some problems/cleanup tasks have been identified in VariableHeightLayoutCache.java:
1. Line 927: Uninitialized variables, checking for trivial reject case multiple times.
2. Line 999: Traditional code written to find maximum size of components, which can be done without any local variables and explicit looping with streams.
3. Line 1365: Code repetition for differenct conditions, which can be ored together to reduce the repetition.
4. Line 1482: A large code block gets repeated only because of different values need to be passed in one line. This can be moved to a variable initialization, and the repeating code blocks can be reduced to one.
5. Line 1505: Variable initialization can be simplified by combining different conditions.
6. Line 1540: An explicit loop to apply a function over a collection, can be achieved in one line by a forEach construct.
7. Line 1747: Combine all the trivial reject cases into one condition, and also, a potential bug which increments the "nextIndex" value beyond the length of the containing elements. The increment should happen only if the trivial reject case fails.
1. Line 927: Uninitialized variables, checking for trivial reject case multiple times.
2. Line 999: Traditional code written to find maximum size of components, which can be done without any local variables and explicit looping with streams.
3. Line 1365: Code repetition for differenct conditions, which can be ored together to reduce the repetition.
4. Line 1482: A large code block gets repeated only because of different values need to be passed in one line. This can be moved to a variable initialization, and the repeating code blocks can be reduced to one.
5. Line 1505: Variable initialization can be simplified by combining different conditions.
6. Line 1540: An explicit loop to apply a function over a collection, can be achieved in one line by a forEach construct.
7. Line 1747: Combine all the trivial reject cases into one condition, and also, a potential bug which increments the "nextIndex" value beyond the length of the containing elements. The increment should happen only if the trivial reject case fails.
- relates to
- 
                    JDK-8187936 Automatically selecting a new JTree node in a model listener can cause unusual behavior. -           
- Resolved
 
-