[Japi-cvs] SF.net SVN: japi:[746] progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/ swing/io
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2008-12-27 03:27:51
|
Revision: 746
http://japi.svn.sourceforge.net/japi/?rev=746&view=rev
Author: christianhujer
Date: 2008-12-27 03:27:49 +0000 (Sat, 27 Dec 2008)
Log Message:
-----------
Replaced deprecated code with its suggested alternative (File.toURL() -> File.toURI().toURL()).
Modified Paths:
--------------
libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java
progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/ImporterFileFilter.java
Modified: libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java
===================================================================
--- libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java 2008-12-27 03:27:26 UTC (rev 745)
+++ libs/swing-bookmarks/trunk/src/prj/net/sf/japi/swing/bookmarks/BookmarkManager.java 2008-12-27 03:27:49 UTC (rev 746)
@@ -209,7 +209,7 @@
* @throws SAXException in case of XML document problems
*/
public void load() throws IOException, ParserConfigurationException, SAXException {
- load(new File(System.getProperty("user.home"), ".jeduca.bookmarks.xml").toURL().toString());
+ load(new File(System.getProperty("user.home"), ".jeduca.bookmarks.xml").toURI().toURL().toString());
}
/** Save bookmarks to default file.
@@ -217,7 +217,7 @@
* @throws ParserConfigurationException in case of XML configuration problems
*/
public void save() throws IOException, ParserConfigurationException {
- save(new File(System.getProperty("user.home"), ".jeduca.bookmarks.xml").toURL().toString());
+ save(new File(System.getProperty("user.home"), ".jeduca.bookmarks.xml").toURI().toURL().toString());
}
/** Save bookmarks to a file.
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java 2008-12-27 03:27:26 UTC (rev 745)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/OpenURLPane.java 2008-12-27 03:27:49 UTC (rev 746)
@@ -236,7 +236,7 @@
if (res == JFileChooser.CANCEL_OPTION) {
} else if (res == JFileChooser.APPROVE_OPTION) {
try {
- input.setText(fileChooser.getSelectedFile().toURL().toString());
+ input.setText(fileChooser.getSelectedFile().toURI().toURL().toString());
} catch (MalformedURLException e) {
JOptionPane.showMessageDialog(this, e, "Interner Fehler", JOptionPane.ERROR_MESSAGE);
}
Modified: progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/ImporterFileFilter.java
===================================================================
--- progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/ImporterFileFilter.java 2008-12-27 03:27:26 UTC (rev 745)
+++ progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/io/ImporterFileFilter.java 2008-12-27 03:27:49 UTC (rev 746)
@@ -70,7 +70,7 @@
boolean accept = f.isDirectory();
try {
if (!accept) {
- accept = importer.canLoad(f.toURL().toString());
+ accept = importer.canLoad(f.toURI().toURL().toString());
}
} catch (MalformedURLException e) {
System.err.println(e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|