Skip to content
Merged
Show file tree
Hide file tree
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 @@ -21,7 +21,7 @@
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringReader;
import java.io.Reader;
import java.nio.charset.StandardCharsets;

public class MultiReadHttpServletRequest
Expand Down Expand Up @@ -87,6 +87,6 @@ public int read(byte[] b)
public BufferedReader getReader()
throws IOException
{
return new BufferedReader(new StringReader(new String(content, StandardCharsets.UTF_8)));
return new BufferedReader(Reader.of(new String(content, StandardCharsets.UTF_8)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.io.Reader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
Expand Down Expand Up @@ -526,7 +526,7 @@ uno as (SELECT c1 FROM dos)
TrinoQueryProperties trinoQueryPropertiesWithDefaults = getTrinoQueryProps(mockRequestNoDefaults);
Set<QualifiedName> tablesWithDefaults = trinoQueryPropertiesWithDefaults.getTables();
assertThat(tablesWithDefaults).containsExactly(QualifiedName.of("cat", "schem", "tbl1"));
when(mockRequestNoDefaults.getReader()).thenReturn(new BufferedReader(new StringReader(query)));
when(mockRequestNoDefaults.getReader()).thenReturn(new BufferedReader(Reader.of(query)));

TrinoQueryProperties trinoQueryPropertiesNoDefaults = (TrinoQueryProperties) mockRequestNoDefaults.getAttribute(TRINO_QUERY_PROPERTIES);
Set<QualifiedName> tablesNoDefaults = trinoQueryPropertiesNoDefaults.getTables();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.io.Reader;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -118,7 +118,7 @@ public int read()
}
});

when(mockRequest.getReader()).thenReturn(new BufferedReader(new StringReader(query)));
when(mockRequest.getReader()).thenReturn(new BufferedReader(Reader.of(query)));
when(mockRequest.getQueryString()).thenReturn("");
return this;
}
Expand Down
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<air.java.version>25.0.0</air.java.version>
<air.check.skip-spotbugs>true</air.check.skip-spotbugs>
<air.check.skip-pmd>true</air.check.skip-pmd>
<air.modernizer.java-version>8</air.modernizer.java-version>
<air.modernizer.java-version>25</air.modernizer.java-version>
<air.release.preparation-goals>clean verify -DskipTests</air.release.preparation-goals>
</properties>

Expand Down Expand Up @@ -101,6 +101,17 @@

<build>
<plugins>
<plugin>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<configuration>
<exclusions>
<!-- Modernizer emits false-positive warnings even when presence is guaranteed -->
<exclusion>java/util/Optional.get:()Ljava/lang/Object;</exclusion>
</exclusions>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down