Skip to content

Commit

Permalink
Fixed: Compilation fails due to Java 11 API used on Java 8 target
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarg committed Aug 18, 2024
1 parent 552d6bc commit 6100686
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/java/com/beust/jcommander/JCommanderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

package com.beust.jcommander;

import static java.nio.charset.StandardCharsets.UTF_8;

import com.beust.jcommander.args.*;
import com.beust.jcommander.args.ArgsEnum.ChoiceType;
import com.beust.jcommander.command.CommandAdd;
Expand Down Expand Up @@ -1059,7 +1061,7 @@ class Params {
@Test
public void enabledAtSignExpansionTest() throws IOException {
final Path configFile = Files.createTempFile(null, null);
Files.writeString(configFile, "-fromFile");
Files.write(configFile, "-fromFile".getBytes(UTF_8));
try {
class Params {
@Parameter(names = {"-username"})
Expand Down

0 comments on commit 6100686

Please sign in to comment.