-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Description:
When adding the WebUiStaticResource.java class to the project, the source file lacks explicit imports for essential classes such as java.net.URL, java.net.URI, java.net.URISyntaxException, and the constant Status.NOT_FOUND from jakarta.ws.rs.core.Response.Status. This causes compilation failures and prevents smooth integration of the file into the Trino Query UI codebase.
Steps to reproduce:
Add the provided WebUiStaticResource.java class to the io.trino.server.ui package (or equivalent).
Attempt to build the project using Maven.
Observe compilation errors related to unresolved symbols: NOT_FOUND, URL, URI, and URISyntaxException.
Expected behavior:
The source file should compile without errors, meaning all necessary imports should be clearly specified. Using fully qualified names or appropriate imports for Status.NOT_FOUND and the required Java classes will ensure seamless integration.
Actual behavior:
Compilation fails with errors like:
- cannot find symbol variable NOT_FOUND
- cannot find symbol class URL
- cannot find symbol class URI
- cannot find symbol class URISyntaxException
Suggested fix:
Add the following imports to the top of the WebUiStaticResource.java file:
import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
import jakarta.ws.rs.core.Response.Status;
And use Status.NOT_FOUND instead of NOT_FOUND directly.
Additional context:
Including these imports and adjusting usage will improve clarity, reduce developer confusion, and allow the class to integrate cleanly into the codebase without manual fixes.