From 83f12332506339fa7240fa0c70b1df9afdf7d3e2 Mon Sep 17 00:00:00 2001 From: Erlend Kristiansen Date: Mon, 14 Apr 2014 18:30:59 +0200 Subject: [PATCH] Thesis: illegal statements --- thesis/master-thesis-erlenkr.tex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/thesis/master-thesis-erlenkr.tex b/thesis/master-thesis-erlenkr.tex index 69ee2bdb..6657d03f 100644 --- a/thesis/master-thesis-erlenkr.tex +++ b/thesis/master-thesis-erlenkr.tex @@ -1732,6 +1732,30 @@ Therefore we must examine the selection for assignments to local variables that are referenced after the text selection. Then we must verify that not more than one such reference is done, or zero if any return statements are found. +\subsection{Illegal statements} +An illegal statement may be a statement that is of a type that is never allowed, +or it may be a statement that is only allowed if certain conditions are true. + +Any use of the \var{super} keyword is prohibited, since its meaning is altered +when moving a method to another class. + +For a \emph{break} statement, there are two situations to consider: A break +statement with or without a label. If the break statement has a label, it is +checked that whole of the labeled statement is inside the selection. If the +break statement does not have a label attached to it, it is checked that its +innermost enclosing loop or switch statement also is inside the selection. + +The situation for a \emph{continue} statement is the same as for a break +statement, except that it is not allowed inside switch statements. + +Regarding \emph{assignments}, two types of assignments are allowed: Assignments +to non-final variables and assignments to array access. All other assignments +are regarded illegal. + +\todoin{Expand with more illegal statements and/or conclude that I did not have +time to analyze all statements types.} + + \chapter{Refactorings in Eclipse JDT: Design, Shortcomings and Wishful Thinking}\label{ch:jdt_refactorings} @@ -3115,6 +3139,7 @@ is thrown. %on\ldots)} \subsection{The IllegalStatementsChecker} +\todoin{Contains duplicate text from semantic section} This checker is designed to check for illegal statements. Any use of the \var{super} keyword is prohibited, since its meaning is altered -- 2.43.5