Skip to content
Merged

Dev #121

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
10343e6
update pom to next version
bischoffz Feb 11, 2025
0be8ec1
Updated pom to use snapshot version of ms-util
shawnhatch Feb 13, 2025
81ab240
Merge pull request #100 from HHS/pom_update
shawnhatch Feb 13, 2025
fff1a72
Bump com.google.code.gson:gson in the dependencies group (#105)
dependabot[bot] Apr 15, 2025
04a05d5
Bump the test-dependencies group across 1 directory with 3 updates (#…
dependabot[bot] Apr 15, 2025
2a42f09
Bump the standard-plugins group across 1 directory with 4 updates (#103)
dependabot[bot] Apr 15, 2025
3dd83c1
Improve equals contract (#110)
travisrieglerleidos Apr 29, 2025
6a4f455
Bump the protobuf-dependencies group with 3 updates (#109)
dependabot[bot] Apr 29, 2025
fb7534d
Bump com.google.code.gson:gson in the dependencies group (#108)
dependabot[bot] Apr 29, 2025
9d0499b
Bump the test-dependencies group with 2 updates (#107)
dependabot[bot] Apr 29, 2025
b27453d
Bump org.codehaus.mojo:build-helper-maven-plugin (#116)
dependabot[bot] Jun 27, 2025
2208308
Bump the protobuf-dependencies group with 3 updates (#114)
dependabot[bot] Jun 27, 2025
b3fca5a
Bump the test-dependencies group with 2 updates (#115)
dependabot[bot] Jun 27, 2025
786bcab
Bump org.codehaus.mojo:flatten-maven-plugin (#117)
dependabot[bot] Jun 27, 2025
7c7cdc1
Bump org.sonatype.central:central-publishing-maven-plugin (#118)
dependabot[bot] Jun 27, 2025
8f2fc18
Bump org.apache.maven.plugins:maven-gpg-plugin
dependabot[bot] Jul 7, 2025
54c596e
Updated pom refs
shawnhatch Aug 8, 2025
0114378
Merge pull request #120 from HHS/dependabot/maven/dev/standard-plugin…
shawnhatch Aug 8, 2025
1eaad36
Bump the test-dependencies group with 2 updates
dependabot[bot] Aug 8, 2025
46c90a4
Merge pull request #119 from HHS/dependabot/maven/dev/test-dependenci…
shawnhatch Aug 8, 2025
13a1b4a
updated pom
shawnhatch Aug 8, 2025
be0b6dc
Merge branch 'main' into dev
shawnhatch Aug 8, 2025
23ba046
fix test coverage
bischoffz Aug 8, 2025
3d31520
Merge remote-tracking branch 'origin/dev' into dev
shawnhatch Aug 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public final <T> ITranslationSpec getTranslationSpecForClass(Class<T> classRef)
}

/**
* A hash code implementation consistent with equals().
* Standard implementation consistent with the {@link #equals(Object)} method
*/
@Override
public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,29 +302,31 @@ public static Builder builder() {
return new Builder();
}

/**
* Standard implementation consistent with the {@link #equals(Object)} method.
* Note that we do not include the classToSpec map as part of the hash code
* contract, as there is never a case where it would differ from the
* translationSpec set, since both data structures get populated in the same
* addTranslationSpec() method. The data structure that matters is the list of
* translation specs, not the mapping, which only exists as a convenience map
* for translation purposes.
*/
@Override
public int hashCode() {
/*
* Note that we do not include the classToSpec map as part of the hash code
* contract, as there is never a case where it would differ from the
* translationSpec set, since both data structures get populated in the same
* addTranslationSpec() method. The data structure that matters is the list of
* translation specs, not the mapping, which only exists as a convenience map
* for translation purposes
*/
return Objects.hash(translationSpecs);
}

/**
* Two {@link TaskitEngineData} instances are equal if and only if
* their translationSpecs are equal. Note that we do not include the classToSpec
* map as part of the equals contract, as there is never a case where it would
* differ from the translationSpec set, since both data structures get populated
* in the same addTranslationSpec() method. The data structure that matters is
* the list of translation specs, not the mapping, which only exists as a
* convenience map for translation purposes.
*/
@Override
public boolean equals(Object obj) {
/*
* Note that we do not include the classToSpec map as part of the equals
* contract, as there is never a case where it would differ from the
* translationSpec set, since both data structures get populated in the same
* addTranslationSpec() method. The data structure that matters is the list of
* translation specs, not the mapping, which only exists as a convenience map
* for translation purposes
*/
if (this == obj) {
return true;
}
Expand All @@ -333,7 +335,7 @@ public boolean equals(Object obj) {
return false;
}

if (!(obj instanceof TaskitEngineData)) {
if (getClass() != obj.getClass()) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,4 @@ protected <I> I readFile(File file, Class<I> inputClassRef) throws IOException {

return this.gson.fromJson(jsonObject.toString(), inputClassRef);
}

@Override
public int hashCode() {
return super.hashCode();
}

@Override
public boolean equals(Object obj) {
return super.equals(obj);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Test class representing a class with various variables, including a Complex
* class.
* class, and an enum.
* <p>
* <b>Should NOT</b> be used outside of testing.
* </p>
Expand Down Expand Up @@ -97,11 +97,11 @@ public void setTestAppEnum(TestAppEnum testAppEnum) {
}

/**
* Hash code implementation consistent with equals()
* Standard implementation consistent with the {@link #equals(Object)} method
*/
@Override
public int hashCode() {
return Objects.hash(integer, bool, string, testComplexAppObject);
return Objects.hash(integer, bool, string, testComplexAppObject, testAppEnum);
}

/**
Expand All @@ -121,6 +121,6 @@ public boolean equals(Object obj) {
}
TestAppObject other = (TestAppObject) obj;
return integer == other.integer && bool == other.bool && Objects.equals(string, other.string)
&& Objects.equals(testComplexAppObject, other.testComplexAppObject);
&& Objects.equals(testComplexAppObject, other.testComplexAppObject) && testAppEnum == other.testAppEnum;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void setNumEntities(int numEntities) {
}

/**
* Hash code implentation consistent with equals().
* Standard implementation consistent with the {@link #equals(Object)} method
*/
@Override
public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void setNumEntities(int numEntities) {
}

/**
* Hash code implementation consistent with equals().
* Standard implementation consistent with the {@link #equals(Object)} method
*/
@Override
public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package gov.hhs.aspr.ms.taskit.core.testsupport.objects;

/**
* Complement enum to {@link TestAppEnum}.
* <p>
* <b>Should NOT</b> be used outside of testing.
* </p>
*/
public enum TestInputEnum {
TEST1,
TEST2
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
/**
* Complement class to {@link TestAppObject}
* <p>
* Note this class does not have an enum variable.
* </p>
* <p>
* <b>Should NOT</b> be used outside of testing.
* </p>
*/
Expand All @@ -16,6 +13,7 @@ public class TestInputObject {
private boolean bool;
private String string;
private TestComplexInputObject testComplexInputObject;
private TestInputEnum testInputEnum;

/**
* @return value of the integer variable
Expand Down Expand Up @@ -82,16 +80,32 @@ public void setTestComplexInputObject(TestComplexInputObject testComplexInputObj
}

/**
* Hash code implementation consistent with equals().
* @return the value of the enum variable
*/
public TestInputEnum getTestInputEnum() {
return this.testInputEnum;
}

/**
* Sets the value of the enum variable.
*
* @param testInputEnum the value to set
*/
public void setTestInputEnum(TestInputEnum testInputEnum) {
this.testInputEnum = testInputEnum;
}

/**
* Standard implementation consistent with the {@link #equals(Object)} method
*/
@Override
public int hashCode() {
return Objects.hash(integer, bool, string, testComplexInputObject);
return Objects.hash(integer, bool, string, testComplexInputObject, testInputEnum);
}

/**
* Two {@link TestInputObject}s are equal if and only if their integers, bools,
* strings, and testComplexInputObjects are equal.
* strings, testComplexInputObjects, and testInputEnums are equal.
*/
@Override
public boolean equals(Object obj) {
Expand All @@ -106,7 +120,6 @@ public boolean equals(Object obj) {
}
TestInputObject other = (TestInputObject) obj;
return integer == other.integer && bool == other.bool && Objects.equals(string, other.string)
&& Objects.equals(testComplexInputObject, other.testComplexInputObject);
&& Objects.equals(testComplexInputObject, other.testComplexInputObject) && testInputEnum == other.testInputEnum;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public void setWrappedObject(Object wrappedObject) {
}

/**
* Hash code implementation consistent with equals().
* Standard implementation consistent with the {@link #equals(Object)} method
*/
@Override
public int hashCode() {
return Objects.hashCode(wrappedObject);
return Objects.hash(wrappedObject);
}

/**
Expand Down
Loading