From c02a3480e8e53d91a0ac3629be0ddb9ab4e53e30 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 6 Apr 2017 12:26:04 +0200 Subject: [PATCH 1/4] Cast Test --- test/parser/CastTest.jav | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/parser/CastTest.jav diff --git a/test/parser/CastTest.jav b/test/parser/CastTest.jav new file mode 100644 index 00000000..86ca7519 --- /dev/null +++ b/test/parser/CastTest.jav @@ -0,0 +1,8 @@ + +class CastTest{ +void methode(){ + Object a; + String b; + a = (Object) b; +} +} \ No newline at end of file From 0c4cdd63b566002a8c11fff803c350bddc6b0437 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 6 Apr 2017 15:33:20 +0200 Subject: [PATCH 2/4] NotNull entfernen --- src/de/dhbwstuttgart/syntaxtree/statement/Expression.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Expression.java b/src/de/dhbwstuttgart/syntaxtree/statement/Expression.java index 4371bdc1..cb15d409 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Expression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Expression.java @@ -1,8 +1,6 @@ package de.dhbwstuttgart.syntaxtree.statement; - -import com.sun.istack.internal.NotNull; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation; @@ -13,7 +11,7 @@ public abstract class Expression extends SyntaxTreeNode { private RefTypeOrTPHOrWildcardOrGeneric type; - public Expression(@NotNull RefTypeOrTPHOrWildcardOrGeneric type, Token offset){ + public Expression(RefTypeOrTPHOrWildcardOrGeneric type, Token offset){ super(offset); if(type == null)throw new NullPointerException(); this.type = type; From 42010c585952d5abc1b76f403fad4f6382e5cd7e Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 6 Apr 2017 15:35:52 +0200 Subject: [PATCH 3/4] NotNull entfernen --- src/de/dhbwstuttgart/typeinference/constraints/Pair.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/constraints/Pair.java b/src/de/dhbwstuttgart/typeinference/constraints/Pair.java index 08611bb3..6538613e 100755 --- a/src/de/dhbwstuttgart/typeinference/constraints/Pair.java +++ b/src/de/dhbwstuttgart/typeinference/constraints/Pair.java @@ -1,7 +1,6 @@ package de.dhbwstuttgart.typeinference.constraints; import java.io.Serializable; -import com.sun.istack.internal.NotNull; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.typeinference.unify.model.PairOperator; @@ -13,7 +12,7 @@ public class Pair implements Serializable private PairOperator eOperator = PairOperator.SMALLER; - public Pair(@NotNull RefTypeOrTPHOrWildcardOrGeneric TA1, @NotNull RefTypeOrTPHOrWildcardOrGeneric TA2 ) + public Pair(RefTypeOrTPHOrWildcardOrGeneric TA1, RefTypeOrTPHOrWildcardOrGeneric TA2 ) { this.TA1 = TA1; this.TA2 = TA2; From f920269e5188bcffa73ff6f96453da0d23c45d63 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 6 Apr 2017 16:01:32 +0200 Subject: [PATCH 4/4] @NotNull entfernen --- .../assumptions/TypeInferenceBlockInformation.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeInferenceBlockInformation.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeInferenceBlockInformation.java index 383b3509..5cd7dab7 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeInferenceBlockInformation.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeInferenceBlockInformation.java @@ -1,6 +1,5 @@ package de.dhbwstuttgart.typeinference.assumptions; -import com.sun.istack.internal.NotNull; import de.dhbwstuttgart.syntaxtree.ClassOrInterface; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; @@ -11,7 +10,7 @@ public class TypeInferenceBlockInformation extends TypeInferenceInformation { private Method methodContext; private ClassOrInterface currentClass; - public TypeInferenceBlockInformation(Set availableClasses, @NotNull ClassOrInterface currentClass, Method methodContext) { + public TypeInferenceBlockInformation(Set availableClasses, ClassOrInterface currentClass, Method methodContext) { super(availableClasses); this.methodContext = methodContext; this.currentClass = currentClass;