Cleanup: Use foreach whenever is possible
This commit is contained in:
committed by
Laurent Clouet
parent
c6dafb3bf6
commit
3ea4107dc1
@@ -82,9 +82,9 @@ public class Error {
|
||||
|
||||
public static ServerCode fromInt(int val) {
|
||||
ServerCode[] As = ServerCode.values();
|
||||
for (int i = 0; i < As.length; i++) {
|
||||
if (As[i].getValue() == val) {
|
||||
return As[i];
|
||||
for (ServerCode A : As) {
|
||||
if (A.getValue() == val) {
|
||||
return A;
|
||||
}
|
||||
}
|
||||
return ServerCode.UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user