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 207658 - IllegalStateException: getInputStream invoked in AWT
Summary: IllegalStateException: getInputStream invoked in AWT
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 206311
  Show dependency tree
 
Reported: 2012-01-24 05:13 UTC by Petr Cyhelsky
Modified: 2012-01-26 16:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 184691


Attachments
stacktrace (6.70 KB, text/plain)
2012-01-24 05:13 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2012-01-24 05:13:20 UTC
Build: NetBeans IDE Dev (Build 20120118-ab16ccd545a5)
VM: OpenJDK 64-Bit Server VM, 20.0-b11, OpenJDK Runtime Environment, 1.6.0_22-b22
OS: Linux

User Comments:
cyhelsky: on typing into the xml file




Stacktrace: 
java.lang.IllegalStateException: getInputStream invoked in AWT
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:219)
   at org.openide.filesystems.MIMESupport$CachedFileObject.getInputStream(MIMESupport.java:402)
   at org.netbeans.modules.openide.filesystems.declmime.MIMEResolverImpl$Type.accept(MIMEResolverImpl.java:1063)
   at org.netbeans.modules.openide.filesystems.declmime.MIMEResolverImpl$Type.access$2900(MIMEResolverImpl.java:729)
   at org.netbeans.modules.openide.filesystems.declmime.MIMEResolverImpl$FileElement.resolve(MIMEResolverImpl.java:689)
   at org.netbeans.modules.openide.filesystems.declmime.MIMEResolverImpl$FileElement.access$800(MIMEResolverImpl.java:660)
Comment 1 Petr Cyhelsky 2012-01-24 05:13:28 UTC
Created attachment 115179 [details]
stacktrace
Comment 2 Jaroslav Tulach 2012-01-24 10:16:12 UTC
The method FileUtil.getMIMEType needs to open a stream from time to time (which can possibly be eliminated by specifying the extensions one is searching for). If the call has to be done outside of AWT, then it has to be rescheduled on the caller side: org.netbeans.modules.java.hints.infrastructure.HintAction.getCurrentFile(:167)
Comment 3 Jan Lahoda 2012-01-25 09:50:13 UTC
http://hg.netbeans.org/jet-main/rev/cb9167206cc5
Comment 4 Quality Engineering 2012-01-26 16:10:22 UTC
Integrated into 'main-golden', will be available in build *201201260600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/cb9167206cc5
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #207658: safer to user editor APIs than filesystems.