Hello,
The java.io.File.toURL() method is now deprecated
(http://download.oracle.com/javase/6/docs/api/java/io/File.html#toURL%28%29).
The java compiler generates that kind of warnings :
warning: [deprecation] toURL() in java.io.File has been deprecated
ConverterInfoReader cirPlugin = new
ConverterInfoReader(pluginJar.toURL().toString(), false);
The attached patch replaces a call to File.toURL() by a call to
File.toURI() followed by a call to URI.toURL() in ActiveSyncDriver.java.
Feel free to apply whatever free software licence you want to the crazy
piece of code that comes as an attachment.
Best Regards,
Cyril Roelandt.
From 29ca4913fac8cf93ae8e08e1690fb3602fdbd61d Mon Sep 17 00:00:00 2001
From: Cyril Roelandt <tipecaml@gmail.com>
Date: Thu, 28 Apr 2011 01:02:51 +0200
Subject: [PATCH] Removing the deprecated java.io.File.toURL() method.
java.io.File.toURL() has been replaced by java.io.File.toURI().toURL().
---
.../openoffice/xmerge/util/ActiveSyncDriver.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java
b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java
index 21c6b64..2b922da 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java
@@ -100,7 +100,7 @@ public class ActiveSyncDriver {
pluginJar = new File(ooClassDir + "pexcel.jar");
}
- ConverterInfoReader cirPlugin = new ConverterInfoReader(pluginJar.toURL().toString(),
false);
+ ConverterInfoReader cirPlugin = new
ConverterInfoReader(pluginJar.toURI().toURL().toString(), false);
ConverterInfoMgr.addPlugIn(cirPlugin.getConverterInfoEnumeration());
--
1.7.3.4
Context
- [Libreoffice] [PATCH] Removing the deprecated java.io.File.toURL() method. · Cyril Roelandt
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.