Skip to content

Commit 0c14631

Browse files
committed
marginal modifications.
1 parent 58b893a commit 0c14631

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
/**
@@ -155,14 +154,12 @@ public boolean startCheck() {
155154

156155
@Override
157156
public String getCheckID() {
158-
// TODO Auto-generated method stub
159-
return null;
157+
return CHECK_ID;
160158
}
161159

162160
@Override
163161
public String getName() {
164-
// TODO Auto-generated method stub
165-
return null;
162+
return CHECK_NAME;
166163
}
167164

168165
}

0 commit comments

Comments
 (0)