Use toURI().toURL() instead of the deprecated method toURL()
This commit is contained in:
@@ -4508,7 +4508,7 @@ public abstract class EpubMojo
|
|||||||
// new Float(.8));
|
// new Float(.8));
|
||||||
|
|
||||||
// Create the transcoder input.
|
// Create the transcoder input.
|
||||||
String svgURI = new File("/Users/nare4013/epub/rackspace-template/rackspace-template/target/docbkx/images/cloud/cover.svg").toURL().toString();
|
String svgURI = new File("/Users/nare4013/epub/rackspace-template/rackspace-template/target/docbkx/images/cloud/cover.svg").toURI().toURL().toString();
|
||||||
TranscoderInput input = new TranscoderInput(svgURI);
|
TranscoderInput input = new TranscoderInput(svgURI);
|
||||||
|
|
||||||
// Create the transcoder output.
|
// Create the transcoder output.
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ public abstract class PDFMojo extends AbstractFoMojo {
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String baseURL = sourceDirectory.toURL().toExternalForm();
|
String baseURL = sourceDirectory.toURI().toURL().toExternalForm();
|
||||||
baseURL = baseURL.replace("file:/", "file:///");
|
baseURL = baseURL.replace("file:/", "file:///");
|
||||||
|
|
||||||
userAgent.setBaseURL(baseURL);
|
userAgent.setBaseURL(baseURL);
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ public class PDFBuilder {
|
|||||||
File targetPdfFile = null;
|
File targetPdfFile = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String baseURL = sourceDirectory.toURL().toExternalForm();
|
String baseURL = sourceDirectory.toURI().toURL().toExternalForm();
|
||||||
baseURL = baseURL.replace("file:/", "file:///");
|
baseURL = baseURL.replace("file:/", "file:///");
|
||||||
|
|
||||||
userAgent.setBaseURL(baseURL);
|
userAgent.setBaseURL(baseURL);
|
||||||
@@ -335,7 +335,7 @@ public class PDFBuilder {
|
|||||||
public void adjustTransformer(Transformer transformer, String sourceFilename, File targetFile) {
|
public void adjustTransformer(Transformer transformer, String sourceFilename, File targetFile) {
|
||||||
String baseUrl;
|
String baseUrl;
|
||||||
try {
|
try {
|
||||||
final String str = (new File(sourceFilename)).getParentFile().toURL().toExternalForm();
|
final String str = (new File(sourceFilename)).getParentFile().toURI().toURL().toExternalForm();
|
||||||
baseUrl = str.replace("file:/", "file:///");
|
baseUrl = str.replace("file:/", "file:///");
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
getLog().warn("Failed to get FO basedir", e);
|
getLog().warn("Failed to get FO basedir", e);
|
||||||
@@ -1000,7 +1000,7 @@ public class PDFBuilder {
|
|||||||
if (getStylesheetLocation().startsWith("http://")) {
|
if (getStylesheetLocation().startsWith("http://")) {
|
||||||
return new URL(getStylesheetLocation());
|
return new URL(getStylesheetLocation());
|
||||||
}
|
}
|
||||||
return new File(getStylesheetLocation()).toURL();
|
return new File(getStylesheetLocation()).toURI().toURL();
|
||||||
} catch (MalformedURLException mue) {
|
} catch (MalformedURLException mue) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user