Browse Source

Pull request #7844: REPORT-66342 组件复用-设计器里在线组件页面一直显示加载中,日志没有报错;帆软市场web页面效果正常

Merge in DESIGN/design from ~STARRYI/design:release/10.0 to release/10.0

* commit '8eed95f4eafb72d4a79d806ba3446f97e7113287':
  REPORT-66342 组件复用-设计器里在线组件页面一直显示加载中,日志没有报错;帆软市场web页面效果正常
security/10.0
starryi 3 years ago
parent
commit
e63507e24f
  1. 6
      designer-form/src/main/java/com/fr/design/mainframe/share/sort/OnlineWidgetSortType.java

6
designer-form/src/main/java/com/fr/design/mainframe/share/sort/OnlineWidgetSortType.java

@ -27,7 +27,11 @@ public enum OnlineWidgetSortType implements SortType<OnlineShareWidget> {
public int compare(OnlineShareWidget o1, OnlineShareWidget o2) { public int compare(OnlineShareWidget o1, OnlineShareWidget o2) {
double t1 = getSortValue(o1, parameterMap); double t1 = getSortValue(o1, parameterMap);
double t2 = getSortValue(o2, parameterMap); double t2 = getSortValue(o2, parameterMap);
return ComparatorUtils.compareCommonType(t2, t1); // Comparator中比较double/float相等时,不允许误差. 否则会违背 "若x = y , y = z, 则x = z"的约定。
// 因为允许误差的情况下,x和y间的误差在允许范围内,被判定相等,y和间的误差在允许范围内,被判定相等,
// 但x和z间的误差可能超出允许范围,从而不相等,因此会违背上述约定。
// 产生IllegalArgumentException: Comparison method violates its general contract!
return Double.compare(t2, t1);
} }
}); });
} }

Loading…
Cancel
Save