Skip to content

Commit 729c806

Browse files
authored
1 parent d6dfe4a commit 729c806

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tools/java-source-utils/src/main/java/com/microsoft/android/JavaSourceUtilsOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private final JavaSourceUtilsOptions parse(Iterator<String> args) throws IOExcep
167167
final String bootClassPath = getNextOptionValue(args, arg);
168168
final ArrayList<File> files = new ArrayList<File>();
169169
for (final String cp : bootClassPath.split(File.pathSeparator)) {
170-
final File file = new File(cp); // lgtm [java/path-injection-local] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
170+
final File file = new File(cp); // CodeQL [SM00697] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
171171
if (!file.exists()) {
172172
System.err.println(App.APP_NAME + ": warning: invalid file path for option `-bootclasspath`: " + cp);
173173
continue;
@@ -253,7 +253,7 @@ private final JavaSourceUtilsOptions parse(Iterator<String> args) throws IOExcep
253253
if (arg.startsWith("@")) {
254254
// response file?
255255
final String responseFileName = arg.substring(1);
256-
final File responseFile = new File(responseFileName); // lgtm [java/path-injection-local] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
256+
final File responseFile = new File(responseFileName); // CodeQL [SM00697] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
257257
if (responseFile.exists()) {
258258
final Iterator<String> lines =
259259
Files.readAllLines(responseFile.toPath())
@@ -267,7 +267,7 @@ private final JavaSourceUtilsOptions parse(Iterator<String> args) throws IOExcep
267267
break;
268268
}
269269
}
270-
final File file = new File(arg); // lgtm [java/path-injection-local] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
270+
final File file = new File(arg); // CodeQL [SM00697] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
271271
if (!file.exists()) {
272272
System.err.println(App.APP_NAME + ": warning: invalid file path for option `FILES`: " + arg);
273273
break;
@@ -347,7 +347,7 @@ static File getNextOptionFile(final Iterator<String> args, final String option)
347347
throw new IllegalArgumentException(
348348
"Expected required value for option `" + option + "`.");
349349
final String fileName = args.next();
350-
final File file = new File(fileName); // lgtm [java/path-injection-local] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
350+
final File file = new File(fileName); // CodeQL [SM00697] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
351351
if (!file.exists()) {
352352
System.err.println(App.APP_NAME + ": warning: invalid file path for option `" + option + "`: " + fileName);
353353
return null;

tools/java-source-utils/src/main/java/com/microsoft/android/JavadocXmlGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public JavadocXmlGenerator(final String output) throws FileNotFoundException, Pa
3939
if (output == null)
4040
this.output = System.out;
4141
else {
42-
final File file = new File(output); // lgtm [java/path-injection-local] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
42+
final File file = new File(output); // CodeQL [SM00697] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
4343
final File parent = file.getParentFile();
4444
if (parent != null) {
4545
parent.mkdirs();
@@ -86,7 +86,7 @@ public final void writeCopyrightInfo(final File copyright, final String urlPrefi
8686
final Element blurb = document.createElement("copyright");
8787
final NodeList contents = readXmlFile(copyright);
8888
if (contents == null) {
89-
final byte[] data = Files.readAllBytes(copyright.toPath());
89+
final byte[] data = Files.readAllBytes(copyright.toPath()); // CodeQL [SM00697] java-source-utils.jar is a command-line app, and is useless if it doesn't support command-line args.
9090
blurb.appendChild(document.createCDATASection(new String(data, StandardCharsets.UTF_8)));
9191
} else {
9292
final int len = contents.getLength();

0 commit comments

Comments
 (0)