Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
gtiwari333 committed Sep 9, 2022
2 parents cf102ee + 20f22d6 commit 3e2894c
Show file tree
Hide file tree
Showing 22 changed files with 274 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@
<!-- Checks for class design -->
<!-- See https://checkstyle.org/config_design.html -->
<!-- <module name="DesignForExtension"/>-->
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<!-- <module name="FinalClass"/>-->
<!-- <module name="HideUtilityClassConstructor"/>-->
<module name="InterfaceIsType"/>
<!-- <module name="VisibilityModifier"/>-->

Expand Down
18 changes: 18 additions & 0 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,22 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>../spot-bugs.filter-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>../checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>
</project>
11 changes: 11 additions & 0 deletions content-checker/content-checker-service-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@

</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>../../spot-bugs.filter-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
14 changes: 14 additions & 0 deletions content-checker/content-checker-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>../../spot-bugs.filter-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>../../checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
14 changes: 14 additions & 0 deletions email/email-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,20 @@
<testFramework>JUNIT5</testFramework>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>../../spot-bugs.filter-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>../../checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
1 change: 0 additions & 1 deletion email/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@
<module>email-service-api</module>
</modules>


</project>
19 changes: 19 additions & 0 deletions main-app/main-orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,25 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>../../spot-bugs.filter-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>../../checkstyle.xml</configLocation>
<sourceDirectories>
<sourceDirectory>
${project.build.sourceDirectory}
</sourceDirectory>
</sourceDirectories>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
8 changes: 6 additions & 2 deletions main-app/main-orm/src/main/java/gt/app/domain/Comment.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ public void addChildComment(Comment childComment) {

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Comment comment = (Comment) o;
return Objects.equals(id, comment.id) &&
Objects.equals(articleId, comment.articleId);
Expand Down
41 changes: 20 additions & 21 deletions main-app/main-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,18 +249,18 @@
</dependency>

<!--spring cloud contract stubs -->
<!-- <dependency>-->
<!-- <groupId>gt.app</groupId>-->
<!-- <artifactId>email-service</artifactId>-->
<!-- <classifier>stub</classifier>-->
<!-- <version>${project.parent.version}</version>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>*</groupId>-->
<!-- <artifactId>*</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>gt.app</groupId>-->
<!-- <artifactId>email-service</artifactId>-->
<!-- <classifier>stub</classifier>-->
<!-- <version>${project.parent.version}</version>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>*</groupId>-->
<!-- <artifactId>*</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- test only dependencies -->
</dependencies>

Expand Down Expand Up @@ -339,20 +339,19 @@
</executions>
</plugin>

<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>../../spot-bugs.filter-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven.checkstyle.plugin.version}</version>
<configuration>
<configLocation>src/main/resources/checkstyle.xml</configLocation>
<configLocation>../../checkstyle.xml</configLocation>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${puppycrawl.checkstyle.version}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
import lombok.extern.slf4j.Slf4j;
import org.hibernate.EmptyInterceptor;

import java.io.Serial;

@Slf4j
public class HibernateStatInterceptor extends EmptyInterceptor {

@Serial
private static final long serialVersionUID = -7875557911815131906L;
private final transient ThreadLocal<Long> queryCount = new ThreadLocal<>();

public void startCounter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AppKeycloakAuthProvider extends KeycloakAuthenticationProvider {
final UserService userService;
private GrantedAuthoritiesMapper grantedAuthoritiesMapper;

public AppKeycloakAuthProvider(UserService userService) {
AppKeycloakAuthProvider(UserService userService) {
this.userService = userService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MethodSecurityConfig extends GlobalMethodSecurityConfiguration {
private final AppPermissionEvaluatorService permissionEvaluator;
private final ApplicationContext applicationContext;

public MethodSecurityConfig(@Qualifier("permEvaluator") AppPermissionEvaluatorService permissionEvaluator, ApplicationContext applicationContext) {
MethodSecurityConfig(@Qualifier("permEvaluator") AppPermissionEvaluatorService permissionEvaluator, ApplicationContext applicationContext) {
this.permissionEvaluator = permissionEvaluator;
this.applicationContext = applicationContext;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected void configure(HttpSecurity http) throws Exception {

static class LogoutHandler extends KeycloakLogoutHandler {

public LogoutHandler(AdapterDeploymentContext adapterDeploymentContext) {
LogoutHandler(AdapterDeploymentContext adapterDeploymentContext) {
super(adapterDeploymentContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CommentRepositoryCustomImpl extends AbstractRepositoryImpl<Comment, Commen

private final DSLContext jooq;

public CommentRepositoryCustomImpl(DSLContext jooq) {
CommentRepositoryCustomImpl(DSLContext jooq) {
super(Comment.class);
this.jooq = jooq;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void updateUserIfNeeded(User user) {
}

public User getReference(UUID id) {
return userRepository.getById(id);
return userRepository.getReferenceById(id);
}

public Optional<User> find(UUID id) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
blogapp.title=ब्लग एप
blogapp.user-articles={0}को लेखहरु
blogapp.title=???? ??
blogapp.user-articles={0}?? ??????
blogapp.home-link-text=HOME
blogapp.new-article-link=New Article
1 change: 1 addition & 0 deletions main-app/main-webapp/src/main/resources/wro.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

14 changes: 14 additions & 0 deletions main-app/report-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>../../spot-bugs.filter-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>../../checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Loading

0 comments on commit 3e2894c

Please sign in to comment.