Skip to content

Missing imports in WebUiStaticResource.java cause compilation errors and hinder integration #15

@iilrgmv

Description

@iilrgmv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions