Skip to content

Commit

Permalink
Turns Rule 304 from Erorr into Warning (#149)
Browse files Browse the repository at this point in the history
* Update rule 304 to warning.

* remove git ignore.
  • Loading branch information
timronan authored May 10, 2023
1 parent b5a505a commit a818abe
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
7 changes: 0 additions & 7 deletions .gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>edu.iris.dmc</groupId>
<artifactId>stationxml-validator</artifactId>
<packaging>jar</packaging>
<version>1.7.4</version>
<version>1.7.5</version>
<name>FDSN StationXML Validator</name>
<url>http://maven.apache.org</url>
<description>Converts seismological metadata between dataless seed and FDSN StationXML file formats.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public Message evaluate(Channel channel) {
}

Equipment equipment = channel.getSensor();
if (this.required) {
if (this.required) {
if (equipment == null) {
return Result.error("expected equipment/sensor but was null");
return Result.warning("expected equipment/sensor but was null");
}else{
if (equipment.getDescription() == null||equipment.getDescription().trim().isEmpty()) {
return Result.error("expected equipment/sensor description but was null");
return Result.warning("expected equipment/sensor description but was null");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public void fail() throws Exception {
SensorCondition condition = new SensorCondition(true, "");

Message result = condition.evaluate(c);
assertTrue(result instanceof edu.iris.dmc.station.rules.Error);

System.out.print(result);
assertTrue(result instanceof edu.iris.dmc.station.rules.Warning);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void fail() throws Exception {
SensorCondition condition = new SensorCondition(true, "");

Message result = condition.evaluate(c);
assertTrue(result instanceof edu.iris.dmc.station.rules.Error);
assertTrue(result instanceof edu.iris.dmc.station.rules.Warning);
}

}
Expand Down

0 comments on commit a818abe

Please sign in to comment.