In the project I'm working on I found a strange code:
public enum Service {
...
private static final Service[] values = values();
public static Service[] getValues() {return values;}
}
Do you have any idea why implementer added his custom method instead of using values() method everywhere? I know, values() method is generated in compile-time, does it affect anything?