Skip to content

Commit

Permalink
Merge pull request #405 from jhipster/sonarissues
Browse files Browse the repository at this point in the history
Sonar: fix some issues
  • Loading branch information
DanielFran authored Aug 20, 2023
2 parents acaf4f1 + 543dc69 commit 2393ad6
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.util.EnumSet;
import javax.servlet.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -33,12 +32,10 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import org.springframework.util.CollectionUtils;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import tech.jhipster.config.JHipsterConstants;
import tech.jhipster.config.JHipsterProperties;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import io.github.jhipster.online.domain.interfaces.CompleteDate;
import java.io.Serializable;
import java.time.Instant;
import java.util.Date;
import java.util.Objects;
import javax.persistence.*;
import org.hibernate.annotations.Cache;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class PasswordStrengthBarComponent {
const regex = /[$-/:-?{-~!"^_`[\]]/g; // "
const lowerLetters = /[a-z]+/.test(p);
const upperLetters = /[A-Z]+/.test(p);
const numbers = /[0-9]+/.test(p);
const numbers = /\d+/.test(p);
const symbols = regex.test(p);

const flags = [lowerLetters, upperLetters, numbers, symbols];
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/admin/audits/audits.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ export class AuditsComponent implements OnInit {

private onSuccess(audits: Audit[] | null, headers: HttpHeaders): void {
this.totalItems = Number(headers.get('X-Total-Count'));
this.audits = audits || [];
this.audits = audits ?? [];
}
}
4 changes: 2 additions & 2 deletions src/main/webapp/app/admin/metrics/metrics.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export class MetricsComponent implements OnInit {
}

metricsKeyExists(key: MetricsKey): boolean {
return this.metrics && this.metrics[key];
return this?.metrics && this.metrics[key];
}

metricsKeyExistsAndObjectNotEmpty(key: MetricsKey): boolean {
return this.metrics && this.metrics[key] && JSON.stringify(this.metrics[key]) !== '{}';
return this?.metrics && this.metrics[key] && JSON.stringify(this.metrics[key]) !== '{}';
}
}
2 changes: 1 addition & 1 deletion src/main/webapp/app/layouts/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<fa-icon [icon]="'bug'"></fa-icon>
Submit a bug report
</a> |
Powered by <img src="../../../content/images/gcloud-logo.svg" height="92" width="92">
Powered by <img src="../../../content/images/gcloud-logo.svg" alt="Google Cloud" height="92" width="92">
</div>
</div>
</div>
Expand Down

0 comments on commit 2393ad6

Please sign in to comment.