Address JavaFormat Violations in Integration Tests

Issue gh-743
This commit is contained in:
Josh Cummings
2023-05-09 15:40:05 -06:00
parent 847e4d00e1
commit 5928a933d9
7 changed files with 61 additions and 42 deletions

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ldap.itest.core;
import org.springframework.ldap.core.DistinguishedName;

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ldap.itest.core.support;
import org.springframework.ldap.core.DistinguishedName;

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ldap.itest.filter;
import org.springframework.ldap.filter.Filter;

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ldap.itest.transaction.compensating.manager;
public class DummyException extends RuntimeException {

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ldap.itest.transaction.compensating.manager;
public class DummyServiceImpl {

View File

@@ -68,7 +68,8 @@ public class LdapAndJdbcDummyDaoImpl implements DummyDao {
ctx.setAttributeValue("sn", lastname);
ctx.setAttributeValue("description", description);
this.ldapTemplate.bind(dn, ctx, null);
this.jdbcTemplate.update("insert into PERSON values(?, ?, ?)", new Object[] { fullname, lastname, description });
this.jdbcTemplate.update("insert into PERSON values(?, ?, ?)",
new Object[] { fullname, lastname, description });
}
/*

View File

@@ -84,6 +84,60 @@ public class OrgPerson {
this.description = description;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final OrgPerson other = (OrgPerson) obj;
if (this.company == null) {
if (other.company != null) {
return false;
}
}
else if (!this.company.equals(other.company)) {
return false;
}
if (this.country == null) {
if (other.country != null) {
return false;
}
}
else if (!this.country.equals(other.country)) {
return false;
}
if (this.description == null) {
if (other.description != null) {
return false;
}
}
else if (!this.description.equals(other.description)) {
return false;
}
if (this.fullname == null) {
if (other.fullname != null) {
return false;
}
}
else if (!this.fullname.equals(other.fullname)) {
return false;
}
if (this.lastname == null) {
if (other.lastname != null) {
return false;
}
}
else if (!this.lastname.equals(other.lastname)) {
return false;
}
return true;
}
public int hashCode() {
final int prime = 31;
int result = 1;
@@ -95,45 +149,4 @@ public class OrgPerson {
return result;
}
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final OrgPerson other = (OrgPerson) obj;
if (this.company == null) {
if (other.company != null)
return false;
}
else if (!this.company.equals(other.company))
return false;
if (this.country == null) {
if (other.country != null)
return false;
}
else if (!this.country.equals(other.country))
return false;
if (this.description == null) {
if (other.description != null)
return false;
}
else if (!this.description.equals(other.description))
return false;
if (this.fullname == null) {
if (other.fullname != null)
return false;
}
else if (!this.fullname.equals(other.fullname))
return false;
if (this.lastname == null) {
if (other.lastname != null)
return false;
}
else if (!this.lastname.equals(other.lastname))
return false;
return true;
}
}