What steps will reproduce the problem? 1. add a torrent with a space in front of the name ie. " music.torrent"
What is the expected output? It should load and start.
What do you see instead? Nothing.
Comment #1
Posted on Mar 28, 2008 by Swift Kangaroo(No comment was entered for this change.)
Comment #2
Posted on Mar 31, 2008 by Swift KangarooComment deleted
Comment #3
Posted on Mar 31, 2008 by Swift Kangaroocongratulations, i think you have found a bug in java.
ok, heres my test setup. i created the files " music.torrent" and "music .torrent" to test with spaces.
and in the add torrent procedure i've added a simple printout on the paths of these files as they are submitted to the procedure. if i select the file " music.torrent" and press add, the output is: /home/netbrain/music.torrent, where the space has been omitted. Why?
and then i tried with the other torrent where the output was: /home/netbrain/music .torrent, worked great, and this is were it gets interesting :)
i then multiselect both files and get the output: /home/netbrain/ music.torrent /home/netbrain/music .torrent
So the only thing i can conclude from this is that there is something wrong with java. not nTorrent. It seems that with a single file selection the space is omitted by JFileChooser (only works on files with a space as the first char in their name). but if i select multiple files the space is included.
Here's a code you can test it out for yourself.
import java.io.File; import javax.swing.JFileChooser;
/** * This class demonstrates a bug in java where if a file " file1" ( * with a single space as a prefix) and "file2" exists in the system. * Then with a single selection of " file1" will actually give a path to "file1" * (without a single space as a prefix), but if you select both " file1" and "file2", * then JFileChooser will result in the correct and valid files. */ public class JFileChooserBugDemo { public static void main(String[] args) { JFileChooser chooser = new JFileChooser(); chooser.setMultiSelectionEnabled(true); int result = chooser.showOpenDialog(null); if(result == JFileChooser.APPROVE_OPTION){ for(File f : chooser.getSelectedFiles()){ System.out.println(f); } } }
}
Comment #4
Posted on Mar 31, 2008 by Happy MonkeyInteresting :)
I think you should submit it to the java people.
Comment #5
Posted on Mar 31, 2008 by Swift KangarooSubmitted a bug report to sun. waiting for their response.
Dear Java Developer,
Thank you for your interest in improving the quality of Java Technology.
Your report has been assigned an internal review ID of 1219467, which is NOT visible on the Sun Developer Network (SDN).
Please be aware that the large volume of reports we receive sometimes prevents us from responding individually to each message.
If the information is determined to be a new Bug or RFE, or a duplicate of a known Bug or RFE, you will receive a followup email containing a seven digit bug number. You may search for, view, or vote for this bug in the Bug Database at http://bugs.sun.com/.
Comment #6
Posted on Apr 7, 2008 by Swift KangarooHi Kim Eik,
Thank you for reporting this issue.
We have determined that this report is a new bug and entered the bug into our internal bug tracking system under Bug Id: 6684955.
You can monitor this bug on the Java Bug Database at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6684955.
It may take a day or two before your bug shows up in this external database. If you are a member of the Sun Developer Network (SDN), there are two additional options once the bug is visible.
Voting for the bug Click http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6684955.
Adding the report to your Bug Watch list. You will receive an email notification when this bug is updated. Click http://bugs.sun.com/bugdatabase/addBugWatch.do?bug_id=6684955.
You may also consider contributing your own solution to OpenJDK project (openjdk.dev.java.net)
Regards, Igor
Comment #7
Posted on Sep 14, 2008 by Swift KangarooStatus: Blocked
Labels:
Type-Defect
Priority-Medium
Milestone-Release0.5