Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential fix for code scanning alert no. 2: Use of externally-controlled format string #241

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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 @@ -12,7 +12,7 @@
import no.nav.ung.sak.typer.JournalpostId;

public class DokumentDto {
private List<Long> behandlinger = new ArrayList<>();
private List<Long> behandlinger;
private String dokumentId;
private String gjelderFor;
private JournalpostId journalpostId;
Expand All @@ -25,7 +25,7 @@ public class DokumentDto {
private String brevkode;

public DokumentDto(String basePath) {
this.basePath = basePath + "&journalpostId=%s&dokumentId=%s";
this.basePath = String.format("%s",basePath) + "&journalpostId=%s&dokumentId=%s";
this.behandlinger = new ArrayList<>();
}

Expand Down Expand Up @@ -124,5 +124,6 @@ void genererLenke() {
if (journalpostId != null && journalpostId.getVerdi() != null && dokumentId != null) {
this.href = String.format(basePath, journalpostId.getVerdi(), dokumentId);
}

}
}