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 271086 - Maven indexer uses deprecated Thread.stop when "hard stop" is requested
Summary: Maven indexer uses deprecated Thread.stop when "hard stop" is requested
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-13 12:30 UTC by kalle1
Modified: 2017-07-13 12:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kalle1 2017-07-13 12:30:46 UTC
`Thread.stop` is deprecated in favour of a periodic check of a boolean stop condition. It shouldn't be used.

```
WARNING [org.netbeans.modules.maven.indexer.OnStop]: ...hard stop required.
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.maven.indexer.OnStop
java.lang.UnsupportedOperationException
	at java.lang.Thread.stop(Thread.java:872)
	at org.netbeans.modules.maven.indexer.OnStop.run(OnStop.java:67)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:420)
	at org.netbeans.core.startup.NbStartStop.startClose(NbStartStop.java:142)
	at org.netbeans.core.startup.NbInstaller.closeAsync(NbInstaller.java:728)
	at org.netbeans.ModuleManager.shutDownAsync(ModuleManager.java:2204)
	at org.netbeans.core.startup.ModuleSystem.shutDownAsync(ModuleSystem.java:349)
	at org.netbeans.core.NbLifeExit.doExit(NbLifeExit.java:137)
	at org.netbeans.core.NbLifeExit.run(NbLifeExit.java:94)
	at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:118)
	at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:93)
	at org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:89)
	at org.openide.util.Mutex.readAccess(Mutex.java:260)
	at org.netbeans.core.NbLifecycleManager.exit(NbLifecycleManager.java:213)
	at org.netbeans.core.NbLifecycleManager.exit(NbLifecycleManager.java:119)
	at org.netbeans.core.windows.view.ui.MainWindow$9.windowClosing(MainWindow.java:546)
	at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
	at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
	at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349)
	at java.awt.Window.processWindowEvent(Window.java:2054)
	at javax.swing.JFrame.processWindowEvent(JFrame.java:305)
	at java.awt.Window.processEvent(Window.java:2013)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
```

experienced with 201707050001