This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 79012 - UnsupportedOperationException when using code assist in a for loop to surround with try catch
Summary: UnsupportedOperationException when using code assist in a for loop to surroun...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-24 04:17 UTC by jar
Modified: 2008-02-25 16:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log messages (214.19 KB, text/plain)
2006-06-24 04:18 UTC, jar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jar 2006-06-24 04:17:44 UTC
The following code causes an UnsupportedOperationException when using alt-enter
to insert a try-catch block at the for loop:

    public List breaks(String results){
        try {
            FileReader fr = new FileReader(results);
            BufferedReader in = new BufferedReader(fr);
            
            for(String fileLoc = in.readLine(); fileLoc != null; fileLoc =
in.readLine()){ //Surround with try-catch here causes the exception
                
            }
        } catch (FileNotFoundException ex) {
            ex.printStackTrace();
        }
    }
Comment 1 jar 2006-06-24 04:18:31 UTC
Created attachment 31352 [details]
log messages
Comment 2 Quality Engineering 2007-09-20 10:41:42 UTC
Reorganization of java component
Comment 3 Jan Becicka 2008-02-25 16:09:57 UTC
This issue is not valid in current builds any more. Java support was completely
redesigned in 6.0 time frame. Please use NetBeans 6.0 and later.