Top Description Fields Constructors Methods
org.eclipse.jetty.util.resource

pack-priv final Class GraalIssue5720PathResource

extends PathResource
Class Inheritance
Imports
java.io.IOException, java.net.URI, .URISyntaxException, .URL, java.nio.file.FileSystemAlreadyExistsException, .FileSystemNotFoundException, .FileSystems, .Files, .Path, java.util.Collections, org.slf4j.Logger, .LoggerFactory

GraalVM Native-Image Path Resource.
See Also
Graal issue 5720

Field Summary

Modifier and TypeField and Description
private static final Logger
private static final String
Inherited from org.eclipse.jetty.util.resource.PathResource:
SUPPORTED_SCHEMES

Constructor Summary

AccessConstructor and Description
pack-priv
GraalIssue5720PathResource(Path path, URI uri, boolean bypassAllowedSchemeCheck)

Method Summary

Modifier and TypeMethod and Description
pack-priv static URI

Returns:

the corrected URI, or the original URI.
correctResourceURI
(URI
The URI to correct.
uri
)

Corrects any bad resource based URIs, such as those starting with resource:file:///resources!

public URI
getRealURI()

Overrides org.eclipse.jetty.util.resource.PathResource.getRealURI.

The real URI of the resource.

pack-priv static boolean

Returns:

true if affected.
isAffectedURL
(URL
The URL to check.
url
)

Checks if the given resource URL is affected by Graal issue 5720.

private static final boolean
protected URI
toUri(Path
the path to convert to URI
path
)

Overrides org.eclipse.jetty.util.resource.PathResource.toUri.

Ensure Path to URI is sane when it returns a directory reference.

Inherited from org.eclipse.jetty.util.resource.PathResource:
containsequalsexistsgetFileNamegetNamegetPathgetRealPathgetURIhashCodeisAliasisDirectoryisReadableisSameNamelastModifiedlengthlistnewResourceresolvetoString

Field Detail

LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.util.resource.PathResource.LOG.

URI_BAD_RESOURCE_PREFIXback to summary
private static final String URI_BAD_RESOURCE_PREFIX

Constructor Detail

GraalIssue5720PathResourceback to summary
pack-priv GraalIssue5720PathResource(Path path, URI uri, boolean bypassAllowedSchemeCheck)

Method Detail

correctResourceURIback to summary
pack-priv static URI correctResourceURI(URI uri)

Corrects any bad resource based URIs, such as those starting with resource:file:///resources!.

Parameters
uri:URI

The URI to correct.

Returns:URI

the corrected URI, or the original URI.

See Also
Graal issue 5720
getRealURIback to summary
public URI getRealURI()

Overrides org.eclipse.jetty.util.resource.PathResource.getRealURI.

Doc from org.eclipse.jetty.util.resource.Resource.getRealURI.

The real URI of the resource.

If this Resource is an alias, (isAlias()), this URI will be different from getURI(), and will point to the real name/location of the Resource.

Returns:URI

The real URI location of this resource.

Annotations
@Override
isAffectedURLback to summary
pack-priv static boolean isAffectedURL(URL url)

Checks if the given resource URL is affected by Graal issue 5720.

Parameters
url:URL

The URL to check.

Returns:boolean

true if affected.

isResourceSchemeback to summary
private static final boolean isResourceScheme(URI uri)
toUriback to summary
protected URI toUri(Path path)

Overrides org.eclipse.jetty.util.resource.PathResource.toUri.

Doc from org.eclipse.jetty.util.resource.PathResource.toUri.

Ensure Path to URI is sane when it returns a directory reference.

This is different than Path#toUri() in that not all FileSystems seem to put the trailing slash on a directory reference in the URI.

Parameters
path:Path

the path to convert to URI

Returns:URI

the appropriate URI for the path

Annotations
@Override