Skip to content

Commit

Permalink
Merge pull request #358 from com-pas/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
gleizesDor authored Dec 1, 2023
2 parents b0c8826 + f92fad6 commit fbe7852
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<sonar.coverage.exclusions>sct-coverage/**</sonar.coverage.exclusions>
<aggregate.report.dir>../sct-coverage/target/site/jacoco-aggregate/jacoco.xml</aggregate.report.dir>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
<compas-core.version>0.15.0</compas-core.version>
<compas-core.version>0.17.0</compas-core.version>
<compas-scl-xsd.version>0.0.4</compas-scl-xsd.version>
<maven.plugin.javadoc>3.4.1</maven.plugin.javadoc>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void check(DaTypeName daTypeName) throws ScdException {
if(getBType() == TPredefinedBasicTypeEnum.ENUM){
EnumTypeAdapter enumTypeAdapter = getDataTypeTemplateAdapter().getEnumTypeAdapterById(getType())
.orElseThrow(
() -> new ScdException("")
() -> new ScdException(String.format("Unknown EnumType(%s) referenced by DA/BDA(%s)", getType(), getName()))
);
String val = daTypeName.getDaiValues().values().stream().findFirst().orElse(null);
if(val != null && !enumTypeAdapter.hasValue(val)){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class DAAdapter extends AbstractDataAttributeAdapter<DOTypeAdapter, TDA>
* @param parentAdapter Parent container reference
* @param currentElem Current reference
*/
protected DAAdapter(DOTypeAdapter parentAdapter, TDA currentElem) {
public DAAdapter(DOTypeAdapter parentAdapter, TDA currentElem) {
super(parentAdapter, currentElem);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
@EqualsAndHashCode
public class IcdHeader {

@EqualsAndHashCode.Exclude
private final String content;
private final String icdSystemVersionUUID;
private final TCompasIEDType iedType;
@EqualsAndHashCode.Exclude
Expand All @@ -45,7 +43,6 @@ public class IcdHeader {
private final String headerRevision;

public IcdHeader(TCompasICDHeader compasICDHeader) {
this.content = compasICDHeader.getContent();
this.icdSystemVersionUUID = compasICDHeader.getICDSystemVersionUUID();
this.iedType = compasICDHeader.getIEDType();
this.iedSubstationinstance = compasICDHeader.getIEDSubstationinstance();
Expand All @@ -64,7 +61,6 @@ public IcdHeader(TCompasICDHeader compasICDHeader) {

public TCompasICDHeader toTCompasICDHeader() {
TCompasICDHeader tCompasICDHeader = new TCompasICDHeader();
tCompasICDHeader.setContent(content);
tCompasICDHeader.setICDSystemVersionUUID(icdSystemVersionUUID);
tCompasICDHeader.setIEDType(iedType);
tCompasICDHeader.setIEDSubstationinstance(iedSubstationinstance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ void testEquals(IcdHeader icdHeader2) {
}

private static Stream<Arguments> provideIcdHeaderForEquals() {
TCompasICDHeader tCompasICDHeaderModifiedContent = createHeader();
tCompasICDHeaderModifiedContent.setContent("patate");
TCompasICDHeader tCompasICDHeaderModifiedIedSubstationinstance = createHeader();
tCompasICDHeaderModifiedIedSubstationinstance.setIEDSubstationinstance(BigInteger.TEN);
TCompasICDHeader tCompasICDHeaderModifiediedSystemVersioninstance = createHeader();
Expand All @@ -73,7 +71,6 @@ private static Stream<Arguments> provideIcdHeaderForEquals() {
TCompasICDHeader tCompasICDHeaderModifiedbayLabel = createHeader();
tCompasICDHeaderModifiedbayLabel.setBayLabel("patate");
return Stream.of(
Arguments.of(new IcdHeader(tCompasICDHeaderModifiedContent)),
Arguments.of(new IcdHeader(tCompasICDHeaderModifiedIedSubstationinstance)),
Arguments.of(new IcdHeader(tCompasICDHeaderModifiediedSystemVersioninstance)),
Arguments.of(new IcdHeader(tCompasICDHeaderModifiediedName)),
Expand Down Expand Up @@ -150,7 +147,6 @@ void testHashCode_should_not_equals() {

private static TCompasICDHeader createHeader() {
TCompasICDHeader tCompasICDHeader = new TCompasICDHeader();
tCompasICDHeader.setContent("content");
tCompasICDHeader.setICDSystemVersionUUID("icdSystemVersionUUID");
tCompasICDHeader.setIEDType(TCompasIEDType.SCU);
tCompasICDHeader.setIEDSubstationinstance(BigInteger.ONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ void getCompasICDHeaders_should_return_ICDHeaders() {
//Then
assertThat(tCompasICDHeader)
.extracting(
TCompasICDHeader::getContent,
TCompasICDHeader::getICDSystemVersionUUID,
TCompasICDHeader::getIEDType,
TCompasICDHeader::getIEDSubstationinstance,
Expand All @@ -582,7 +581,7 @@ void getCompasICDHeaders_should_return_ICDHeaders() {
TCompasICDHeader::getHeaderVersion,
TCompasICDHeader::getHeaderRevision
)
.containsExactly("",
.containsExactly(
"IED4d4fe1a8cda64cf88a5ee4176a1a0eef",
TCompasIEDType.SCU,
BigInteger.ONE,
Expand Down

0 comments on commit fbe7852

Please sign in to comment.