beermix / ntorrent

Automatically exported from code.google.com/p/ntorrent
GNU General Public License v3.0
0 stars 0 forks source link

torrent file does not load #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by in.incog...@gmail.com on 28 Mar 2008 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by kei...@gmail.com on 28 Mar 2008 at 8:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
congratulations, 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);
            }
        }
    }

}

Original comment by kei...@gmail.com on 31 Mar 2008 at 12:20

GoogleCodeExporter commented 9 years ago
Interesting :)

I think you should submit it to the java people.

Original comment by in.incog...@gmail.com on 31 Mar 2008 at 12:25

GoogleCodeExporter commented 9 years ago
Submitted 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/.

Original comment by kei...@gmail.com on 31 Mar 2008 at 12:32

GoogleCodeExporter commented 9 years ago
Hi 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.

1. Voting for the bug
   Click http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6684955.

2. 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

Original comment by kei...@gmail.com on 7 Apr 2008 at 11:49

GoogleCodeExporter commented 9 years ago
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6351074

Original comment by kei...@gmail.com on 14 Sep 2008 at 8:42