Commit 9b8f817
Use if-else instead of switch case in
Motivation:
`switch` cases are efficient when there are quite a few branches compared to `if-else`. Since we are only using 1 case, it's best to use the `if-else` condition.
Modification:
Changed `switch` to `if-else`
Result:
Efficient codeMacAddressUtil#bestAvailableMac (netty#12375)1 parent b18f791 commit 9b8f817
File tree
1 file changed
+10
-11
lines changed- common/src/main/java/io/netty/util/internal
1 file changed
+10
-11
lines changedLines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
0 commit comments