4 ms·
They're aiming for compatibility with Java 1.4, which doesn't have varargs. In java 1.5 you could just write public static Object[] createArray(Object... ar
by akronim 16y ago
They're aiming for compatibility with Java 1.4, which doesn't have varargs. In java 1.5 you could just write
public static Object[] createArray(Object... args) {
return args;
}
- abp 16y agoSo just another missing line of essential commentary?
- zmmmmm 16y agoI remember discovering this and deciding to eliminate it as part of an effort to compress the groovy jar file a bit more (long story, but basically I was running some Groovy in an applet, every byte counts). I thought I'd found a jackpot and that killing this class would surely eliminate a nice chunk of byte code. To my amazement it makes almost no difference. With pack200 the redundancy of all these methods is totally stripped out. It took me an hour or so of work and I think it made less than 200 bytes difference in the end.