From: Scott S. <sco...@ya...> - 2005-04-29 15:43:48
|
richard, have you had any problems running the abbot.swt tests? i ran into a bug in DecorationsTracker where, it thinks it is a Singleton, but isn't: it keeps creating a new DecorationsTracker, and new Timer thread each time you call getTracker(Display). i went to check it in and ran the abbot.swt tests from eclipse as a junit-plugin test. i had sync'd to head but hadn't made any changes. it got through 57/205 tests with 3/errors and 14/failures before it hung. are there any tricks, here, that i am missing. best regards, scott BTW: thanks, for highlighting the use of an eclipse-enabled build. ENVIRONMENT: SDK: sun 1.5.0 b64 but have the workspace compiler settings set to the 1.4 defaults. XP, 3.1M5a DecorationsTracker PATCH: <patch> Index: DecorationsTracker.java =================================================================== RCS file: /cvsroot/abbot/abbot.swt/src/abbot/tester/swt/DecorationsTracker.java,v retrieving revision 1.3 diff -u -r1.3 DecorationsTracker.java --- DecorationsTracker.java 13 Aug 2004 20:51:29 -0000 1.3 +++ DecorationsTracker.java 29 Apr 2005 15:26:03 -0000 @@ -58,12 +58,15 @@ }; private static DecorationsTracker tracker = null; - /** Only ever want one of these for a given Display */ - public static synchronized DecorationsTracker getTracker(Display display) { - if (trackers.containsKey(display)) - return (DecorationsTracker)trackers.get(display); - else return new DecorationsTracker(display); - } + /** Only ever want one of these for a given Display */ + public static synchronized DecorationsTracker getTracker(Display display) { + DecorationsTracker tracker = (DecorationsTracker)trackers.get(display); + if (tracker == null) { + tracker = new DecorationsTracker(display); + trackers.put(display,tracker); + } + return tracker; + } /** Create an instance of DecorationsTracker which will track all windows * coming and going on the current and subsequent app contexts. </patch> --- Richard Birenheide <rbi...@us...> wrote: > Update of > /cvsroot/abbot/abbot.swt/src/abbot/tester/swt > In directory > > Modified Files: DecorationsTester.java __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |