Skip to content

Commit 2fbe3cc

Browse files
committed
Merge branch 'umlsec4mltop10' of git@github.com:CARiSMA-Tool/carisma-tool.git into umlsec4mltop10
2 parents f083c3b + 0c14631 commit 2fbe3cc

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

plugins/carisma.check.mltop10checks/src/carisma/check/mltop10checks/inputmanipulation/InputManipulationCheck.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ public class InputManipulationCheck implements CarismaCheckWithID {
3939
* AnalysisHost for report.
4040
*/
4141
private AnalysisHost analysisHost;
42-
private ArrayList<Artifact> aiapplicationList;
43-
private ArrayList<Artifact> mlmodelList;
4442

4543
public InputManipulationCheck() {
46-
// TODO Auto-generated constructor stub
44+
super();
4745
}
4846

4947
@Override
@@ -59,13 +57,14 @@ public final boolean perform(final Map<String, CheckParameter> parameters, final
5957
this.analysisHost.appendLineToReport("Empty model");
6058
return false;
6159
}
62-
if (currentModel.getContents().get(0) instanceof Package) {
63-
this.model = (Package) currentModel.getContents().get(0);
64-
return startCheck();
60+
if (!(currentModel.getContents().get(0) instanceof Package)) {
61+
this.analysisHost
62+
.addResultMessage(new AnalysisResultMessage(StatusType.WARNING, "Content is not a model!"));
63+
this.analysisHost.appendLineToReport("Content is not a model!");
64+
return false;
6565
}
66-
this.analysisHost.addResultMessage(new AnalysisResultMessage(StatusType.WARNING, "Content is not a model!"));
67-
this.analysisHost.appendLineToReport("Content is not a model!");
68-
return false;
66+
this.model = (Package) currentModel.getContents().get(0);
67+
return startCheck();
6968
}
7069

7170
/**
@@ -161,14 +160,12 @@ public boolean startCheck() {
161160

162161
@Override
163162
public String getCheckID() {
164-
// TODO Auto-generated method stub
165-
return null;
163+
return CHECK_ID;
166164
}
167165

168166
@Override
169167
public String getName() {
170-
// TODO Auto-generated method stub
171-
return null;
168+
return CHECK_NAME;
172169
}
173170

174171
}

0 commit comments

Comments
 (0)