False error: @StateRefinement(from = "false") gives "State Conflict Error: Found multiple disjoint states"
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
Hướng nghiên cứu
Start by reading the state transition validation path that reports “Found multiple disjoint states” and trace how it handles @StateRefinement(from = "false") in the reproducer. Check the existing tests for state refinements and add a case where the method is never called. Done means the spec verifies successfully while a call to unsupported() is rejected.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Impact: there is no direct way to say "this call is never allowed". from = "false" should refuse the method in every state. Instead it makes the spec itself an error, even in programs that never call the method.
Minimal reproducer
import liquidjava.specification.StateRefinement;
import liquidjava.specification.StateSet;
@StateSet({"a", "b"})
class Res {
@StateRefinement(to = "a(this)")
public Res() {}
@StateRefinement(from = "false")
public void unsupported() {}
public void fine() {}
}
public class Repro {
public static void main(String[] args) {
Res r = new Res();
r.fine(); // unsupported() is never called
}
}
Expected: Correct! Passed Verification. A call to unsupported() would then be refused.
Actual (main @ f7f366c, and 1a506fe):
State Conflict Error: Found multiple disjoint states in state transition: state transition can only go to one state of each state set
12 | @StateRefinement(from = "false")
Real-world scenario. javax.management.modelmbean.RequiredModelMBean.load() and store() always throw MBeanException("Persistence not supported for this MBean") (RequiredModelMBean.java:372-378, 414-420), so a spec should refuse them everywhere. Barista's expert spec allows them, so the bug goes unreported.
Workaround: an int ghost that no call sets, with the constructor setting it to 0 (from = "supported(this) == 1"). It works, but it's an odd thing to have to write.
- Ngôn ngữ chính
- Java
- Star
- 71
- Fork
- 37
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của liquid-java/liquidjava
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
liquid-java/liquidjava#443 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug real-world-finding
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
liquid-java/liquidjava#395 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
liquid-java/liquidjava#373 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
External specs: a @StateSet declared later in the file is not found by an interface earlier in itĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
liquid-java/liquidjava#452 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
liquid-java/liquidjava#451 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của liquid-java/liquidjava
Issue tương tự
-
[Bug] 资源包列表 与 模组/数据包/世界 列表排列顺序不一致Có thể đã có người làm @fishdry1000 đã nhận 3 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
AtlasOfLivingAustralia/species-lists#882 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ballerina-platform/ballerina-library#9458 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
UGS-FX 2.1.27 Open File IssueĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
winder/Universal-G-Code-Sender#3242 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PCL-Community/PCL-CE#3767 ·
Maintainer thường phản hồi trong vòng 1 ngày