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 199211 - Recent Searches Parsing Exception
Summary: Recent Searches Parsing Exception
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Quick Search (show other bugs)
Version: 7.0
Hardware: PC All
: P3 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
: 196807 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-06 19:09 UTC by simpatico
Modified: 2011-06-14 04:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Changes marshalling and unmarshalling (didn't test it) (2.38 KB, patch)
2011-06-06 19:09 UTC, simpatico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description simpatico 2011-06-06 19:09:11 UTC
Created attachment 108767 [details]
Changes marshalling and unmarshalling (didn't test it)

The issue is simply that that recent search items are serialized as "displayName;timestamp,".
Now consider:
Coat - Simple English Wikipedia, the free encyclopedia:1307382521669,Category:Companies listed on the New York Stock Exchange - Simple English Wikipedia,

On the 2nd entry it will attempt to parse 'Category'. It's much more predictable and convienent to reverse the order instead (patch attached).



java.lang.NumberFormatException: For input string: "Companies listed on the New York Stock Exchange - Simple English Wikipedia"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Long.parseLong(Long.java:410)
	at java.lang.Long.parseLong(Long.java:468)
	at org.netbeans.modules.quicksearch.recent.RecentSearches.readRecentFromPrefs(RecentSearches.java:143)
	at org.netbeans.modules.quicksearch.recent.RecentSearches.<init>(RecentSearches.java:84)
	at org.netbeans.modules.quicksearch.recent.RecentSearches.getDefault(RecentSearches.java:89)
	at org.netbeans.modules.quicksearch.recent.RecentProvider.evaluate(RecentProvider.java:59)
	at org.netbeans.modules.quicksearch.CommandEvaluator$1.run(CommandEvaluator.java:207)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:422)
	at org.netbeans.modules.quicksearch.CommandEvaluator.runEvaluation(CommandEvaluator.java:204)
	at org.netbeans.modules.quicksearch.CommandEvaluator.evaluate(CommandEvaluator.java:103)
	at org.netbeans.modules.quicksearch.QuickSearchPopup.actionPerformed(QuickSearchPopup.java:171)
	at javax.swing.Timer.fireActionPerformed(Timer.java:291)
[catch] at javax.swing.Timer$DoPostEvent.run(Timer.java:221)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:678)
	at java.awt.EventQueue.access$000(EventQueue.java:86)
	at java.awt.EventQueue$1.run(EventQueue.java:639)
	at java.awt.EventQueue$1.run(EventQueue.java:637)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:648)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 Jan Becicka 2011-06-10 13:18:23 UTC
*** Bug 196807 has been marked as a duplicate of this bug. ***
Comment 2 Quality Engineering 2011-06-12 14:23:17 UTC
Integrated into 'main-golden', will be available in build *201106120600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1fd1576a818a
User: Jan Becicka <jbecicka@netbeans.org>
Log: Hudson Extension Installer
Issue #199211 - Recent Searches Parsing Exception
Comment 3 Quality Engineering 2011-06-14 04:59:43 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/c9c6d4b4db8d
User: Jan Becicka <jbecicka@netbeans.org>
Log: Hudson Extension Installer
Issue #199211 - Recent Searches Parsing Exception
(transplanted from 1fd1576a818a5efa0c055809bd98a7cd55f64d2f)