##Some minors things
Some minors things
You variables names do not always follow conventions.
private static final DatacenterEnum ourlocation = compareLocation();
Should be ourLocation
. You need to capitalize the first letter of each word in your varaible name.
} catch (UnknownHostException e) { // log an exception }
Well you're not logging anything right now, so either you do it or you remove the comment (Nothing to worry, I just hate comments).
It's weird to me to have the get method of a variable before the declaration of the variable.
public static DatacenterEnum getOurlocation() { return ourlocation; }
I read a class like a book, so when I encounter something like that I always need to stop my flow, find the variable to see is it a private variable, is someone went crazy and it's from another class. The thing is it's not in order.
I don't understand this method :
public static String forCode(int code) { return (code >= 0 && code < values().length) ? values()[code].name() : null; }
What it's suppose to do ? Get the name of the server or the enum ?
##Some minors things
You variables names do not always follow conventions.
private static final DatacenterEnum ourlocation = compareLocation();
Should be ourLocation
. You need to capitalize the first letter of each word in your varaible name.
} catch (UnknownHostException e) { // log an exception }
Well you're not logging anything right now, so either you do it or you remove the comment (Nothing to worry, I just hate comments).
It's weird to me to have the get method of a variable before the declaration of the variable.
public static DatacenterEnum getOurlocation() { return ourlocation; }
I read a class like a book, so when I encounter something like that I always need to stop my flow, find the variable to see is it a private variable, is someone went crazy and it's from another class. The thing is it's not in order.
I don't understand this method :
public static String forCode(int code) { return (code >= 0 && code < values().length) ? values()[code].name() : null; }
What it's suppose to do ? Get the name of the server or the enum ?
Some minors things
You variables names do not always follow conventions.
private static final DatacenterEnum ourlocation = compareLocation();
Should be ourLocation
. You need to capitalize the first letter of each word in your varaible name.
} catch (UnknownHostException e) { // log an exception }
Well you're not logging anything right now, so either you do it or you remove the comment (Nothing to worry, I just hate comments).
It's weird to me to have the get method of a variable before the declaration of the variable.
public static DatacenterEnum getOurlocation() { return ourlocation; }
I read a class like a book, so when I encounter something like that I always need to stop my flow, find the variable to see is it a private variable, is someone went crazy and it's from another class. The thing is it's not in order.
I don't understand this method :
public static String forCode(int code) { return (code >= 0 && code < values().length) ? values()[code].name() : null; }
What it's suppose to do ? Get the name of the server or the enum ?
##Some minors things
You variables names do not always follow conventions.
private static final DatacenterEnum ourlocation = compareLocation();
Should be ourLocation
. You need to capitalize the first letter of each word in your varaible name.
} catch (UnknownHostException e) { // log an exception }
Well you're not logging anything right now, so either you do it or you remove the comment (Nothing to worry, I just hate comments).
It's weird to me to have the get method of a variable before the declaration of the variable.
public static DatacenterEnum getOurlocation() { return ourlocation; }
I read a class like a book, so when I encounter something like that I always need to stop my flow, find the variable to see is it a private variable, is someone went crazy and it's from another class. The thing is it's not in order.
I don't understand this method :
public static String forCode(int code) { return (code >= 0 && code < values().length) ? values()[code].name() : null; }
What it's suppose to do ? Get the name of the server or the enum ?