Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-kraemer committed Oct 31, 2022
1 parent 7102f83 commit c429b67
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.ArrayList;
Expand Down Expand Up @@ -154,7 +153,7 @@ private void mainLoop(LineReader reader, PrintWriter cout) throws IOException {

Command cmd;
try {
cmd = cmdClass.newInstance();
cmd = cmdClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
// should never happen
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void complete(LineReader reader, ParsedLine line, List<Candidate> candida
Completer.class.isAssignableFrom(pr.getLastCommand())) {
Completer cc;
try {
cc = (Completer)pr.getLastCommand().newInstance();
cc = (Completer)pr.getLastCommand().getDeclaredConstructor().newInstance();
} catch (Exception e) {
// should never happen
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public int doRun(String[] remainingArgs, InputReader in, PrintWriter out)
CSLToolCommand cmd = null;
if (cmdClass != null) {
try {
cmd = (CSLToolCommand)cmdClass.newInstance();
cmd = (CSLToolCommand)cmdClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
// should never happen
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class PageRange {
* Constructs a range of pages
* @param literal the string from which this range has been created
* @param pageFirst the first page in the range (can be {@code null})
* @param pageLast the last page in the range (can be {@code null})
* @param numberOfPages the number of pages in this range (can be {@code null})
* @param multiplePages {@code true} if this object represents multiple
* pages (may be {@code true} even if the actual {@code numberOfPages}
Expand Down

0 comments on commit c429b67

Please sign in to comment.