Mergesorting a stack in Java
Not too many things to remark.

I'll review regarding this assumption : Stack is to be viewed as a Stack datastructure, only peek, pop, push, size and isEmpty are to be used. The fact that java.util.Stack is also a List is not to be exploited.


The sort() methods structure falls into three cases size is 1, size is 2, and size is greater than 2. It would help readability to extract the second and third case as separate methods :

public static &lt;E extends Comparable&lt;? super E&gt;&gt; void sort(final Stack&lt;E&gt; stack) {
    if (stack.size() &lt; 2) {
        // Trivially sorted.
        return;
    }

    if (stack.size() == 2) {
        sortSize2Stack(stack);
        return;
    }

    sortLargerStack(stack);
}

For the size two stack case you can avoid popping the second element if it's greater than the first.
These variables are used only once each :

final int size = stack.size();
final int auxStackLength = size / 2;


They should be inlined.
Help from the java libraries could be avoided here by rolling your own reverse method (I guess it just fell outside the focus of the exercise for you)

Collections.&lt;E&gt;reverse(aux1);
Collections.&lt;E&gt;reverse(aux2);

You could merge in reverse order, and call reverse only once, on the merged stack. To me that seems more readable, but it's a judgement call I guess.