Closed nhatminhle closed 10 years ago
From tom.mago...@gmail.com on April 26, 2011 03:14:48
The following code causes the error
com.google.java.contract.InvariantError: field != 0
to be thrown when a ClassWithFinalField object is instantiated.
@Invariant("field != 0") public class ClassWithFinalField {
private final int field; public ClassWithFinalField(int field) { this.field = field; }
}
public class CofojaClassWithFinalFieldTest {
@Test public void canCreateClassWithFinalFieldAndValidInvariant() { new ClassWithFinalField(1); }
Original issue: http://code.google.com/p/cofoja/issues/detail?id=19
From chat...@google.com on April 27, 2011 04:50:19
Status: Accepted Owner: chat...@google.com
From chat...@google.com on May 09, 2011 04:53:30
Fixed on r115 .
Status: Fixed
From tom.mago...@gmail.com on April 26, 2011 03:14:48
The following code causes the error
com.google.java.contract.InvariantError: field != 0
to be thrown when a ClassWithFinalField object is instantiated.
@Invariant("field != 0") public class ClassWithFinalField {
}
public class CofojaClassWithFinalFieldTest {
}
Original issue: http://code.google.com/p/cofoja/issues/detail?id=19