Skip to content

Commit

Permalink
vipshop#10 FormatUtils的PR小修改,代码可读性重要。
Browse files Browse the repository at this point in the history
  • Loading branch information
calvin1978 committed Jun 5, 2018
1 parent 458dd80 commit 1474afc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

public class FormatUtils {

private static final long BYTE_UNIT_KILO = 1L << 10;
private static final long BYTE_UNIT_MEGA = 1L << 20;
private static final long BYTE_UNIT_GIGA = 1L << 30;
private static final long BYTE_UNIT_TERA = 1L << 40;
private static final long BYTE_UNIT_KILO = 1024;
private static final long BYTE_UNIT_MEGA = BYTE_UNIT_KILO * 1024;
private static final long BYTE_UNIT_GIGA = BYTE_UNIT_MEGA * 1024;
private static final long BYTE_UNIT_TERA = BYTE_UNIT_GIGA * 1024;


public static String toFloatUnit(long size) {
Expand Down

0 comments on commit 1474afc

Please sign in to comment.