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.

View | Details | Raw Unified | Return to bug 33856
Collapse All | Expand All

(-)FullTextType.java (-2 / +25 lines)
Lines 99-104 Link Here
99
    /**
99
    /**
100
     */
100
     */
101
    public boolean testDataObject(DataObject dobj) {
101
    public boolean testDataObject(DataObject dobj) {
102
        InputStream is = null;
103
        LineNumberReader reader = null;
102
        try {
104
        try {
103
            String line = ""; //NOI18N
105
            String line = ""; //NOI18N
104
            boolean hit = false;
106
            boolean hit = false;
Lines 109-116 Link Here
109
                return false;
111
                return false;
110
            }
112
            }
111
            // primary file content
113
            // primary file content
112
            InputStream is = fo.getInputStream();
114
            is = fo.getInputStream();
113
            LineNumberReader reader = new LineNumberReader(new InputStreamReader(is));
115
            reader = new LineNumberReader(new InputStreamReader(is));
114
116
115
            TextDetail detail = null;
117
            TextDetail detail = null;
116
118
Lines 161-166 Link Here
161
        } catch (IOException ioe) {
163
        } catch (IOException ioe) {
162
            org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.INFORMATIONAL, ioe);
164
            org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.INFORMATIONAL, ioe);
163
            return false;
165
            return false;
166
        } finally {
167
            if (reader != null) {
168
                try {
169
                    reader.close();
170
                    reader = null;
171
                    is = null;  //marks that the InputStream is closed
172
                } catch (IOException ex) {
173
                    org.openide.ErrorManager.getDefault().notify(
174
                            org.openide.ErrorManager.INFORMATIONAL, ex);
175
                    
176
                }
177
            }
178
            if (is != null) {
179
                try {
180
                    is.close();
181
                    is = null;
182
                } catch (IOException ex) {
183
                    org.openide.ErrorManager.getDefault().notify(
184
                            org.openide.ErrorManager.INFORMATIONAL, ex);
185
                }
186
            }
164
        }
187
        }
165
    }
188
    }
166
    
189
    

Return to bug 33856