code: protected boolean sortResources() {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "sortResources", _resourceObjects.toArray());
  
          if (!_sorted) {
              final int resourceCount = _resourceObjects.size();
  
              if (_gotPriorityResourcesEnlisted) {
                  if (resourceCount > 1)
                      Collections.sort(_resourceObjects, this);
              }
              _sorted = true;
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "sortResources", _resourceObjects.toArray());
          return false;
      }
docs: Shuffle commitInLastPhase resources to the end of the list preserving their ordering
  or reorder resources based on commitPriority in descending order for commit phase.