Skip to content

Commit

Permalink
refactor: Common static analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
natedanner and TeamModerne committed Apr 24, 2024
1 parent 3edd802 commit bf32cef
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class LdapRepositoryFactoryBean<T extends Repository<S, Name>, S>
extends RepositoryFactoryBeanSupport<T, S, Name> {

private @Nullable LdapOperations ldapOperations;
private boolean mappingContextConfigured = false;
private boolean mappingContextConfigured;
private @Nullable MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> mappingContext;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class LdapRepositoryUnitTests {

@Mock LdapOperations ldapOperations;

UnitTestPerson walter, hank;
UnitTestPerson walter;
UnitTestPerson hank;

PersonRepository repository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
*/
class LdapRepositoryConfigurationExtensionUnitTests {

private StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(Config.class, true);
private ResourceLoader loader = new PathMatchingResourcePatternResolver();
private Environment environment = new StandardEnvironment();
private BeanDefinitionRegistry registry = new DefaultListableBeanFactory();
private final StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(Config.class, true);
private final ResourceLoader loader = new PathMatchingResourcePatternResolver();
private final Environment environment = new StandardEnvironment();
private final BeanDefinitionRegistry registry = new DefaultListableBeanFactory();

private RepositoryConfigurationSource configurationSource = new AnnotationRepositoryConfigurationSource(metadata,
private final RepositoryConfigurationSource configurationSource = new AnnotationRepositoryConfigurationSource(metadata,
EnableLdapRepositories.class, loader, environment, registry);

@Test // DATALDAP-60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class QPerson extends EntityPathBase<UnitTestPerson> {

public final StringPath fullName = createString("fullName");

public final ListPath<String, StringPath> description = this.<String, StringPath> createList("description",
public final ListPath<String, StringPath> description = this. createList("description",
String.class, StringPath.class, PathInits.DIRECT2);

public final StringPath lastName = createString("lastName");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*/
class QuerydslFilterGeneratorTests {

private ObjectDirectoryMapper odm = new DefaultObjectDirectoryMapper();
private LdapSerializer tested = new LdapSerializer(odm, UnitTestPerson.class);
private QPerson person = QPerson.person;
private final ObjectDirectoryMapper odm = new DefaultObjectDirectoryMapper();
private final LdapSerializer tested = new LdapSerializer(odm, UnitTestPerson.class);
private final QPerson person = QPerson.person;

@Test
void testEqualsFilter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class QuerydslLdapPredicateExecutorUnitTests {

@Mock LdapOperations ldapOperations;

UnitTestPerson walter, hank;
UnitTestPerson walter;
UnitTestPerson hank;

QuerydslLdapPredicateExecutor<UnitTestPerson> repository;

Expand Down

0 comments on commit bf32cef

Please sign in to comment.