Skip to content

Commit

Permalink
Add new line at the end of file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ao-senXiong committed Apr 12, 2024
1 parent 0304785 commit 59c8e59
Show file tree
Hide file tree
Showing 59 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion src/main/java/pico/inference/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ one.assignability.invalid=Only one assignability qualifier is allowed on %s
object.identity.method.invocation.invalid=Cannot invoke non-object identity method %s from object identity context!
object.identity.field.access.invalid=Object identity context cannot reference non abstract state field %s!
object.identity.static.field.access.forbidden=Object identity context cannot reference static field %s!
bound.extends.incompatible=TEST
bound.extends.incompatible=TEST
2 changes: 1 addition & 1 deletion src/main/java/pico/typecheck/jdk.astub
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,4 @@ package java.awt;
@ReceiverDependantMutable
class Container {
void add(@Readonly Component comp, @Readonly Object constraints);
}
}
2 changes: 1 addition & 1 deletion src/main/java/pico/typecheck/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ one.assignability.invalid=Only one assignability qualifier is allowed on %s
object.identity.method.invocation.invalid=Cannot invoke non-object identity method %s from object identity context!
object.identity.field.access.invalid=Object identity context cannot reference non abstract state field %s!
object.identity.static.field.access.forbidden=Object identity context cannot reference static field %s!
implicit.shallow.immutable=Write an explicit mutable qualifier if wants to exclude the field from the abstract state! Otherwise change the class mutability of this object !
implicit.shallow.immutable=Write an explicit mutable qualifier if wants to exclude the field from the abstract state! Otherwise change the class mutability of this object !
2 changes: 1 addition & 1 deletion testinput/glacier/ArrayClone.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
public class ArrayClone {
@Immutable Object @Immutable [] array = new @Immutable Object @Immutable [0];
@Immutable Object @Immutable [] arrayClone = array.clone();
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ArrayCopy.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public void passArray() {
takeArray(array.clone());
}

}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ArrayParameter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public class ArrayParameter {
public void passArray(@Immutable Object k) {
Array.add(keys, k);
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/Arrays.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public byte[] getByteData() {
public void setData() {
intArray[0] = 42;
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/BooleanSubtyping.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ public boolean foo() {
CellType cellType = CellType.BLANK;
return cellType == CellType.NUMBER;
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ClassGetName.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ public String foo() {
Number num = null;
return num.getClass().getName();
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ClassReturn.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ public ClassReturn getInstance() {
return new ClassReturn();
}

}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ColorImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public int hashCode() {

return Arrays.hashCode(_rgb);
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/CompareTo.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public void foo() {
// Shouldn't give an error.
((Boolean)val1).compareTo((Boolean)val2);
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ConflictingAnnotations.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public class ConflictingAnnotations {

// ::error: (type.invalid.annotations.on.use)
@Immutable MutableInterface i2;
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ConstructorAssignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ class OtherClass {
// ::error: (illegal.field.write)
c.x = 6;
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/EnumTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public class EnumTest {
public void foo() {
u.ordinal();
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/EqualsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public boolean equals(@Immutable Object obj) {
return true;
return false;
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/FontImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public class FontImpl {
// Removing error. PICO chose the preferable path.
SColor c = fontColor != null ? new FI_ColorImpl(fontColor) : null;
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ImmutableArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
// MaybeMutable array of primitives is mutable.
// PICO allows shallow immutable array.
private int [] _ints;
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ImmutableClassMutableInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public static void foo() {
bar(x);
}

};
};
2 changes: 1 addition & 1 deletion testinput/glacier/ImmutableCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public abstract class ImmutableCollection<E> extends AbstractCollection<E> {
public int getSize() {
return size();
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ImmutableConstructorInMutableClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public class ImmutableConstructorInMutableClass {
public void aMethod() {

}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ImmutableInterfaceClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

public @Immutable class ImmutableInterfaceClass implements ImmutableInterface {

}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ImmutablePerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ public ImmutablePerson() {
public void aMethod() {

}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ImmutablePrimitiveContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public void setX(int x) {
// ::error: (illegal.field.write)
this.x = x;
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/IncorrectUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ public void badMethod(@Immutable IncorrectUsage2 this) {
public void badMethod2(@Immutable IncorrectUsage2 obj) {

}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/IntArgument.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public void useInt() {
takeInt(i);
}
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/IntReturn.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public int getInt() {
public void useInt() {
int x = getInt();
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/IntegerAssignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public Integer getInt() {
public void useInt() {
Integer i = getInt();
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/InterfaceField.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ interface IF_AnInterface {};
// ::error: (glacier.mutable.invalid)
IF_AnInterface o;
IF_ImmutableInterface o2;
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/InterfaceSupertype.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public boolean equals(Object o1,Object o2){
return true;
return o1!=null ? o1.equals(o2) : false;
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/InvalidAnnotations.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
public class InvalidAnnotations {
// ::error: (type.invalid)
InvalidBottom b;
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/InvalidAssignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ void aMethod() {
// ::error: (glacier.assignment)
i.s = "hello";
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/InvalidImmutableInterfaceClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
// :: error: type.invalid.annotations.on.use
public class InvalidImmutableInterfaceClass implements Cloneable, IIIC_ImmutableInterface {

}
}
2 changes: 1 addition & 1 deletion testinput/glacier/InvalidTypeArguments.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ public Iterator<MutableObject> getCellIterator() {
return Collections.unmodifiableCollection(cellCollection).iterator();
}
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/MapParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public void foo() {
Map <String, Integer> m = null;
takeMap(m);
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/MethodInvocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public void foo() {
Interface i = null;
i.doStuff();
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/MethodTypeParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ static <E> TypeParameters<E> asImmutableList(@Immutable Object[] elements) {
static <V extends @Immutable Object> TypeParameters<V> asImmutableList2(@Immutable Object[] elements) {
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class UnsafeAbstractSuperclass2 {
}

// ::error: (glacier.nonfinalmember) ::error: (glacier.mutablemember)
@Immutable class Immut4 extends UnsafeAbstractSuperclass2 { };
@Immutable class Immut4 extends UnsafeAbstractSuperclass2 { };
2 changes: 1 addition & 1 deletion testinput/glacier/NestedGenerics.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public static boolean contains(Iterator<?> iterator, Object element) {
return any(iterator, null);
}

}
}
2 changes: 1 addition & 1 deletion testinput/glacier/NullAssignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public void foo() {
NA_AnInterface i = null;
takeObj(i);
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/Override.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public Override() {

public void doStuff(int x) {
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/PlainObjects.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ void foo () {

takeImmutableObject(o1);
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ReadOnlyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ void takeImmutableArray(String @Immutable [] foo) {
// ::error: (glacier.assignment.array)
foo[0] = "Hello, world!";
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ReadOnlyObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public class ReadOnlyObject {
return true ? String.valueOf(1) : cat;
}

}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ResultWrapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ static class ResultWrap<T extends @Mutable Object> {
}

final ResultWrap<String> input = null;
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/StaticAssignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public void setStatics () {
GLOBAL = 42;
}

}
}
2 changes: 1 addition & 1 deletion testinput/glacier/StringTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
@SuppressWarnings("initialization")
public @Immutable class StringTest {
String s; // no error expected here because String should be treated as if it were declared @Immutable.
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/Subclassing.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ class MutSubclass extends Subclassing { };
@Immutable class ImmutableSub extends ImmutableSuper { };

// ::error: (glacier.subclass.mutable)
class InvalidMutableSub extends ImmutableSuper { };
class InvalidMutableSub extends ImmutableSuper { };
2 changes: 1 addition & 1 deletion testinput/glacier/Transitivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ public Transitivity() {
public void test() {

}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/TransitivityError.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public TransitivityError() {
public void test() {

}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/TypeParameter.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ void aMethod() {

// ::error: (glacier.typeparameter.mutable)
TypeParameter <java.util.Date> t2 = null;
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/Unboxing.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ public void passDouble() {
takeNumber(42.0);
}

};
};
2 changes: 1 addition & 1 deletion testinput/glacier/UnmodifiableCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public Iterator<SCell> getCellIterator() {
Collection<SCell> cellCollection = null;
return Collections.unmodifiableCollection(cellCollection).iterator();
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/UnmodifiableList.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ public void foo() {
List<AClass> l = true ? ListProcessor.process(_list) : _list;
//List<AClass> l = ListProcessor.process(_list);
}
}
}
2 changes: 1 addition & 1 deletion testinput/glacier/ValidImmutableInterfaceClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

public @Immutable class ValidImmutableInterfaceClass implements VIIC_ImmutableInterface {

}
}
2 changes: 1 addition & 1 deletion testinput/reiminfer/CFLTests5.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ public static void main(String[] arg) {

}
}

2 changes: 1 addition & 1 deletion testinput/typecheck/DeepMutable.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ static class ImmutableGenericIm<T extends MutableBox> {
this.t = t;
}
}
}
}
Loading

0 comments on commit 59c8e59

Please sign in to comment.