JDK-8057916 : Sort includes and verify copyright for new files
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8u40
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-09-09
  • Updated: 2015-06-03
  • Resolved: 2014-09-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u40Fixed 9 b34Fixed
Description
Some of the new files add by refactoring the gc code have introduced includes that are not correctly sorted. The includes should be sorted alphabetically but always with precompiled.hpp first, the other exception is that all includes guarded by defines should be placed after all other includes. For example:
#include "precompiled.hpp"
#include "prims/jni.h"
#include "prims/whitebox.hpp"
#include "utilities/debug.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1AllocationContext.hpp"
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/heapRegion.hpp"
#endif // INCLUDE_ALL_GCS

Some of the new files also need to have the copyright text altered to be correct.
Comments
ILW: I: low -> mostly cosmetic L: high -> always W: high -> none -> P4
09-09-2014