From fbrunnerlist at gmx.ch Sat Sep 1 15:25:41 2007 From: fbrunnerlist at gmx.ch (Florian Brunner) Date: Sat, 01 Sep 2007 17:25:41 +0200 Subject: 6179357: Request interface javax.swing.tree.TreeModel to have a generic type for nodes In-Reply-To: <46D2CB3E.6000900@sun.com> References: <200708262033.16074.fbrunnerlist@gmx.ch> <46D2CB3E.6000900@sun.com> Message-ID: <46D98475.5060707@gmx.ch> Hi Alecander! Thanks for your help. I installed the basic environment and started to work on this issue. Note that the path at https://openjdk.dev.java.net/source/browse/openjdk/ as well as at https://openjdk.dev.java.net/servlets/ProjectSource don't seem to be correct! At |https://openjdk.dev.java.net/svn/openjdk/trunk there's only a www directory! Instead I checked out https://openjdk.dev.java.net/svn/openjdk/jdk/trunk/j2se/ Is this the correct path to work on the Swing project? I'will post to this list again when there are more news or questions arise. -Florian |Alexander Potochkin schrieb: > > Hello Florian > > Welcome to the swing-dev > > The RFE #6179357 is definitely worth investigating > we was going to generify Swing for 1.6 > but unfortunately didn't have enough time > > Your fixes are welcome > > Here is the information how to contribute: > http://openjdk.java.net/contribute/ > > For now the process is: > > Become a contributor > download openJDK > make the fix > ask any related questions on this list > submit a patch > we'll assign a sponsor who we'll review your fix > and put it back when it is done > > The whole process will be simplified when we complete moving to > Mercurial repository > > For this RFE you don't need to file JSR > as you mentioned changes should as backward compatible as possible > > but we'll need the request to the special committee which keeps track > of the Java public API, the sponsor will do it for you > > Please note that we prefer to make the incremental fixes which fix the > particular problem, I mean, not to mix e.g. generifying and optimization > in one fix but split it to two ones. > > >I want my > > progress to be visible by the public. So what is the best strategy? > Work at > > openjdk.org? Work at SwingLabs? Start a new project at java.net? > > The current process doesn't seem to provide much visibility for the > public. To make it visible I personally would do the following things: > > - start a project on java.net > (not sure it helps for this particular case) > - blog about your progress and discuss it with the community > (this is the best way to make your work visible) > > Thanks > alexp > > >> Hi, >> >> I'm interessted in the RFE "6179357: Request interface >> javax.swing.tree.TreeModel to have a generic type for nodes". Is >> there already someone working on this issue? If not I would like to >> help there. >> >> I want to address following issues: >> - add generics support to the Swing framework >> - provide support for new language features like varargs >> - provide better support for the collection framework >> - optimize code where reasonable >> >> Do you think this is a good idea? How probable will such a change >> make its way to the "official" jdk? >> I sent the signed SCA to Sun. So what would be the next steps? I want >> my progress to be visible by the public. So what is the best >> strategy? Work at openjdk.org? Work at SwingLabs? Start a new project >> at java.net? >> >> Should I work on a branch of openjdk? Or should I copy the current >> revision to a new repository? What is the easiest/ best way to get >> the source back to openjdk? >> >> Is a JSR needed for such a change? Note: the suggested changes should >> be backwards compatible (eg. thanks to the "raw type feature" of >> generics), as far as I can see up to now. (The only exception is of >> course reflection, which can always break if you change an API). >> Thanks for your help. >> >> -Florian > From fbrunnerlist at gmx.ch Sat Sep 1 18:48:28 2007 From: fbrunnerlist at gmx.ch (Florian Brunner) Date: Sat, 01 Sep 2007 20:48:28 +0200 Subject: @version conventions Message-ID: <46D9B3FC.9020401@gmx.ch> Hi, what are the conventions for the @version tag? How do you increment versions? What is the used date format? Thanks. -Florian From fbrunnerlist at gmx.ch Sat Sep 1 20:05:26 2007 From: fbrunnerlist at gmx.ch (Florian Brunner) Date: Sat, 01 Sep 2007 22:05:26 +0200 Subject: 6179357-related: Working on warnings removal In-Reply-To: <46D98475.5060707@gmx.ch> References: <200708262033.16074.fbrunnerlist@gmx.ch> <46D2CB3E.6000900@sun.com> <46D98475.5060707@gmx.ch> Message-ID: <46D9C606.7060507@gmx.ch> Hi, I decided first to remove some warning for trivial cases, since even if I compile with -Xlint:-serial -Xlint:-deprecation -Xlint:-cast -Xlint:-fallthrough -Xmaxwarns 1200 I get 977 warnings! And since most of them are [unckecked] warnings, it's hard to see, if and where I introduce new [unckecked] warnings, when adding generics. Please tell me if somebody else is working on the warnings removal, too. -Florian Florian Brunner schrieb: > Hi Alecander! > > Thanks for your help. I installed the basic environment and started to > work on this issue. > > Note that the path at > > https://openjdk.dev.java.net/source/browse/openjdk/ > > as well as at > > https://openjdk.dev.java.net/servlets/ProjectSource > > don't seem to be correct! > > At > |https://openjdk.dev.java.net/svn/openjdk/trunk > > there's only a www directory! > > Instead I checked out > > https://openjdk.dev.java.net/svn/openjdk/jdk/trunk/j2se/ > > Is this the correct path to work on the Swing project? > > I'will post to this list again when there are more news or questions > arise. > > -Florian > > |Alexander Potochkin schrieb: >> >> Hello Florian >> >> Welcome to the swing-dev >> >> The RFE #6179357 is definitely worth investigating >> we was going to generify Swing for 1.6 >> but unfortunately didn't have enough time >> >> Your fixes are welcome >> >> Here is the information how to contribute: >> http://openjdk.java.net/contribute/ >> >> For now the process is: >> >> Become a contributor >> download openJDK >> make the fix >> ask any related questions on this list >> submit a patch >> we'll assign a sponsor who we'll review your fix >> and put it back when it is done >> >> The whole process will be simplified when we complete moving to >> Mercurial repository >> >> For this RFE you don't need to file JSR >> as you mentioned changes should as backward compatible as possible >> >> but we'll need the request to the special committee which keeps track >> of the Java public API, the sponsor will do it for you >> >> Please note that we prefer to make the incremental fixes which fix >> the particular problem, I mean, not to mix e.g. generifying and >> optimization >> in one fix but split it to two ones. >> >> >I want my >> > progress to be visible by the public. So what is the best strategy? >> Work at >> > openjdk.org? Work at SwingLabs? Start a new project at java.net? >> >> The current process doesn't seem to provide much visibility for the >> public. To make it visible I personally would do the following things: >> >> - start a project on java.net >> (not sure it helps for this particular case) >> - blog about your progress and discuss it with the community >> (this is the best way to make your work visible) >> >> Thanks >> alexp >> >> >>> Hi, >>> >>> I'm interessted in the RFE "6179357: Request interface >>> javax.swing.tree.TreeModel to have a generic type for nodes". Is >>> there already someone working on this issue? If not I would like to >>> help there. >>> >>> I want to address following issues: >>> - add generics support to the Swing framework >>> - provide support for new language features like varargs >>> - provide better support for the collection framework >>> - optimize code where reasonable >>> >>> Do you think this is a good idea? How probable will such a change >>> make its way to the "official" jdk? >>> I sent the signed SCA to Sun. So what would be the next steps? I >>> want my progress to be visible by the public. So what is the best >>> strategy? Work at openjdk.org? Work at SwingLabs? Start a new >>> project at java.net? >>> >>> Should I work on a branch of openjdk? Or should I copy the current >>> revision to a new repository? What is the easiest/ best way to get >>> the source back to openjdk? >>> >>> Is a JSR needed for such a change? Note: the suggested changes >>> should be backwards compatible (eg. thanks to the "raw type feature" >>> of generics), as far as I can see up to now. (The only exception is >>> of course reflection, which can always break if you change an API). >>> Thanks for your help. >>> >>> -Florian >> > From fbrunnerlist at gmx.ch Sun Sep 2 01:10:24 2007 From: fbrunnerlist at gmx.ch (Florian Brunner) Date: Sun, 02 Sep 2007 03:10:24 +0200 Subject: jtreg Message-ID: <46DA0D80.4040401@gmx.ch> Hi, running the jtreg tests on the Swing project results in: "You must define jtreg.tests to select some tests to run." Are there any jtreg tests for the Swing project? What should be the value of jtreg.tests? -Florian From Richard.Bair at Sun.COM Sun Sep 2 04:10:34 2007 From: Richard.Bair at Sun.COM (Richard Bair) Date: Sat, 01 Sep 2007 21:10:34 -0700 Subject: jtreg In-Reply-To: <46DA0D80.4040401@gmx.ch> References: <46DA0D80.4040401@gmx.ch> Message-ID: <768779D7-DD6B-4884-AB3E-F1E477621A7F@sun.com> > running the jtreg tests on the Swing project results in: "You must > define jtreg.tests to select some tests to run." > Are there any jtreg tests for the Swing project? What should be the > value of jtreg.tests? Yes and no. There should be a test in the latest builds for a JSpinner bug that had been contributed. I haven't checked, but I believe it should be public. We have a lot of tests that cannot be released due to being based on third party code, for which we don't have the copyright. However, there are a ton of tests that we could release. We haven't vetted them yet though, which is why you don't see the regression tests. Richard From moustafadev at yahoo.com Mon Sep 3 08:08:29 2007 From: moustafadev at yahoo.com (Mostafa othman) Date: Mon, 3 Sep 2007 01:08:29 -0700 (PDT) Subject: What is next? Message-ID: <225717.83537.qm@web33808.mail.mud.yahoo.com> Hi , I've just registered for swing-dev mailing list and need help about the next step to be done. Thanks ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alexander.Potochkin at Sun.COM Mon Sep 3 11:56:48 2007 From: Alexander.Potochkin at Sun.COM (Alexander Potochkin) Date: Mon, 03 Sep 2007 15:56:48 +0400 Subject: 6179357: Request interface javax.swing.tree.TreeModel to have a generic type for nodes In-Reply-To: <46D98475.5060707@gmx.ch> References: <200708262033.16074.fbrunnerlist@gmx.ch> <46D2CB3E.6000900@sun.com> <46D98475.5060707@gmx.ch> Message-ID: <46DBF680.6070203@sun.com> Hello Florian > Hi Alecander! > > Thanks for your help. I installed the basic environment and started to > work on this issue. > > Note that the path at > > https://openjdk.dev.java.net/source/browse/openjdk/ > > as well as at > > https://openjdk.dev.java.net/servlets/ProjectSource > > don't seem to be correct! > > At > |https://openjdk.dev.java.net/svn/openjdk/trunk > > there's only a www directory! > > Instead I checked out > > https://openjdk.dev.java.net/svn/openjdk/jdk/trunk/j2se/ > > Is this the correct path to work on the Swing project? Yep Here you can find all you need for building JDK https://openjdk.dev.java.net/source/browse/openjdk/jdk/trunk/ Download control hotspot and j2se directories README-builds.html will help you https://openjdk.dev.java.net/source/browse/openjdk/jdk/trunk/README-builds.html?rev=245&view=log There is also build-dev at openjdk.java.net alias where you can ask any build related questions Thanks alexp > I'will post to this list again when there are more news or questions arise. > > -Florian > > |Alexander Potochkin schrieb: >> >> Hello Florian >> >> Welcome to the swing-dev >> >> The RFE #6179357 is definitely worth investigating >> we was going to generify Swing for 1.6 >> but unfortunately didn't have enough time >> >> Your fixes are welcome >> >> Here is the information how to contribute: >> http://openjdk.java.net/contribute/ >> >> For now the process is: >> >> Become a contributor >> download openJDK >> make the fix >> ask any related questions on this list >> submit a patch >> we'll assign a sponsor who we'll review your fix >> and put it back when it is done >> >> The whole process will be simplified when we complete moving to >> Mercurial repository >> >> For this RFE you don't need to file JSR >> as you mentioned changes should as backward compatible as possible >> >> but we'll need the request to the special committee which keeps track >> of the Java public API, the sponsor will do it for you >> >> Please note that we prefer to make the incremental fixes which fix the >> particular problem, I mean, not to mix e.g. generifying and optimization >> in one fix but split it to two ones. >> >> >I want my >> > progress to be visible by the public. So what is the best strategy? >> Work at >> > openjdk.org? Work at SwingLabs? Start a new project at java.net? >> >> The current process doesn't seem to provide much visibility for the >> public. To make it visible I personally would do the following things: >> >> - start a project on java.net >> (not sure it helps for this particular case) >> - blog about your progress and discuss it with the community >> (this is the best way to make your work visible) >> >> Thanks >> alexp >> >> >>> Hi, >>> >>> I'm interessted in the RFE "6179357: Request interface >>> javax.swing.tree.TreeModel to have a generic type for nodes". Is >>> there already someone working on this issue? If not I would like to >>> help there. >>> >>> I want to address following issues: >>> - add generics support to the Swing framework >>> - provide support for new language features like varargs >>> - provide better support for the collection framework >>> - optimize code where reasonable >>> >>> Do you think this is a good idea? How probable will such a change >>> make its way to the "official" jdk? >>> I sent the signed SCA to Sun. So what would be the next steps? I want >>> my progress to be visible by the public. So what is the best >>> strategy? Work at openjdk.org? Work at SwingLabs? Start a new project >>> at java.net? >>> >>> Should I work on a branch of openjdk? Or should I copy the current >>> revision to a new repository? What is the easiest/ best way to get >>> the source back to openjdk? >>> >>> Is a JSR needed for such a change? Note: the suggested changes should >>> be backwards compatible (eg. thanks to the "raw type feature" of >>> generics), as far as I can see up to now. (The only exception is of >>> course reflection, which can always break if you change an API). >>> Thanks for your help. >>> >>> -Florian >> > From Alexander.Potochkin at Sun.COM Mon Sep 3 12:42:20 2007 From: Alexander.Potochkin at Sun.COM (Alexander Potochkin) Date: Mon, 03 Sep 2007 16:42:20 +0400 Subject: @version conventions In-Reply-To: <46D9B3FC.9020401@gmx.ch> References: <46D9B3FC.9020401@gmx.ch> Message-ID: <46DC012C.7070000@sun.com> Hello Florian > Hi, > > what are the conventions for the @version tag? > How do you increment versions? What is the used date format? All tags will be removed when we move to Mercurial version system so you don't have to update it Thanks alexp > > Thanks. > > -Florian From Alexander.Potochkin at Sun.COM Mon Sep 3 12:44:21 2007 From: Alexander.Potochkin at Sun.COM (Alexander Potochkin) Date: Mon, 03 Sep 2007 16:44:21 +0400 Subject: 6179357-related: Working on warnings removal In-Reply-To: <46D9C606.7060507@gmx.ch> References: <200708262033.16074.fbrunnerlist@gmx.ch> <46D2CB3E.6000900@sun.com> <46D98475.5060707@gmx.ch> <46D9C606.7060507@gmx.ch> Message-ID: <46DC01A5.6090904@sun.com> Hello Florian > Hi, > > I decided first to remove some warning for trivial cases, since even if > I compile with > -Xlint:-serial -Xlint:-deprecation -Xlint:-cast -Xlint:-fallthrough > -Xmaxwarns 1200 > I get 977 warnings! And since most of them are [unckecked] warnings, > it's hard to see, if and where I introduce new [unckecked] warnings, > when adding generics. You are right, unfortunately we have a lot of warnings in compile time We should have paid more attention to this problem Thanks alexp > Please tell me if somebody else is working on the warnings removal, too. > > -Florian > > Florian Brunner schrieb: >> Hi Alecander! >> >> Thanks for your help. I installed the basic environment and started to >> work on this issue. >> >> Note that the path at >> >> https://openjdk.dev.java.net/source/browse/openjdk/ >> >> as well as at >> >> https://openjdk.dev.java.net/servlets/ProjectSource >> >> don't seem to be correct! >> >> At >> |https://openjdk.dev.java.net/svn/openjdk/trunk >> >> there's only a www directory! >> >> Instead I checked out >> >> https://openjdk.dev.java.net/svn/openjdk/jdk/trunk/j2se/ >> >> Is this the correct path to work on the Swing project? >> >> I'will post to this list again when there are more news or questions >> arise. >> >> -Florian >> >> |Alexander Potochkin schrieb: >>> >>> Hello Florian >>> >>> Welcome to the swing-dev >>> >>> The RFE #6179357 is definitely worth investigating >>> we was going to generify Swing for 1.6 >>> but unfortunately didn't have enough time >>> >>> Your fixes are welcome >>> >>> Here is the information how to contribute: >>> http://openjdk.java.net/contribute/ >>> >>> For now the process is: >>> >>> Become a contributor >>> download openJDK >>> make the fix >>> ask any related questions on this list >>> submit a patch >>> we'll assign a sponsor who we'll review your fix >>> and put it back when it is done >>> >>> The whole process will be simplified when we complete moving to >>> Mercurial repository >>> >>> For this RFE you don't need to file JSR >>> as you mentioned changes should as backward compatible as possible >>> >>> but we'll need the request to the special committee which keeps track >>> of the Java public API, the sponsor will do it for you >>> >>> Please note that we prefer to make the incremental fixes which fix >>> the particular problem, I mean, not to mix e.g. generifying and >>> optimization >>> in one fix but split it to two ones. >>> >>> >I want my >>> > progress to be visible by the public. So what is the best strategy? >>> Work at >>> > openjdk.org? Work at SwingLabs? Start a new project at java.net? >>> >>> The current process doesn't seem to provide much visibility for the >>> public. To make it visible I personally would do the following things: >>> >>> - start a project on java.net >>> (not sure it helps for this particular case) >>> - blog about your progress and discuss it with the community >>> (this is the best way to make your work visible) >>> >>> Thanks >>> alexp >>> >>> >>>> Hi, >>>> >>>> I'm interessted in the RFE "6179357: Request interface >>>> javax.swing.tree.TreeModel to have a generic type for nodes". Is >>>> there already someone working on this issue? If not I would like to >>>> help there. >>>> >>>> I want to address following issues: >>>> - add generics support to the Swing framework >>>> - provide support for new language features like varargs >>>> - provide better support for the collection framework >>>> - optimize code where reasonable >>>> >>>> Do you think this is a good idea? How probable will such a change >>>> make its way to the "official" jdk? >>>> I sent the signed SCA to Sun. So what would be the next steps? I >>>> want my progress to be visible by the public. So what is the best >>>> strategy? Work at openjdk.org? Work at SwingLabs? Start a new >>>> project at java.net? >>>> >>>> Should I work on a branch of openjdk? Or should I copy the current >>>> revision to a new repository? What is the easiest/ best way to get >>>> the source back to openjdk? >>>> >>>> Is a JSR needed for such a change? Note: the suggested changes >>>> should be backwards compatible (eg. thanks to the "raw type feature" >>>> of generics), as far as I can see up to now. (The only exception is >>>> of course reflection, which can always break if you change an API). >>>> Thanks for your help. >>>> >>>> -Florian >>> >> > From carlantaki at gmail.com Wed Sep 5 00:28:23 2007 From: carlantaki at gmail.com (Carl Antaki) Date: Tue, 4 Sep 2007 20:28:23 -0400 Subject: JFileChooser Message-ID: Hi everybody, I would like to know if improvements to the JFileChooser are on their way in Java 7. Winpack makes it possible to use a native FileChooser but it's proprietary and not free so improving the JFileChooser or the old FileDialog is the way to go in Java 7. I also would like to add a request to add context menus to JTextComponent by providing a method to enable that, the context menus are Undo, Redo, Select All, Delete, Cut, Copy, Paste. The unavailability of such small details make it hard to develop native good looking Java apps. I am asking that because the developer should not have to code these details as they should be already available. Thanks in advance, Carl Antaki -------------- next part -------------- An HTML attachment was scrubbed... URL: From linuxhippy at gmail.com Wed Sep 5 16:29:17 2007 From: linuxhippy at gmail.com (Clemens Eisserer) Date: Wed, 5 Sep 2007 18:29:17 +0200 Subject: JFileChooser In-Reply-To: References: Message-ID: <194f62550709050929t19a69076q7296f97fc9b62e40@mail.gmail.com> Hello Carl, > I also would like to add a request to add context menus to > JTextComponent by providing a method to enable that, the > context menus are Undo, Redo, Select All, Delete, Cut, Copy, Paste. > The unavailability of such small details make it hard to develop > native good looking Java apps. I am asking that because the > developer should not have to > code these details as they should be already available. I don't use Windows so I don't know how the Windows-"Port" of JFileChooser looks, but did you do your testing with the Windows-LnF? Furthermore if you would like to have this issue resolved quick (since you're not a paying customer the priority of your RFE's is relativly low (as is mine)), you could implement it yourself. The code is open, so feel free to play arround with it. But be aware that especially for JFileChooser things are not as easy as someone may imagine ;) lg Clemens From carlantaki at gmail.com Wed Sep 5 22:44:25 2007 From: carlantaki at gmail.com (Carl Antaki) Date: Wed, 5 Sep 2007 18:44:25 -0400 Subject: JFileChooser In-Reply-To: <194f62550709050929t19a69076q7296f97fc9b62e40@mail.gmail.com> References: <194f62550709050929t19a69076q7296f97fc9b62e40@mail.gmail.com> Message-ID: Hi Clemens, It looks like nobody of the Swing team is answering that or they are busy working on Java 7. I asked the same question before on http://forums.java.net/jive/thread.jspa?threadID=30307 Scott Violet has said that they are working on improvements http://forums.java.net/jive/message.jspa?messageID=107109. I just wanted to make sure it will be included in Java 7. As you said adding the ability to call the native FileDialog is not straightforward and since I have no Win32 knowledge and no time now it's gonna be tough to do. I asked for that because I hate to say to the client that I cannot do that in a certain time because Java does not provide that, what impression will it give him? Another example is also that date picker. I know there's the date picker but it should be standard. If we want Swing to rock, the Swing team has to put the right time and effort to make Swing a first class citizen rich client development platform. Best Regards, Carl Antaki On 9/5/07, Clemens Eisserer wrote: > > Hello Carl, > > > I also would like to add a request to add context menus to > > JTextComponent by providing a method to enable that, the > > context menus are Undo, Redo, Select All, Delete, Cut, Copy, Paste. > > The unavailability of such small details make it hard to develop > > native good looking Java apps. I am asking that because the > > developer should not have to > > code these details as they should be already available. > > I don't use Windows so I don't know how the Windows-"Port" of > JFileChooser looks, but did you do your testing with the Windows-LnF? > > Furthermore if you would like to have this issue resolved quick (since > you're not a paying customer the priority of your RFE's is relativly > low (as is mine)), you could implement it yourself. The code is open, > so feel free to play arround with it. But be aware that especially for > JFileChooser things are not as easy as someone may imagine ;) > > lg Clemens > -------------- next part -------------- An HTML attachment was scrubbed... URL: From linuxhippy at gmail.com Wed Sep 5 23:03:51 2007 From: linuxhippy at gmail.com (Clemens Eisserer) Date: Thu, 6 Sep 2007 01:03:51 +0200 Subject: JFileChooser In-Reply-To: References: <194f62550709050929t19a69076q7296f97fc9b62e40@mail.gmail.com> Message-ID: <194f62550709051603i79882ea1n5e571bd6da0a5e85@mail.gmail.com> Hi Carl, > I asked for that because I hate to say to the client > that I cannot do that in a certain time because Java does not > provide that, what impression will it give him? Another example is > also that date picker. > I know there's the date picker but it should be standard. If we want > Swing to rock, the Swing team has to put the right time and effort to > make Swing a first class citizen rich client development platform. As I said if you would like to have it resolved in a fixed timeframe you can simply take the source and do it yourself and as far as I know there are very experienced companies implementing such fixes. If you need it and don't know howto do it, there's a guy called leo_user which maybe does it for money. (I hope he does not dislike that I point you to him). Well this is the old discussion about how important native look&feels are. In my opinion (just taken from the experience with my customers which are typically average users across all jobs) native lnf is not important as long as the application looks good. The Steel-Theme of metal was problematic - however some users already said they like Ocean because it looks "fresh". And sometimes I use custom LnF's - but most really don't care. I would say 95% don't care at all. So from my point-of-view native LnF is not important at all, almost not at all. I never deployed an app with native LnF enabled by default. So you have the following options: - Implement your own filechooser (only helps you, maybe a lot of work) - Hack the existing one and submit patches (helps everybody) or keep changes to your app (but you've to open the sourcecode you modified because its GPL with classpath exception) - Pay sombody to fix it. lg Clemens From carlantaki at gmail.com Wed Sep 5 23:14:26 2007 From: carlantaki at gmail.com (Carl Antaki) Date: Wed, 5 Sep 2007 19:14:26 -0400 Subject: JFileChooser In-Reply-To: <194f62550709051603i79882ea1n5e571bd6da0a5e85@mail.gmail.com> References: <194f62550709050929t19a69076q7296f97fc9b62e40@mail.gmail.com> <194f62550709051603i79882ea1n5e571bd6da0a5e85@mail.gmail.com> Message-ID: Hi Clemens, I am not talking about Look and feels it's all about usability. Every function should be available by more than one mean: by using the keyboard shortcut, the menu or the context menu for Cut, Copy, Paste. Windows, Mac OS X, KDE and Gnome all provide context menus and we all know these platforms represent 99% of all desktops. I still don't understand why we do not have such basic features available in Java. I was working on a Swing rich client app but for the time being I'm going to work on a Web project. All I want is for the benefit of the Swing developer. Best Regards Carl Antaki On 9/5/07, Clemens Eisserer wrote: > > Hi Carl, > > > I asked for that because I hate to say to the client > > that I cannot do that in a certain time because Java does not > > provide that, what impression will it give him? Another example is > > also that date picker. > > I know there's the date picker but it should be standard. If we want > > Swing to rock, the Swing team has to put the right time and effort to > > make Swing a first class citizen rich client development platform. > > As I said if you would like to have it resolved in a fixed timeframe > you can simply take the source and do it yourself and as far as I know > there are very experienced companies implementing such fixes. > If you need it and don't know howto do it, there's a guy called > leo_user which maybe does it for money. (I hope he does not dislike > that I point you to him). > > Well this is the old discussion about how important native look&feels > are. In my opinion (just taken from the experience with my customers > which are typically average users across all jobs) native lnf is not > important as long as the application looks good. The Steel-Theme of > metal was problematic - however some users already said they like > Ocean because it looks "fresh". And sometimes I use custom LnF's - but > most really don't care. I would say 95% don't care at all. > So from my point-of-view native LnF is not important at all, almost > not at all. I never deployed an app with native LnF enabled by > default. > > So you have the following options: > - Implement your own filechooser (only helps you, maybe a lot of work) > - Hack the existing one and submit patches (helps everybody) or keep > changes to your app (but you've to open the sourcecode you modified > because its GPL with classpath exception) > - Pay sombody to fix it. > > lg Clemens > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Leonid.Popov at Sun.COM Thu Sep 6 12:03:02 2007 From: Leonid.Popov at Sun.COM (Leonid Popov) Date: Thu, 06 Sep 2007 16:03:02 +0400 Subject: JFileChooser In-Reply-To: References: <194f62550709050929t19a69076q7296f97fc9b62e40@mail.gmail.com> <194f62550709051603i79882ea1n5e571bd6da0a5e85@mail.gmail.com> Message-ID: <46DFEC76.30507@sun.com> Hi Carl, hi Clemens, I'm a Swing team engineer responsible for JFileChooser. Thanks for your interest in improving JFileChooser. Your discussion shows how different requirements made by different people can be: while 100% native LaF is not important for Clemens, for Carl it is essential. I think I have good news for the both parties. We plan to continue improving JFileChooser by adding, among other things, more native-like features, as well as we are going to add support for native file dialog in Swing. So I think that with one of the closest releases (unfortunately, it's not clear yet with which one), every developer will be able to choose what is more valuable for his customers: either pluggable LaF or 100% native file dialog. Please feel free to ask any questions. Leonid Popov Swing team engineer Sun Microsystems Carl Antaki wrote: > Hi Clemens, > > I am not talking about Look and feels it's all about usability. Every > function should be available by more than one mean: by using the > keyboard shortcut, the menu or the context menu for Cut, Copy, Paste. > Windows, Mac OS X, KDE and Gnome all provide context menus and we all > know these platforms represent 99% of all desktops. I still don't > understand why we do not have such basic features available in Java. I > was working on a Swing rich client app but for the time being I'm going > to work on a Web project. All I want is for the benefit of the Swing > developer. > > Best Regards > Carl Antaki > On 9/5/07, *Clemens Eisserer* > wrote: > > Hi Carl, > > > I asked for that because I hate to say to the client > > that I cannot do that in a certain time because Java does not > > provide that, what impression will it give him? Another example is > > also that date picker. > > I know there's the date picker but it should be standard. If we want > > Swing to rock, the Swing team has to put the right time and effort to > > make Swing a first class citizen rich client development platform. > > As I said if you would like to have it resolved in a fixed timeframe > you can simply take the source and do it yourself and as far as I know > there are very experienced companies implementing such fixes. > If you need it and don't know howto do it, there's a guy called > leo_user which maybe does it for money. (I hope he does not dislike > that I point you to him). > > Well this is the old discussion about how important native look&feels > are. In my opinion (just taken from the experience with my customers > which are typically average users across all jobs) native lnf is not > important as long as the application looks good. The Steel-Theme of > metal was problematic - however some users already said they like > Ocean because it looks "fresh". And sometimes I use custom LnF's - but > most really don't care. I would say 95% don't care at all. > So from my point-of-view native LnF is not important at all, almost > not at all. I never deployed an app with native LnF enabled by > default. > > So you have the following options: > - Implement your own filechooser (only helps you, maybe a lot of work) > - Hack the existing one and submit patches (helps everybody) or keep > changes to your app (but you've to open the sourcecode you modified > because its GPL with classpath exception) > - Pay sombody to fix it. > > lg Clemens > > From carlantaki at gmail.com Fri Sep 7 02:48:04 2007 From: carlantaki at gmail.com (Carl Antaki) Date: Thu, 6 Sep 2007 22:48:04 -0400 Subject: JFileChooser In-Reply-To: <46DFEC76.30507@sun.com> References: <194f62550709050929t19a69076q7296f97fc9b62e40@mail.gmail.com> <194f62550709051603i79882ea1n5e571bd6da0a5e85@mail.gmail.com> <46DFEC76.30507@sun.com> Message-ID: Hi Leonid, Thanks for replying so promptly. That's great for JFileChooser, it was what I was looking for. When you say closest release will that mean it will be available in Java 7 or do you mean later? I know it's hard to predict but what is the plan? Best Regards, Carl Antaki On 9/6/07, Leonid Popov wrote: > > Hi Carl, hi Clemens, > > I'm a Swing team engineer responsible for JFileChooser. > > Thanks for your interest in improving JFileChooser. Your discussion shows > how > different requirements made by different people can be: while 100% native > LaF > is not important for Clemens, for Carl it is essential. I think I have > good > news for the both parties. We plan to continue improving JFileChooser by > adding, among other things, more native-like features, as well as we are > going > to add support for native file dialog in Swing. So I think that with one > of > the closest releases (unfortunately, it's not clear yet with which one), > every > developer will be able to choose what is more valuable for his customers: > either pluggable LaF or 100% native file dialog. > > Please feel free to ask any questions. > > Leonid Popov > Swing team engineer > Sun Microsystems > > > Carl Antaki wrote: > > > Hi Clemens, > > > > I am not talking about Look and feels it's all about usability. Every > > function should be available by more than one mean: by using the > > keyboard shortcut, the menu or the context menu for Cut, Copy, Paste. > > Windows, Mac OS X, KDE and Gnome all provide context menus and we all > > know these platforms represent 99% of all desktops. I still don't > > understand why we do not have such basic features available in Java. I > > was working on a Swing rich client app but for the time being I'm going > > to work on a Web project. All I want is for the benefit of the Swing > > developer. > > > > Best Regards > > Carl Antaki > > On 9/5/07, *Clemens Eisserer* > > wrote: > > > > Hi Carl, > > > > > I asked for that because I hate to say to the client > > > that I cannot do that in a certain time because Java does not > > > provide that, what impression will it give him? Another example > is > > > also that date picker. > > > I know there's the date picker but it should be standard. If we > want > > > Swing to rock, the Swing team has to put the right time and > effort to > > > make Swing a first class citizen rich client development > platform. > > > > As I said if you would like to have it resolved in a fixed timeframe > > you can simply take the source and do it yourself and as far as I > know > > there are very experienced companies implementing such fixes. > > If you need it and don't know howto do it, there's a guy called > > leo_user which maybe does it for money. (I hope he does not dislike > > that I point you to him). > > > > Well this is the old discussion about how important native > look&feels > > are. In my opinion (just taken from the experience with my customers > > which are typically average users across all jobs) native lnf is not > > important as long as the application looks good. The Steel-Theme of > > metal was problematic - however some users already said they like > > Ocean because it looks "fresh". And sometimes I use custom LnF's - > but > > most really don't care. I would say 95% don't care at all. > > So from my point-of-view native LnF is not important at all, almost > > not at all. I never deployed an app with native LnF enabled by > > default. > > > > So you have the following options: > > - Implement your own filechooser (only helps you, maybe a lot of > work) > > - Hack the existing one and submit patches (helps everybody) or keep > > changes to your app (but you've to open the sourcecode you modified > > because its GPL with classpath exception) > > - Pay sombody to fix it. > > > > lg Clemens > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fbrunnerlist at gmx.ch Sun Sep 9 14:11:23 2007 From: fbrunnerlist at gmx.ch (Florian Brunner) Date: Sun, 09 Sep 2007 16:11:23 +0200 Subject: [PATCH] 6179357-related: Working on warnings removal In-Reply-To: <46DC01A5.6090904@sun.com> References: <200708262033.16074.fbrunnerlist@gmx.ch> <46D2CB3E.6000900@sun.com> <46D98475.5060707@gmx.ch> <46D9C606.7060507@gmx.ch> <46DC01A5.6090904@sun.com> Message-ID: <46E3FF0B.3030009@gmx.ch> Hi, here's my first patch. When compiling with -Xlint -J-Xms80m -J-Xmx256m -Xlint:-serial -Xlint:-deprecation -Xlint:-fallthrough -Xmaxwarns 1200 this patch reduces the number of reported warnings from 1185 to 91. This will be the basis to add generics support to the Swing framework and I will try to further reduce the number of warnings once I started with this task. The basis of this patch is revision 250. Apply it at openjdk/jdk/trunk/j2se/src. I tried not to change any public or protected APIs in public or protected classes in this patch. At many places I tried to add type parameters as meaningful as possible, but with some cases I just used Object, if a more meaningful type parameter was not so trivial. You might want to refactor this if needed. (Though everything should work as it is.) I also started a new project at java.net: https://swing-generics.dev.java.net/ (pending approval) Am I correct that with the licences of openjdk I am allowed to publish the modified swing project in source, binary and javadoc form? ** -Florian Alexander Potochkin schrieb: > Hello Florian >> Hi, >> >> I decided first to remove some warning for trivial cases, since even >> if I compile with >> -Xlint:-serial -Xlint:-deprecation -Xlint:-cast -Xlint:-fallthrough >> -Xmaxwarns 1200 >> I get 977 warnings! And since most of them are [unckecked] warnings, >> it's hard to see, if and where I introduce new [unckecked] warnings, >> when adding generics. > > You are right, unfortunately we have a lot of warnings in compile time > > We should have paid more attention to this problem > > Thanks > alexp > >> Please tell me if somebody else is working on the warnings removal, too. >> >> -Florian >> >> Florian Brunner schrieb: >>> Hi Alecander! >>> >>> Thanks for your help. I installed the basic environment and started >>> to work on this issue. >>> >>> Note that the path at >>> >>> https://openjdk.dev.java.net/source/browse/openjdk/ >>> >>> as well as at >>> >>> https://openjdk.dev.java.net/servlets/ProjectSource >>> >>> don't seem to be correct! >>> >>> At >>> |https://openjdk.dev.java.net/svn/openjdk/trunk >>> >>> there's only a www directory! >>> >>> Instead I checked out >>> >>> https://openjdk.dev.java.net/svn/openjdk/jdk/trunk/j2se/ >>> >>> Is this the correct path to work on the Swing project? >>> >>> I'will post to this list again when there are more news or questions >>> arise. >>> >>> -Florian >>> >>> |Alexander Potochkin schrieb: >>>> >>>> Hello Florian >>>> >>>> Welcome to the swing-dev >>>> >>>> The RFE #6179357 is definitely worth investigating >>>> we was going to generify Swing for 1.6 >>>> but unfortunately didn't have enough time >>>> >>>> Your fixes are welcome >>>> >>>> Here is the information how to contribute: >>>> http://openjdk.java.net/contribute/ >>>> >>>> For now the process is: >>>> >>>> Become a contributor >>>> download openJDK >>>> make the fix >>>> ask any related questions on this list >>>> submit a patch >>>> we'll assign a sponsor who we'll review your fix >>>> and put it back when it is done >>>> >>>> The whole process will be simplified when we complete moving to >>>> Mercurial repository >>>> >>>> For this RFE you don't need to file JSR >>>> as you mentioned changes should as backward compatible as possible >>>> >>>> but we'll need the request to the special committee which keeps >>>> track of the Java public API, the sponsor will do it for you >>>> >>>> Please note that we prefer to make the incremental fixes which fix >>>> the particular problem, I mean, not to mix e.g. generifying and >>>> optimization >>>> in one fix but split it to two ones. >>>> >>>> >I want my >>>> > progress to be visible by the public. So what is the best >>>> strategy? Work at >>>> > openjdk.org? Work at SwingLabs? Start a new project at java.net? >>>> >>>> The current process doesn't seem to provide much visibility for the >>>> public. To make it visible I personally would do the following things: >>>> >>>> - start a project on java.net >>>> (not sure it helps for this particular case) >>>> - blog about your progress and discuss it with the community >>>> (this is the best way to make your work visible) >>>> >>>> Thanks >>>> alexp >>>> >>>> >>>>> Hi, >>>>> >>>>> I'm interessted in the RFE "6179357: Request interface >>>>> javax.swing.tree.TreeModel to have a generic type for nodes". Is >>>>> there already someone working on this issue? If not I would like >>>>> to help there. >>>>> >>>>> I want to address following issues: >>>>> - add generics support to the Swing framework >>>>> - provide support for new language features like varargs >>>>> - provide better support for the collection framework >>>>> - optimize code where reasonable >>>>> >>>>> Do you think this is a good idea? How probable will such a change >>>>> make its way to the "official" jdk? >>>>> I sent the signed SCA to Sun. So what would be the next steps? I >>>>> want my progress to be visible by the public. So what is the best >>>>> strategy? Work at openjdk.org? Work at SwingLabs? Start a new >>>>> project at java.net? >>>>> >>>>> Should I work on a branch of openjdk? Or should I copy the current >>>>> revision to a new repository? What is the easiest/ best way to get >>>>> the source back to openjdk? >>>>> >>>>> Is a JSR needed for such a change? Note: the suggested changes >>>>> should be backwards compatible (eg. thanks to the "raw type >>>>> feature" of generics), as far as I can see up to now. (The only >>>>> exception is of course reflection, which can always break if you >>>>> change an API). >>>>> Thanks for your help. >>>>> >>>>> -Florian >>>> >>> >> > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: swing-patch-20070909-warnings.patch URL: From Alexander.Potochkin at Sun.COM Mon Sep 10 16:16:29 2007 From: Alexander.Potochkin at Sun.COM (Alexander Potochkin) Date: Mon, 10 Sep 2007 20:16:29 +0400 Subject: [PATCH] 6179357-related: Working on warnings removal In-Reply-To: <46E3FF0B.3030009@gmx.ch> References: <200708262033.16074.fbrunnerlist@gmx.ch> <46D2CB3E.6000900@sun.com> <46D98475.5060707@gmx.ch> <46D9C606.7060507@gmx.ch> <46DC01A5.6090904@sun.com> <46E3FF0B.3030009@gmx.ch> Message-ID: <46E56DDD.3070002@sun.com> Hello Florian > Hi, > > here's my first patch. When compiling with > -Xlint -J-Xms80m -J-Xmx256m -Xlint:-serial -Xlint:-deprecation > -Xlint:-fallthrough -Xmaxwarns 1200 > this patch reduces the number of reported warnings from 1185 to 91. > > This will be the basis to add generics support to the Swing framework > and I will try to further reduce the number of warnings once I started > with this task. > > The basis of this patch is revision 250. Apply it at > openjdk/jdk/trunk/j2se/src. > > I tried not to change any public or protected APIs in public or > protected classes in this patch. > > At many places I tried to add type parameters as meaningful as possible, > but with some cases I just used Object, if a more meaningful type > parameter was not so trivial. You might want to refactor this if needed. > (Though everything should work as it is.) Could you please to split your fix to several ones ? It is difficult to review so big fixes I'd suggest to make a fix for a package We also usually don't mix two problems in one fix so it is better to factor out removing warnings from existent code to another fix We also update the @author tag in a very rare occasion when someone added a significant amount of code to a class > > I also started a new project at java.net: > https://swing-generics.dev.java.net/ (pending approval) > Am I correct that with the licences of openjdk I am allowed to publish > the modified swing project in source, binary and javadoc form? I hope you can do it, because I can't imagine it was not allowed by the lisence But since I am not a lawyer, probably someone else can confirm that ? Thanks alexp > ** > -Florian > > Alexander Potochkin schrieb: >> Hello Florian >>> Hi, >>> >>> I decided first to remove some warning for trivial cases, since even >>> if I compile with >>> -Xlint:-serial -Xlint:-deprecation -Xlint:-cast -Xlint:-fallthrough >>> -Xmaxwarns 1200 >>> I get 977 warnings! And since most of them are [unckecked] warnings, >>> it's hard to see, if and where I introduce new [unckecked] warnings, >>> when adding generics. >> >> You are right, unfortunately we have a lot of warnings in compile time >> >> We should have paid more attention to this problem >> >> Thanks >> alexp >> >>> Please tell me if somebody else is working on the warnings removal, too. >>> >>> -Florian >>> >>> Florian Brunner schrieb: >>>> Hi Alecander! >>>> >>>> Thanks for your help. I installed the basic environment and started >>>> to work on this issue. >>>> >>>> Note that the path at >>>> >>>> https://openjdk.dev.java.net/source/browse/openjdk/ >>>> >>>> as well as at >>>> >>>> https://openjdk.dev.java.net/servlets/ProjectSource >>>> >>>> don't seem to be correct! >>>> >>>> At >>>> |https://openjdk.dev.java.net/svn/openjdk/trunk >>>> >>>> there's only a www directory! >>>> >>>> Instead I checked out >>>> >>>> https://openjdk.dev.java.net/svn/openjdk/jdk/trunk/j2se/ >>>> >>>> Is this the correct path to work on the Swing project? >>>> >>>> I'will post to this list again when there are more news or questions >>>> arise. >>>> >>>> -Florian >>>> >>>> |Alexander Potochkin schrieb: >>>>> >>>>> Hello Florian >>>>> >>>>> Welcome to the swing-dev >>>>> >>>>> The RFE #6179357 is definitely worth investigating >>>>> we was going to generify Swing for 1.6 >>>>> but unfortunately didn't have enough time >>>>> >>>>> Your fixes are welcome >>>>> >>>>> Here is the information how to contribute: >>>>> http://openjdk.java.net/contribute/ >>>>> >>>>> For now the process is: >>>>> >>>>> Become a contributor >>>>> download openJDK >>>>> make the fix >>>>> ask any related questions on this list >>>>> submit a patch >>>>> we'll assign a sponsor who we'll review your fix >>>>> and put it back when it is done >>>>> >>>>> The whole process will be simplified when we complete moving to >>>>> Mercurial repository >>>>> >>>>> For this RFE you don't need to file JSR >>>>> as you mentioned changes should as backward compatible as possible >>>>> >>>>> but we'll need the request to the special committee which keeps >>>>> track of the Java public API, the sponsor will do it for you >>>>> >>>>> Please note that we prefer to make the incremental fixes which fix >>>>> the particular problem, I mean, not to mix e.g. generifying and >>>>> optimization >>>>> in one fix but split it to two ones. >>>>> >>>>> >I want my >>>>> > progress to be visible by the public. So what is the best >>>>> strategy? Work at >>>>> > openjdk.org? Work at SwingLabs? Start a new project at java.net? >>>>> >>>>> The current process doesn't seem to provide much visibility for the >>>>> public. To make it visible I personally would do the following things: >>>>> >>>>> - start a project on java.net >>>>> (not sure it helps for this particular case) >>>>> - blog about your progress and discuss it with the community >>>>> (this is the best way to make your work visible) >>>>> >>>>> Thanks >>>>> alexp >>>>> >>>>> >>>>>> Hi, >>>>>> >>>>>> I'm interessted in the RFE "6179357: Request interface >>>>>> javax.swing.tree.TreeModel to have a generic type for nodes". Is >>>>>> there already someone working on this issue? If not I would like >>>>>> to help there. >>>>>> >>>>>> I want to address following issues: >>>>>> - add generics support to the Swing framework >>>>>> - provide support for new language features like varargs >>>>>> - provide better support for the collection framework >>>>>> - optimize code where reasonable >>>>>> >>>>>> Do you think this is a good idea? How probable will such a change >>>>>> make its way to the "official" jdk? >>>>>> I sent the signed SCA to Sun. So what would be the next steps? I >>>>>> want my progress to be visible by the public. So what is the best >>>>>> strategy? Work at openjdk.org? Work at SwingLabs? Start a new >>>>>> project at java.net? >>>>>> >>>>>> Should I work on a branch of openjdk? Or should I copy the current >>>>>> revision to a new repository? What is the easiest/ best way to get >>>>>> the source back to openjdk? >>>>>> >>>>>> Is a JSR needed for such a change? Note: the suggested changes >>>>>> should be backwards compatible (eg. thanks to the "raw type >>>>>> feature" of generics), as far as I can see up to now. (The only >>>>>> exception is of course reflection, which can always break if you >>>>>> change an API). >>>>>> Thanks for your help. >>>>>> >>>>>> -Florian >>>>> >>>> >>> >> > > > ------------------------------------------------------------------------ > > Index: classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java > =================================================================== > --- classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java (revision 250) > +++ classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java (working copy) > @@ -45,6 +45,7 @@ > * @version 1.54 05/05/07 > * @author Jeff Dinkins > * @author Dave Kloba > + * @author Florian Brunner > */ > > public class MotifGraphicsUtils implements SwingConstants > @@ -226,15 +227,15 @@ > if(b.getIcon() != null) { > Icon icon; > if(!model.isEnabled()) { > - icon = (Icon) b.getDisabledIcon(); > + icon = b.getDisabledIcon(); > } else if(model.isPressed() && model.isArmed()) { > - icon = (Icon) b.getPressedIcon(); > + icon = b.getPressedIcon(); > if(icon == null) { > // Use default icon > - icon = (Icon) b.getIcon(); > + icon = b.getIcon(); > } > } else { > - icon = (Icon) b.getIcon(); > + icon = b.getIcon(); > } > > if (icon!=null) { > Index: classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java > =================================================================== > --- classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java (revision 250) > +++ classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java (working copy) > @@ -41,6 +41,9 @@ > * Class that manages a Motif title bar > * @version 1.41 05/05/07 > * > + * @author unattributed > + * @author Florian Brunner > + * > * @since 1.3 > */ > public class MotifInternalFrameTitlePane > @@ -87,18 +90,18 @@ > > protected void assembleSystemMenu() { > systemMenu = new JPopupMenu(); > - JMenuItem mi = (JMenuItem)systemMenu.add(new JMenuItem(restoreAction)); > + JMenuItem mi = systemMenu.add(new JMenuItem(restoreAction)); > mi.setMnemonic('R'); > - mi = (JMenuItem) systemMenu.add(new JMenuItem(moveAction)); > + mi = systemMenu.add(new JMenuItem(moveAction)); > mi.setMnemonic('M'); > - mi = (JMenuItem) systemMenu.add(new JMenuItem(sizeAction)); > + mi = systemMenu.add(new JMenuItem(sizeAction)); > mi.setMnemonic('S'); > - mi = (JMenuItem) systemMenu.add(new JMenuItem(iconifyAction)); > + mi = systemMenu.add(new JMenuItem(iconifyAction)); > mi.setMnemonic('n'); > - mi = (JMenuItem) systemMenu.add(new JMenuItem(maximizeAction)); > + mi = systemMenu.add(new JMenuItem(maximizeAction)); > mi.setMnemonic('x'); > systemMenu.add(new JSeparator()); > - mi = (JMenuItem) systemMenu.add(new JMenuItem(closeAction)); > + mi = systemMenu.add(new JMenuItem(closeAction)); > mi.setMnemonic('C'); > > systemButton = new SystemButton(); > @@ -158,7 +161,7 @@ > } > > public void propertyChange(PropertyChangeEvent evt) { > - String prop = (String)evt.getPropertyName(); > + String prop = evt.getPropertyName(); > JInternalFrame f = (JInternalFrame)evt.getSource(); > boolean value = false; > if (JInternalFrame.IS_SELECTED_PROPERTY.equals(prop)) { > Index: classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java > =================================================================== > --- classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java (revision 250) > +++ classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java (working copy) > @@ -60,6 +60,7 @@ > * > * @version 1.193 06/07/07 > * @author unattributed > + * @author Florian Brunner > */ > public class MotifLookAndFeel extends BasicLookAndFeel > { > @@ -291,7 +292,7 @@ > > Object unselectedTabBackground = new UIDefaults.LazyValue() { > public Object createValue(UIDefaults table) { > - Color c = (Color)table.getColor("control"); > + Color c = table.getColor("control"); > return new ColorUIResource(Math.max((int)(c.getRed()*.85),0), > Math.max((int)(c.getGreen()*.85),0), > Math.max((int)(c.getBlue()*.85),0)); > @@ -300,7 +301,7 @@ > > Object unselectedTabForeground = new UIDefaults.LazyValue() { > public Object createValue(UIDefaults table) { > - Color c = (Color)table.getColor("controlText"); > + Color c = table.getColor("controlText"); > return new ColorUIResource(Math.max((int)(c.getRed()*.85),0), > Math.max((int)(c.getGreen()*.85),0), > Math.max((int)(c.getBlue()*.85),0)); > @@ -309,7 +310,7 @@ > > Object unselectedTabShadow = new UIDefaults.LazyValue() { > public Object createValue(UIDefaults table) { > - Color c = (Color)table.getColor("control"); > + Color c = table.getColor("control"); > Color base = new Color(Math.max((int)(c.getRed()*.85),0), > Math.max((int)(c.getGreen()*.85),0), > Math.max((int)(c.getBlue()*.85),0)); > @@ -319,7 +320,7 @@ > > Object unselectedTabHighlight = new UIDefaults.LazyValue() { > public Object createValue(UIDefaults table) { > - Color c = (Color)table.getColor("control"); > + Color c = table.getColor("control"); > Color base = new Color(Math.max((int)(c.getRed()*.85),0), > Math.max((int)(c.getGreen()*.85),0), > Math.max((int)(c.getBlue()*.85),0)); > @@ -1285,3 +1286,4 @@ > > } > > + > Index: classes/com/sun/java/swing/plaf/windows/DesktopProperty.java > =================================================================== > --- classes/com/sun/java/swing/plaf/windows/DesktopProperty.java (revision 250) > +++ classes/com/sun/java/swing/plaf/windows/DesktopProperty.java (working copy) > @@ -37,6 +37,8 @@ > * will force the UIs to update all known Frames. You can invoke > * invalidate to force the value to be fetched again. > * > + * @author unattributed > + * @author Florian Brunner > * @version @(#)DesktopProperty.java 1.16 07/05/05 > */ > // NOTE: Don't rely on this class staying in this location. It is likely > @@ -50,7 +52,7 @@ > /** > * ReferenceQueue of unreferenced WeakPCLs. > */ > - private static ReferenceQueue queue; > + private static ReferenceQueue queue; > > > /** > @@ -77,7 +79,7 @@ > > > static { > - queue = new ReferenceQueue(); > + queue = new ReferenceQueue(); > } > > /** > @@ -271,7 +273,7 @@ > * is handled via a WeakReference so as not to pin down the > * DesktopProperty. > */ > - private static class WeakPCL extends WeakReference > + private static class WeakPCL extends WeakReference > implements PropertyChangeListener { > private Toolkit kit; > private String key; > Index: classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java > =================================================================== > --- classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java (revision 250) > +++ classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java (working copy) > @@ -51,6 +51,7 @@ > * @see javax.swing.DefaultDesktopManager > * @version 1.27 05/05/07 > * @author Thomas Ball > + * @author Florian Brunner > */ > public class WindowsDesktopManager extends DefaultDesktopManager > implements java.io.Serializable, javax.swing.plaf.UIResource { > @@ -97,7 +98,7 @@ > } > } catch (PropertyVetoException e) {} > if (f != currentFrame) { > - currentFrameRef = new WeakReference(f); > + currentFrameRef = new WeakReference(f); > } > } > > Index: classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java > =================================================================== > --- classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java (revision 250) > +++ classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java (working copy) > @@ -51,6 +51,7 @@ > * > * @version 1.110 06/08/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class WindowsFileChooserUI extends BasicFileChooserUI { > > @@ -1143,7 +1144,7 @@ > * Data model for a type-face selection combo-box. > */ > protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel { > - Vector directories = new Vector(); > + Vector directories = new Vector(); > int[] depths = null; > File selectedDirectory = null; > JFileChooser chooser = getFileChooser(); > @@ -1195,7 +1196,7 @@ > File sf = useShellFolder ? ShellFolder.getShellFolder(canonical) > : canonical; > File f = sf; > - Vector path = new Vector(10); > + Vector path = new Vector(10); > do { > path.addElement(f); > } while ((f = f.getParentFile()) != null); > @@ -1203,7 +1204,7 @@ > int pathCount = path.size(); > // Insert chain at appropriate place in vector > for (int i = 0; i < pathCount; i++) { > - f = (File)path.get(i); > + f = path.get(i); > if (directories.contains(f)) { > int topIndex = directories.indexOf(f); > for (int j = i-1; j >= 0; j--) { > @@ -1222,12 +1223,12 @@ > private void calculateDepths() { > depths = new int[directories.size()]; > for (int i = 0; i < depths.length; i++) { > - File dir = (File)directories.get(i); > + File dir = directories.get(i); > File parent = dir.getParentFile(); > depths[i] = 0; > if (parent != null) { > for (int j = i-1; j >= 0; j--) { > - if (parent.equals((File)directories.get(j))) { > + if (parent.equals(directories.get(j))) { > depths[i] = depths[j] + 1; > break; > } > @@ -1412,3 +1413,4 @@ > } > } > > + > Index: classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java > =================================================================== > --- classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java (revision 250) > +++ classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java (working copy) > @@ -41,6 +41,11 @@ > import static com.sun.java.swing.plaf.windows.TMSchema.*; > import static com.sun.java.swing.plaf.windows.XPStyle.Skin; > > +/** > + * > + * @author unattributed > + * @author Florian Brunner > + */ > public class WindowsInternalFrameTitlePane extends BasicInternalFrameTitlePane { > private Color selectedTitleGradientColor; > private Color notSelectedTitleGradientColor; > @@ -304,18 +309,18 @@ > } > > protected void addSystemMenuItems(JPopupMenu menu) { > - JMenuItem mi = (JMenuItem)menu.add(restoreAction); > + JMenuItem mi = menu.add(restoreAction); > mi.setMnemonic('R'); > - mi = (JMenuItem)menu.add(moveAction); > + mi = menu.add(moveAction); > mi.setMnemonic('M'); > - mi = (JMenuItem)menu.add(sizeAction); > + mi = menu.add(sizeAction); > mi.setMnemonic('S'); > - mi = (JMenuItem)menu.add(iconifyAction); > + mi = menu.add(iconifyAction); > mi.setMnemonic('n'); > - mi = (JMenuItem)menu.add(maximizeAction); > + mi = menu.add(maximizeAction); > mi.setMnemonic('x'); > systemPopupMenu.add(new JSeparator()); > - mi = (JMenuItem)menu.add(closeAction); > + mi = menu.add(closeAction); > mi.setMnemonic('C'); > } > > @@ -441,7 +446,7 @@ > > public class WindowsPropertyChangeHandler extends PropertyChangeHandler { > public void propertyChange(PropertyChangeEvent evt) { > - String prop = (String)evt.getPropertyName(); > + String prop = evt.getPropertyName(); > > // Update the internal frame icon for the system menu. > if (JInternalFrame.FRAME_ICON_PROPERTY.equals(prop) && > Index: classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java > =================================================================== > --- classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java (revision 250) > +++ classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java (working copy) > @@ -47,6 +47,9 @@ > * for short term storage or RMI between applications running the same > * version of Swing. A future release of Swing will provide support for > * long term persistence. > + * > + * @author unattributed > + * @author Florian Brunner > */ > public class WindowsScrollBarUI extends BasicScrollBarUI { > private Grid thumbGrid; > @@ -369,21 +372,21 @@ > */ > private static class Grid { > private static final int BUFFER_SIZE = 64; > - private static HashMap map; > + private static HashMap> map; > > private BufferedImage image; > > static { > - map = new HashMap(); > + map = new HashMap>(); > } > > public static Grid getGrid(Color fg, Color bg) { > String key = fg.getRGB() + " " + bg.getRGB(); > - WeakReference ref = (WeakReference)map.get(key); > - Grid grid = (ref == null) ? null : (Grid)ref.get(); > + WeakReference ref = map.get(key); > + Grid grid = (ref == null) ? null : ref.get(); > if (grid == null) { > grid = new Grid(fg, bg); > - map.put(key, new WeakReference(grid)); > + map.put(key, new WeakReference(grid)); > } > return grid; > } > Index: classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java > =================================================================== > --- classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java (revision 250) > +++ classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java (working copy) > @@ -47,19 +47,22 @@ > * for short term storage or RMI between applications running the same > * version of Swing. A future release of Swing will provide support for > * long term persistence. > + * > + * @author unattributed > + * @author Florian Brunner > */ > public class WindowsTabbedPaneUI extends BasicTabbedPaneUI { > /** > * Keys to use for forward focus traversal when the JComponent is > * managing focus. > */ > - private static Set managingFocusForwardTraversalKeys; > + private static Set managingFocusForwardTraversalKeys; > > /** > * Keys to use for backward focus traversal when the JComponent is > * managing focus. > */ > - private static Set managingFocusBackwardTraversalKeys; > + private static Set managingFocusBackwardTraversalKeys; > > private boolean contentOpaque = true; > > @@ -69,13 +72,13 @@ > > // focus forward traversal key > if (managingFocusForwardTraversalKeys==null) { > - managingFocusForwardTraversalKeys = new HashSet(); > + managingFocusForwardTraversalKeys = new HashSet(); > managingFocusForwardTraversalKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)); > } > tabPane.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, managingFocusForwardTraversalKeys); > // focus backward traversal key > if (managingFocusBackwardTraversalKeys==null) { > - managingFocusBackwardTraversalKeys = new HashSet(); > + managingFocusBackwardTraversalKeys = new HashSet(); > managingFocusBackwardTraversalKeys.add( KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK)); > } > tabPane.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, managingFocusBackwardTraversalKeys); > @@ -226,3 +229,4 @@ > } > } > > + > Index: classes/javax/swing/AbstractButton.java > =================================================================== > --- classes/javax/swing/AbstractButton.java (revision 250) > +++ classes/javax/swing/AbstractButton.java (working copy) > @@ -70,6 +70,7 @@ > * > * @version 1.196 05/05/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public abstract class AbstractButton extends JComponent implements ItemSelectable, SwingConstants { > > @@ -1313,8 +1314,7 @@ > // Make sure the change actually took effect > if (!selected && isSelected()) { > if (getModel() instanceof DefaultButtonModel) { > - ButtonGroup group = (ButtonGroup) > - ((DefaultButtonModel)getModel()).getGroup(); > + ButtonGroup group = ((DefaultButtonModel)getModel()).getGroup(); > if (group != null) { > group.clearSelection(); > } > @@ -1884,8 +1884,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])(listenerList.getListeners( > - ChangeListener.class)); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > @@ -1942,8 +1941,7 @@ > * @since 1.4 > */ > public ActionListener[] getActionListeners() { > - return (ActionListener[])(listenerList.getListeners( > - ActionListener.class)); > + return listenerList.getListeners(ActionListener.class); > } > > /** > @@ -2135,7 +2133,7 @@ > * @since 1.4 > */ > public ItemListener[] getItemListeners() { > - return (ItemListener[])listenerList.getListeners(ItemListener.class); > + return listenerList.getListeners(ItemListener.class); > } > > /** > Index: classes/javax/swing/AbstractCellEditor.java > =================================================================== > --- classes/javax/swing/AbstractCellEditor.java (revision 250) > +++ classes/javax/swing/AbstractCellEditor.java (working copy) > @@ -49,6 +49,7 @@ > * Please see {@link java.beans.XMLEncoder}. > * > * @author Philip Milne > + * @author Florian Brunner > * @since 1.3 > */ > > @@ -119,8 +120,7 @@ > * @since 1.4 > */ > public CellEditorListener[] getCellEditorListeners() { > - return (CellEditorListener[])listenerList.getListeners( > - CellEditorListener.class); > + return listenerList.getListeners(CellEditorListener.class); > } > > /** > Index: classes/javax/swing/AbstractListModel.java > =================================================================== > --- classes/javax/swing/AbstractListModel.java (revision 250) > +++ classes/javax/swing/AbstractListModel.java (working copy) > @@ -44,6 +44,7 @@ > * > * @version 1.41 05/05/07 > * @author Hans Muller > + * @author Florian Brunner > */ > public abstract class AbstractListModel implements ListModel, Serializable > { > @@ -86,8 +87,7 @@ > * @since 1.4 > */ > public ListDataListener[] getListDataListeners() { > - return (ListDataListener[])listenerList.getListeners( > - ListDataListener.class); > + return listenerList.getListeners(ListDataListener.class); > } > > > Index: classes/javax/swing/AbstractSpinnerModel.java > =================================================================== > --- classes/javax/swing/AbstractSpinnerModel.java (revision 250) > +++ classes/javax/swing/AbstractSpinnerModel.java (working copy) > @@ -45,6 +45,7 @@ > * > * @version 1.14 05/05/07 > * @author Hans Muller > + * @author Florian Brunner > * @since 1.4 > */ > public abstract class AbstractSpinnerModel implements SpinnerModel, Serializable > @@ -99,8 +100,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > > @@ -141,3 +141,4 @@ > } > } > > + > Index: classes/javax/swing/ActionMap.java > =================================================================== > --- classes/javax/swing/ActionMap.java (revision 250) > +++ classes/javax/swing/ActionMap.java (working copy) > @@ -54,6 +54,7 @@ > * > * @version 1.21 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > * @since 1.3 > */ > public class ActionMap implements Serializable { > @@ -198,8 +199,8 @@ > return pKeys; > } > > - HashMap keyMap = new HashMap(); > - int counter; > + HashMap keyMap = new HashMap(); > + int counter; > > for (counter = keys.length - 1; counter >= 0; counter--) { > keyMap.put(keys[counter], keys[counter]); > Index: classes/javax/swing/AncestorNotifier.java > =================================================================== > --- classes/javax/swing/AncestorNotifier.java (revision 250) > +++ classes/javax/swing/AncestorNotifier.java (working copy) > @@ -41,6 +41,7 @@ > /** > * @version 1.27 05/05/07 > * @author Dave Moore > + * @author Florian Brunner > */ > > class AncestorNotifier implements ComponentListener, PropertyChangeListener, Serializable > @@ -63,7 +64,7 @@ > } > > AncestorListener[] getAncestorListeners() { > - return (AncestorListener[])listenerList.getListeners(AncestorListener.class); > + return listenerList.getListeners(AncestorListener.class); > } > > /** > Index: classes/javax/swing/ArrayTable.java > =================================================================== > --- classes/javax/swing/ArrayTable.java (revision 250) > +++ classes/javax/swing/ArrayTable.java (working copy) > @@ -42,6 +42,7 @@ > * @version 1.12 05/05/07 > * @author Georges Saab > * @author Scott Violet > + * @author Florian Brunner > */ > class ArrayTable implements Cloneable { > // Our field for storage > @@ -134,7 +135,7 @@ > if ((size==ARRAY_BOUNDARY) && isArray()) { > grow(); > } > - ((Hashtable)table).put(key, value); > + ((Hashtable)table).put(key, value); > } > } > } > @@ -316,7 +317,7 @@ > */ > private void grow() { > Object[] array = (Object[])table; > - Hashtable tmp = new Hashtable(array.length/2); > + Hashtable tmp = new Hashtable(array.length/2); > for (int i = 0; i tmp.put(array[i], array[i+1]); > } > Index: classes/javax/swing/ButtonGroup.java > =================================================================== > --- classes/javax/swing/ButtonGroup.java (revision 250) > +++ classes/javax/swing/ButtonGroup.java (working copy) > @@ -65,11 +65,12 @@ > * > * @version 1.45 05/05/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class ButtonGroup implements Serializable { > > // the list of buttons participating in this group > - protected Vector buttons = new Vector(); > + protected Vector buttons = new Vector(); > > /** > * The current selection. > Index: classes/javax/swing/colorchooser/DefaultColorSelectionModel.java > =================================================================== > --- classes/javax/swing/colorchooser/DefaultColorSelectionModel.java (revision 250) > +++ classes/javax/swing/colorchooser/DefaultColorSelectionModel.java (working copy) > @@ -35,6 +35,7 @@ > * > * @version 1.22 05/05/07 > * @author Steve Wilson > + * @author Florian Brunner > * > * @see java.awt.Color > */ > @@ -129,8 +130,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > Index: classes/javax/swing/colorchooser/SyntheticImage.java > =================================================================== > --- classes/javax/swing/colorchooser/SyntheticImage.java (revision 250) > +++ classes/javax/swing/colorchooser/SyntheticImage.java (working copy) > @@ -54,6 +54,7 @@ > * > * @version 1.31 05/05/07 > * @author James Gosling > + * @author Florian Brunner > */ > abstract class SyntheticImage implements ImageProducer { > private SyntheticImageGenerator root; > @@ -156,7 +157,7 @@ > > private final static void doPrivileged(final Runnable doRun) { > java.security.AccessController.doPrivileged( > - new java.security.PrivilegedAction() { > + new java.security.PrivilegedAction() { > public Object run() { > doRun.run(); > return null; > Index: classes/javax/swing/DebugGraphicsInfo.java > =================================================================== > --- classes/javax/swing/DebugGraphicsInfo.java (revision 250) > +++ classes/javax/swing/DebugGraphicsInfo.java (working copy) > @@ -33,12 +33,13 @@ > * > * @version 1.20 05/05/07 > * @author Dave Karlton > + * @author Florian Brunner > */ > class DebugGraphicsInfo { > Color flashColor = Color.red; > int flashTime = 100; > int flashCount = 2; > - Hashtable componentToDebug; > + Hashtable componentToDebug; > JFrame debugFrame = null; > java.io.PrintStream stream = System.out; > > @@ -47,10 +48,10 @@ > return; > } > if (componentToDebug == null) { > - componentToDebug = new Hashtable(); > + componentToDebug = new Hashtable(); > } > if (debug > 0) { > - componentToDebug.put(component, new Integer(debug)); > + componentToDebug.put(component, debug); > } else { > componentToDebug.remove(component); > } > @@ -60,7 +61,7 @@ > if (componentToDebug == null) { > return 0; > } else { > - Integer integer = (Integer)componentToDebug.get(component); > + Integer integer = componentToDebug.get(component); > > return integer == null ? 0 : integer.intValue(); > } > @@ -72,3 +73,4 @@ > } > > > + > Index: classes/javax/swing/DefaultBoundedRangeModel.java > =================================================================== > --- classes/javax/swing/DefaultBoundedRangeModel.java (revision 250) > +++ classes/javax/swing/DefaultBoundedRangeModel.java (working copy) > @@ -44,6 +44,7 @@ > * @version 1.54 05/05/07 > * @author David Kloba > * @author Hans Muller > + * @author Florian Brunner > * @see BoundedRangeModel > */ > public class DefaultBoundedRangeModel implements BoundedRangeModel, Serializable > @@ -344,8 +345,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > > @@ -424,3 +424,4 @@ > } > } > > + > Index: classes/javax/swing/DefaultButtonModel.java > =================================================================== > --- classes/javax/swing/DefaultButtonModel.java (revision 250) > +++ classes/javax/swing/DefaultButtonModel.java (working copy) > @@ -45,6 +45,7 @@ > * > * @version 1.55 05/05/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class DefaultButtonModel implements ButtonModel, Serializable { > > @@ -327,8 +328,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > @@ -381,8 +381,7 @@ > * @since 1.4 > */ > public ActionListener[] getActionListeners() { > - return (ActionListener[])listenerList.getListeners( > - ActionListener.class); > + return listenerList.getListeners(ActionListener.class); > } > > /** > @@ -435,7 +434,7 @@ > * @since 1.4 > */ > public ItemListener[] getItemListeners() { > - return (ItemListener[])listenerList.getListeners(ItemListener.class); > + return listenerList.getListeners(ItemListener.class); > } > > /** > Index: classes/javax/swing/DefaultFocusManager.java > =================================================================== > --- classes/javax/swing/DefaultFocusManager.java (revision 250) > +++ classes/javax/swing/DefaultFocusManager.java (working copy) > @@ -46,6 +46,7 @@ > * @version 1.36, 05/05/07 > * @author Arnaud Weber > * @author David Mendenhall > + * @author Florian Brunner > */ > public class DefaultFocusManager extends FocusManager { > > @@ -157,18 +158,17 @@ > } > } > > -final class CompareTabOrderComparator implements Comparator { > +final class CompareTabOrderComparator implements Comparator { > private final DefaultFocusManager defaultFocusManager; > > CompareTabOrderComparator(DefaultFocusManager defaultFocusManager) { > this.defaultFocusManager = defaultFocusManager; > } > > - public int compare(Object o1, Object o2) { > + public int compare(Component o1, Component o2) { > if (o1 == o2) { > return 0; > } > - return (defaultFocusManager.compareTabOrder((Component)o1, > - (Component)o2)) ? -1 : 1; > + return (defaultFocusManager.compareTabOrder(o1, o2)) ? -1 : 1; > } > } > Index: classes/javax/swing/DefaultListSelectionModel.java > =================================================================== > --- classes/javax/swing/DefaultListSelectionModel.java (revision 250) > +++ classes/javax/swing/DefaultListSelectionModel.java (working copy) > @@ -47,6 +47,7 @@ > * @version 1.84 05/05/07 > * @author Philip Milne > * @author Hans Muller > + * @author Florian Brunner > * @see ListSelectionModel > */ > > @@ -133,8 +134,7 @@ > * @since 1.4 > */ > public ListSelectionListener[] getListSelectionListeners() { > - return (ListSelectionListener[])listenerList.getListeners( > - ListSelectionListener.class); > + return listenerList.getListeners(ListSelectionListener.class); > } > > /** > @@ -847,3 +847,4 @@ > } > } > > + > Index: classes/javax/swing/DefaultSingleSelectionModel.java > =================================================================== > --- classes/javax/swing/DefaultSingleSelectionModel.java (revision 250) > +++ classes/javax/swing/DefaultSingleSelectionModel.java (working copy) > @@ -43,6 +43,7 @@ > * > * @version 1.42 05/05/07 > * @author Dave Moore > + * @author Florian Brunner > */ > public class DefaultSingleSelectionModel implements SingleSelectionModel, > Serializable { > @@ -111,8 +112,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > @@ -177,3 +177,4 @@ > } > > > + > Index: classes/javax/swing/filechooser/FileSystemView.java > =================================================================== > --- classes/javax/swing/filechooser/FileSystemView.java (revision 250) > +++ classes/javax/swing/filechooser/FileSystemView.java (working copy) > @@ -63,6 +63,7 @@ > * > * @version 1.55 05/05/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > > // PENDING(jeff) - need to provide a specification for > @@ -440,7 +441,7 @@ > * Gets the list of shown (i.e. not hidden) files. > */ > public File[] getFiles(File dir, boolean useFileHiding) { > - Vector files = new Vector(); > + Vector files = new Vector(); > > > // add all files in dir > @@ -479,7 +480,7 @@ > } > } > > - return (File[])files.toArray(new File[files.size()]); > + return files.toArray(new File[files.size()]); > } > > > Index: classes/javax/swing/GroupLayout.java > =================================================================== > --- classes/javax/swing/GroupLayout.java (revision 250) > +++ classes/javax/swing/GroupLayout.java (working copy) > @@ -203,6 +203,7 @@ > * @author Tomas Pavek > * @author Jan Stola > * @author Scott Violet > + * @author Florian Brunner > * @version 1.9, 05/05/07 > * @since 1.6 > */ > @@ -1120,7 +1121,7 @@ > * creating one if necessary. > */ > private ComponentInfo getComponentInfo(Component component) { > - ComponentInfo info = (ComponentInfo)componentInfos.get(component); > + ComponentInfo info = componentInfos.get(component); > if (info == null) { > info = new ComponentInfo(component); > componentInfos.put(component, info); > Index: classes/javax/swing/InputMap.java > =================================================================== > --- classes/javax/swing/InputMap.java (revision 250) > +++ classes/javax/swing/InputMap.java (working copy) > @@ -51,6 +51,7 @@ > * > * @version 1.21 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > * @since 1.3 > */ > public class InputMap implements Serializable { > @@ -201,7 +202,7 @@ > return pKeys; > } > > - HashMap keyMap = new HashMap(); > + HashMap keyMap = new HashMap(); > int counter; > > for (counter = keys.length - 1; counter >= 0; counter--) { > @@ -213,7 +214,7 @@ > > KeyStroke[] allKeys = new KeyStroke[keyMap.size()]; > > - return (KeyStroke[])keyMap.keySet().toArray(allKeys); > + return keyMap.keySet().toArray(allKeys); > } > > private void writeObject(ObjectOutputStream s) throws IOException { > Index: classes/javax/swing/JComboBox.java > =================================================================== > --- classes/javax/swing/JComboBox.java (revision 250) > +++ classes/javax/swing/JComboBox.java (working copy) > @@ -76,6 +76,7 @@ > * @version 1.147 05/05/07 > * @author Arnaud Weber > * @author Mark Davidson > + * @author Florian Brunner > */ > public class JComboBox extends JComponent > implements ItemSelectable,ListDataListener,ActionListener, Accessible { > @@ -857,7 +858,7 @@ > * @since 1.4 > */ > public ItemListener[] getItemListeners() { > - return (ItemListener[])listenerList.getListeners(ItemListener.class); > + return listenerList.getListeners(ItemListener.class); > } > > /** > @@ -895,8 +896,7 @@ > * @since 1.4 > */ > public ActionListener[] getActionListeners() { > - return (ActionListener[])listenerList.getListeners( > - ActionListener.class); > + return listenerList.getListeners(ActionListener.class); > } > > /** > @@ -935,8 +935,7 @@ > * @since 1.4 > */ > public PopupMenuListener[] getPopupMenuListeners() { > - return (PopupMenuListener[])listenerList.getListeners( > - PopupMenuListener.class); > + return listenerList.getListeners(PopupMenuListener.class); > } > > /** > Index: classes/javax/swing/JComponent.java > =================================================================== > --- classes/javax/swing/JComponent.java (revision 250) > +++ classes/javax/swing/JComponent.java (working copy) > @@ -177,6 +177,7 @@ > * @version 2.291, 05/05/07 > * @author Hans Muller > * @author Arnaud Weber > + * @author Florian Brunner > */ > public abstract class JComponent extends Container implements Serializable, > TransferHandler.HasGetTransferHandler > @@ -190,7 +191,8 @@ > /** > * @see #readObject > */ > - private static final Hashtable readObjectCallbacks = new Hashtable(1); > + private static final Hashtable readObjectCallbacks = > + new Hashtable(1); > > /** > * Keys to use for forward focus traversal when the JComponent is > @@ -354,7 +356,7 @@ > /** > * Temporary rectangles. > */ > - private static java.util.List tempRectangles = new java.util.ArrayList(11); > + private static java.util.List tempRectangles = new java.util.ArrayList(11); > > /** Used for WHEN_FOCUSED bindings. */ > private InputMap focusInputMap; > @@ -449,7 +451,7 @@ > Rectangle rect; > int size = tempRectangles.size(); > if (size > 0) { > - rect = (Rectangle)tempRectangles.remove(size - 1); > + rect = tempRectangles.remove(size - 1); > } > else { > rect = new Rectangle(0, 0, 0, 0); > @@ -2091,8 +2093,8 @@ > private void registerWithKeyboardManager(boolean onlyIfNew) { > InputMap inputMap = getInputMap(WHEN_IN_FOCUSED_WINDOW, false); > KeyStroke[] strokes; > - Hashtable registered = (Hashtable)getClientProperty > - (WHEN_IN_FOCUSED_WINDOW_BINDINGS); > + Hashtable registered = > + (Hashtable)getClientProperty(WHEN_IN_FOCUSED_WINDOW_BINDINGS); > > if (inputMap != null) { > // Push any new KeyStrokes to the KeyboardManager. > @@ -2126,7 +2128,7 @@ > // Updated the registered Hashtable. > if (strokes != null && strokes.length > 0) { > if (registered == null) { > - registered = new Hashtable(strokes.length); > + registered = new Hashtable(strokes.length); > putClientProperty(WHEN_IN_FOCUSED_WINDOW_BINDINGS, registered); > } > for (int counter = strokes.length - 1; counter >= 0; counter--) { > @@ -4092,13 +4094,13 @@ > if (!getFlag(FOCUS_TRAVERSAL_KEYS_FORWARD_SET)) { > super.setFocusTraversalKeys(KeyboardFocusManager. > FORWARD_TRAVERSAL_KEYS, > - (Set)value); > + (Set)value); > } > } else if (propertyName == "focusTraversalKeysBackward") { > if (!getFlag(FOCUS_TRAVERSAL_KEYS_BACKWARD_SET)) { > super.setFocusTraversalKeys(KeyboardFocusManager. > BACKWARD_TRAVERSAL_KEYS, > - (Set)value); > + (Set)value); > } > } else { > throw new IllegalArgumentException("property \""+ > @@ -4688,7 +4690,7 @@ > result = (T[])getPropertyChangeListeners(); > } > else { > - result = (T[])listenerList.getListeners(listenerType); > + result = listenerList.getListeners(listenerType); > } > > if (result.length == 0) { > @@ -5340,7 +5342,7 @@ > */ > private class ReadObjectCallback implements ObjectInputValidation > { > - private final Vector roots = new Vector(1); > + private final Vector roots = new Vector(1); > private final ObjectInputStream inputStream; > > ReadObjectCallback(ObjectInputStream s) throws Exception { > @@ -5357,7 +5359,7 @@ > public void validateObject() throws InvalidObjectException { > try { > for(int i = 0; i < roots.size(); i++) { > - JComponent root = (JComponent)(roots.elementAt(i)); > + JComponent root = roots.elementAt(i); > SwingUtilities.updateComponentTreeUI(root); > } > } > @@ -5378,7 +5380,7 @@ > * existing roots (or it IS an existing root), we're done. > */ > for(int i = 0; i < roots.size(); i++) { > - JComponent root = (JComponent)roots.elementAt(i); > + JComponent root = roots.elementAt(i); > for(Component p = c; p != null; p = p.getParent()) { > if (p == root) { > return; > @@ -5391,7 +5393,7 @@ > * to the roots vector. > */ > for(int i = 0; i < roots.size(); i++) { > - JComponent root = (JComponent)roots.elementAt(i); > + JComponent root = roots.elementAt(i); > for(Component p = root.getParent(); p != null; p = p.getParent()) { > if (p == c) { > roots.removeElementAt(i--); // !! > @@ -5423,7 +5425,7 @@ > * in the readObjectCallbacks table. Note that the ReadObjectCallback > * constructor takes care of calling s.registerValidation(). > */ > - ReadObjectCallback cb = (ReadObjectCallback)(readObjectCallbacks.get(s)); > + ReadObjectCallback cb = readObjectCallbacks.get(s); > if (cb == null) { > try { > readObjectCallbacks.put(s, cb = new ReadObjectCallback(s)); > Index: classes/javax/swing/JDesktopPane.java > =================================================================== > --- classes/javax/swing/JDesktopPane.java (revision 250) > +++ classes/javax/swing/JDesktopPane.java (working copy) > @@ -86,6 +86,7 @@ > * > * @version 1.64 05/05/07 > * @author David Kloba > + * @author Florian Brunner > */ > public class JDesktopPane extends JLayeredPane implements Accessible > { > @@ -263,8 +264,8 @@ > public JInternalFrame[] getAllFrames() { > int i, count; > JInternalFrame[] results; > - Vector vResults = new Vector(10); > - Object next, tmp; > + Vector vResults = new Vector(10); > + Component next, tmp; > > count = getComponentCount(); > for(i = 0; i < count; i++) { > @@ -325,8 +326,8 @@ > public JInternalFrame[] getAllFramesInLayer(int layer) { > int i, count; > JInternalFrame[] results; > - Vector vResults = new Vector(10); > - Object next, tmp; > + Vector vResults = new Vector(10); > + Component next, tmp; > > count = getComponentCount(); > for(i = 0; i < count; i++) { > @@ -636,3 +637,4 @@ > } > } > > + > Index: classes/javax/swing/JDialog.java > =================================================================== > --- classes/javax/swing/JDialog.java (revision 250) > +++ classes/javax/swing/JDialog.java (working copy) > @@ -99,6 +99,7 @@ > * @author David Kloba > * @author James Gosling > * @author Scott Violet > + * @author Florian Brunner > */ > public class JDialog extends Dialog implements WindowConstants, > Accessible, > @@ -278,7 +279,7 @@ > title, modal); > if (owner == null) { > WindowListener ownerShutdownListener = > - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); > + SwingUtilities.getSharedOwnerFrameShutdownListener(); > addWindowListener(ownerShutdownListener); > } > dialogInit(); > @@ -330,7 +331,7 @@ > title, modal, gc); > if (owner == null) { > WindowListener ownerShutdownListener = > - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); > + SwingUtilities.getSharedOwnerFrameShutdownListener(); > addWindowListener(ownerShutdownListener); > } > dialogInit(); > Index: classes/javax/swing/JEditorPane.java > =================================================================== > --- classes/javax/swing/JEditorPane.java (revision 250) > +++ classes/javax/swing/JEditorPane.java (working copy) > @@ -186,6 +186,7 @@ > * description: A text component to edit various types of content. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.145 05/05/07 > */ > public class JEditorPane extends JTextComponent { > @@ -320,8 +321,7 @@ > * @since 1.4 > */ > public synchronized HyperlinkListener[] getHyperlinkListeners() { > - return (HyperlinkListener[])listenerList.getListeners( > - HyperlinkListener.class); > + return listenerList.getListeners(HyperlinkListener.class); > } > > /** > @@ -835,7 +835,7 @@ > */ > private void handleConnectionProperties(URLConnection conn) { > if (pageProperties == null) { > - pageProperties = new Hashtable(); > + pageProperties = new Hashtable(); > } > String type = conn.getContentType(); > if (type != null) { > @@ -1138,9 +1138,9 @@ > */ > public EditorKit getEditorKitForContentType(String type) { > if (typeHandlers == null) { > - typeHandlers = new Hashtable(3); > + typeHandlers = new Hashtable(3); > } > - EditorKit k = (EditorKit) typeHandlers.get(type); > + EditorKit k = typeHandlers.get(type); > if (k == null) { > k = createEditorKitForContentType(type); > if (k != null) { > @@ -1164,7 +1164,7 @@ > */ > public void setEditorKitForContentType(String type, EditorKit k) { > if (typeHandlers == null) { > - typeHandlers = new Hashtable(3); > + typeHandlers = new Hashtable(3); > } > typeHandlers.put(type, k); > } > @@ -1240,12 +1240,12 @@ > */ > public static EditorKit createEditorKitForContentType(String type) { > EditorKit k = null; > - Hashtable kitRegistry = getKitRegisty(); > - k = (EditorKit) kitRegistry.get(type); > + Hashtable kitRegistry = getKitRegisty(); > + k = kitRegistry.get(type); > if (k == null) { > // try to dynamically load the support > - String classname = (String) getKitTypeRegistry().get(type); > - ClassLoader loader = (ClassLoader) getKitLoaderRegistry().get(type); > + String classname = getKitTypeRegistry().get(type); > + ClassLoader loader = getKitLoaderRegistry().get(type); > try { > Class c; > if (loader != null) { > @@ -1315,23 +1315,24 @@ > * @since 1.3 > */ > public static String getEditorKitClassNameForContentType(String type) { > - return (String)getKitTypeRegistry().get(type); > + return getKitTypeRegistry().get(type); > } > > - private static Hashtable getKitTypeRegistry() { > + private static Hashtable getKitTypeRegistry() { > loadDefaultKitsIfNecessary(); > - return (Hashtable)SwingUtilities.appContextGet(kitTypeRegistryKey); > + return (Hashtable)SwingUtilities.appContextGet(kitTypeRegistryKey); > } > > - private static Hashtable getKitLoaderRegistry() { > + private static Hashtable getKitLoaderRegistry() { > loadDefaultKitsIfNecessary(); > - return (Hashtable)SwingUtilities.appContextGet(kitLoaderRegistryKey); > + return (Hashtable)SwingUtilities.appContextGet(kitLoaderRegistryKey); > } > > - private static Hashtable getKitRegisty() { > - Hashtable ht = (Hashtable)SwingUtilities.appContextGet(kitRegistryKey); > + private static Hashtable getKitRegisty() { > + Hashtable ht = > + (Hashtable)SwingUtilities.appContextGet(kitRegistryKey); > if (ht == null) { > - ht = new Hashtable(3); > + ht = new Hashtable(3); > SwingUtilities.appContextPut(kitRegistryKey, ht); > } > return ht; > @@ -1584,7 +1585,7 @@ > private EditorKit kit; > private boolean isUserSetEditorKit; > > - private Hashtable pageProperties; > + private Hashtable pageProperties; > > /** Should be kept in sync with javax.swing.text.html.FormView counterpart. */ > final static String PostDataProperty = "javax.swing.JEditorPane.postdata"; > @@ -1592,7 +1593,7 @@ > /** > * Table of registered type handlers for this editor. > */ > - private Hashtable typeHandlers; > + private Hashtable typeHandlers; > > /* > * Private AppContext keys for this class's static variables. > @@ -2473,3 +2474,4 @@ > > } > > + > Index: classes/javax/swing/JFileChooser.java > =================================================================== > --- classes/javax/swing/JFileChooser.java (revision 250) > +++ classes/javax/swing/JFileChooser.java (working copy) > @@ -87,6 +87,7 @@ > * > * @version 1.123 05/09/07 > * @author Jeff Dinkins > + * @author Florian Brunner > * > */ > public class JFileChooser extends JComponent implements Accessible { > @@ -249,7 +250,7 @@ > private String approveButtonToolTipText = null; > private int approveButtonMnemonic = 0; > > - private Vector filters = new Vector(5); > + private Vector filters = new Vector(5); > private JDialog dialog = null; > private int dialogType = OPEN_DIALOG; > private int returnValue = ERROR_OPTION; > @@ -504,7 +505,7 @@ > if(selectedFiles == null) { > return new File[0]; > } else { > - return (File[]) selectedFiles.clone(); > + return selectedFiles.clone(); > } > } > > @@ -1414,7 +1415,7 @@ > fileFilter = filter; > if (filter != null) { > if (isMultiSelectionEnabled() && selectedFiles != null && selectedFiles.length > 0) { > - Vector fList = new Vector(); > + Vector fList = new Vector(); > boolean failed = false; > for (int i = 0; i < selectedFiles.length; i++) { > if (filter.accept(selectedFiles[i])) { > @@ -1424,7 +1425,7 @@ > } > } > if (failed) { > - setSelectedFiles((fList.size() == 0) ? null : (File[])fList.toArray(new File[fList.size()])); > + setSelectedFiles((fList.size() == 0) ? null : fList.toArray(new File[fList.size()])); > } > } else if (selectedFile != null && !filter.accept(selectedFile)) { > setSelectedFile(null); > @@ -1701,8 +1702,7 @@ > * @since 1.4 > */ > public ActionListener[] getActionListeners() { > - return (ActionListener[])listenerList.getListeners( > - ActionListener.class); > + return listenerList.getListeners(ActionListener.class); > } > > /** > @@ -1743,7 +1743,7 @@ > WeakReference jfcRef; > > public WeakPCL(JFileChooser jfc) { > - jfcRef = new WeakReference(jfc); > + jfcRef = new WeakReference(jfc); > } > public void propertyChange(PropertyChangeEvent ev) { > assert ev.getPropertyName().equals(SHOW_HIDDEN_PROP); > Index: classes/javax/swing/JInternalFrame.java > =================================================================== > --- classes/javax/swing/JInternalFrame.java (revision 250) > +++ classes/javax/swing/JInternalFrame.java (working copy) > @@ -108,6 +108,7 @@ > * @version 1.164 05/05/07 > * @author David Kloba > * @author Rich Schiavi > + * @author Florian Brunner > * @beaninfo > * attribute: isContainer true > * attribute: containerDelegate getContentPane > @@ -1536,8 +1537,7 @@ > * @see #addInternalFrameListener > */ > public InternalFrameListener[] getInternalFrameListeners() { > - return (InternalFrameListener[])listenerList.getListeners( > - InternalFrameListener.class); > + return listenerList.getListeners(InternalFrameListener.class); > } > > // remind: name ok? all one method ok? need to be synchronized? > Index: classes/javax/swing/JLayeredPane.java > =================================================================== > --- classes/javax/swing/JLayeredPane.java (revision 250) > +++ classes/javax/swing/JLayeredPane.java (working copy) > @@ -153,6 +153,7 @@ > * > * @version 1.36 02/02/00 > * @author David Kloba > + * @author Florian Brunner > */ > public class JLayeredPane extends JComponent implements Accessible { > /// Watch the values in getObjectForLayer() > @@ -365,7 +366,7 @@ > if(c instanceof JComponent) > ((JComponent)c).putClientProperty(LAYER_PROPERTY, layerObj); > else > - getComponentToLayer().put((Component)c, layerObj); > + getComponentToLayer().put(c, layerObj); > > if(c.getParent() == null || c.getParent() != this) { > repaint(c.getBounds()); > @@ -389,7 +390,7 @@ > if(c instanceof JComponent) > i = (Integer)((JComponent)c).getClientProperty(LAYER_PROPERTY); > else > - i = (Integer)getComponentToLayer().get((Component)c); > + i = getComponentToLayer().get(c); > > if(i == null) > return DEFAULT_LAYER.intValue(); > @@ -781,3 +782,4 @@ > } > > > + > Index: classes/javax/swing/JList.java > =================================================================== > --- classes/javax/swing/JList.java (revision 250) > +++ classes/javax/swing/JList.java (working copy) > @@ -264,6 +264,7 @@ > * > * @version 1.142 05/05/07 > * @author Hans Muller > + * @author Florian Brunner > */ > public class JList extends JComponent implements Scrollable, Accessible > { > @@ -1846,8 +1847,7 @@ > * @since 1.4 > */ > public ListSelectionListener[] getListSelectionListeners() { > - return (ListSelectionListener[])listenerList.getListeners( > - ListSelectionListener.class); > + return listenerList.getListeners(ListSelectionListener.class); > } > > > @@ -3683,3 +3683,4 @@ > } // inner class AccessibleJList > } > > + > Index: classes/javax/swing/JMenu.java > =================================================================== > --- classes/javax/swing/JMenu.java (revision 250) > +++ classes/javax/swing/JMenu.java (working copy) > @@ -105,6 +105,7 @@ > * @author Georges Saab > * @author David Karlton > * @author Arnaud Weber > + * @author Florian Brunner > * @see JMenuItem > * @see JSeparator > * @see JMenuBar > @@ -1016,7 +1017,7 @@ > * @since 1.4 > */ > public MenuListener[] getMenuListeners() { > - return (MenuListener[])listenerList.getListeners(MenuListener.class); > + return listenerList.getListeners(MenuListener.class); > } > > /** > @@ -1306,7 +1307,7 @@ > * @return the array of menu items > */ > private MenuElement[] buildMenuElementArray(JMenu leaf) { > - Vector elements = new Vector(); > + Vector elements = new Vector(); > Component current = leaf.getPopupMenu(); > JPopupMenu pop; > JMenu menu; > @@ -1626,3 +1627,4 @@ > > } > > + > Index: classes/javax/swing/JMenuBar.java > =================================================================== > --- classes/javax/swing/JMenuBar.java (revision 250) > +++ classes/javax/swing/JMenuBar.java (working copy) > @@ -78,6 +78,7 @@ > * @author Georges Saab > * @author David Karlton > * @author Arnaud Weber > + * @author Florian Brunner > * @see JMenu > * @see JPopupMenu > * @see JMenuItem > @@ -413,7 +414,7 @@ > */ > public MenuElement[] getSubElements() { > MenuElement result[]; > - Vector tmp = new Vector(); > + Vector tmp = new Vector(); > int c = getComponentCount(); > int i; > Component m; > @@ -421,12 +422,12 @@ > for(i=0 ; i < c ; i++) { > m = getComponent(i); > if(m instanceof MenuElement) > - tmp.addElement(m); > + tmp.addElement((MenuElement) m); > } > > result = new MenuElement[tmp.size()]; > for(i=0,c=tmp.size() ; i < c ; i++) > - result[i] = (MenuElement) tmp.elementAt(i); > + result[i] = tmp.elementAt(i); > return result; > } > > @@ -764,3 +765,4 @@ > } > } > > + > Index: classes/javax/swing/JMenuItem.java > =================================================================== > --- classes/javax/swing/JMenuItem.java (revision 250) > +++ classes/javax/swing/JMenuItem.java (working copy) > @@ -83,6 +83,7 @@ > * @version 1.134 05/05/07 > * @author Georges Saab > * @author David Karlton > + * @author Florian Brunner > * @see JPopupMenu > * @see JMenu > * @see JCheckBoxMenuItem > @@ -276,7 +277,7 @@ > * hidden: true > */ > public void setArmed(boolean b) { > - ButtonModel model = (ButtonModel) getModel(); > + ButtonModel model = getModel(); > > boolean oldValue = model.isArmed(); > if(model.isArmed() != b) { > @@ -291,7 +292,7 @@ > * @see #setArmed > */ > public boolean isArmed() { > - ButtonModel model = (ButtonModel) getModel(); > + ButtonModel model = getModel(); > return model.isArmed(); > } > > @@ -722,8 +723,7 @@ > * @since 1.4 > */ > public MenuDragMouseListener[] getMenuDragMouseListeners() { > - return (MenuDragMouseListener[])listenerList.getListeners( > - MenuDragMouseListener.class); > + return listenerList.getListeners(MenuDragMouseListener.class); > } > > /** > @@ -753,8 +753,7 @@ > * @since 1.4 > */ > public MenuKeyListener[] getMenuKeyListeners() { > - return (MenuKeyListener[])listenerList.getListeners( > - MenuKeyListener.class); > + return listenerList.getListeners(MenuKeyListener.class); > } > > /** > @@ -949,3 +948,4 @@ > > } > > + > Index: classes/javax/swing/JOptionPane.java > =================================================================== > --- classes/javax/swing/JOptionPane.java (revision 250) > +++ classes/javax/swing/JOptionPane.java (working copy) > @@ -312,6 +312,7 @@ > * @version 1.108 05/05/07 > * @author James Gosling > * @author Scott Violet > + * @author Florian Brunner > */ > public class JOptionPane extends JComponent implements Accessible > { > @@ -964,7 +965,7 @@ > } > if (window instanceof SwingUtilities.SharedOwnerFrame) { > WindowListener ownerShutdownListener = > - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); > + SwingUtilities.getSharedOwnerFrameShutdownListener(); > dialog.addWindowListener(ownerShutdownListener); > } > initDialog(dialog, style, parentComponent); > @@ -1301,11 +1302,11 @@ > > // Use reflection to get Container.startLWModal. > try { > - Object obj; > - obj = AccessController.doPrivileged(new ModalPrivilegedAction( > + Method method; > + method = AccessController.doPrivileged(new ModalPrivilegedAction( > Container.class, "startLWModal")); > - if (obj != null) { > - ((Method)obj).invoke(dialog, (Object[])null); > + if (method != null) { > + method.invoke(dialog, (Object[])null); > } > } catch (IllegalAccessException ex) { > } catch (IllegalArgumentException ex) { > @@ -1447,11 +1448,11 @@ > > // Use reflection to get Container.startLWModal. > try { > - Object obj; > - obj = AccessController.doPrivileged(new ModalPrivilegedAction( > + Method method; > + method = AccessController.doPrivileged(new ModalPrivilegedAction( > Container.class, "startLWModal")); > - if (obj != null) { > - ((Method)obj).invoke(dialog, (Object[])null); > + if (method != null) { > + method.invoke(dialog, (Object[])null); > } > } catch (IllegalAccessException ex) { > } catch (IllegalArgumentException ex) { > @@ -1532,12 +1533,12 @@ > event.getPropertyName().equals(VALUE_PROPERTY)) { > // Use reflection to get Container.stopLWModal(). > try { > - Object obj; > - obj = AccessController.doPrivileged( > + Method method; > + method = AccessController.doPrivileged( > new ModalPrivilegedAction( > Container.class, "stopLWModal")); > - if (obj != null) { > - ((Method)obj).invoke(iFrame, (Object[])null); > + if (method != null) { > + method.invoke(iFrame, (Object[])null); > } > } catch (IllegalAccessException ex) { > } catch (IllegalArgumentException ex) { > @@ -2328,7 +2329,7 @@ > > // Serialization support. > private void writeObject(ObjectOutputStream s) throws IOException { > - Vector values = new Vector(); > + Vector values = new Vector(); > > s.defaultWriteObject(); > // Save the icon, if its Serializable. > @@ -2343,7 +2344,7 @@ > } > // Save the treeModel, if its Serializable. > if(options != null) { > - Vector serOptions = new Vector(); > + Vector serOptions = new Vector(); > > for(int counter = 0, maxCounter = options.length; > counter < maxCounter; counter++) > @@ -2511,16 +2512,16 @@ > /** > * Retrieves a method from the provided class and makes it accessible. > */ > - private static class ModalPrivilegedAction implements PrivilegedAction { > - private Class clazz; > + private static class ModalPrivilegedAction implements PrivilegedAction { > + private Class clazz; > private String methodName; > > - public ModalPrivilegedAction(Class clazz, String methodName) { > + public ModalPrivilegedAction(Class clazz, String methodName) { > this.clazz = clazz; > this.methodName = methodName; > } > > - public Object run() { > + public Method run() { > Method method = null; > try { > method = clazz.getDeclaredMethod(methodName, (Class[])null); > @@ -2596,3 +2597,4 @@ > } // inner class AccessibleJOptionPane > } > > + > Index: classes/javax/swing/JPopupMenu.java > =================================================================== > --- classes/javax/swing/JPopupMenu.java (revision 250) > +++ classes/javax/swing/JPopupMenu.java (working copy) > @@ -80,6 +80,7 @@ > * @author Georges Saab > * @author David Karlton > * @author Arnaud Weber > + * @author Florian Brunner > */ > public class JPopupMenu extends JComponent implements Accessible,MenuElement { > > @@ -557,7 +558,7 @@ > > int nitems = getComponentCount(); > // PENDING(ges): Why not use an array? > - Vector tempItems = new Vector(); > + Vector tempItems = new Vector(); > > /* Remove the item at index, nitems-index times > storing them in a temporary vector in the > @@ -574,7 +575,7 @@ > already in the correct order in the temp vector. > */ > for (int i = 0; i < tempItems.size() ; i++) { > - add((Component)tempItems.elementAt(i)); > + add(tempItems.elementAt(i)); > } > } > > @@ -605,8 +606,7 @@ > * @since 1.4 > */ > public PopupMenuListener[] getPopupMenuListeners() { > - return (PopupMenuListener[])listenerList.getListeners( > - PopupMenuListener.class); > + return listenerList.getListeners(PopupMenuListener.class); > } > > /** > @@ -638,8 +638,7 @@ > * @since 1.5 > */ > public MenuKeyListener[] getMenuKeyListeners() { > - return (MenuKeyListener[])listenerList.getListeners( > - MenuKeyListener.class); > + return listenerList.getListeners(MenuKeyListener.class); > } > > /** > @@ -1291,7 +1290,7 @@ > // Serialization support. > //////////// > private void writeObject(ObjectOutputStream s) throws IOException { > - Vector values = new Vector(); > + Vector values = new Vector(); > > s.defaultWriteObject(); > // Save the invoker, if its Serializable. > @@ -1474,7 +1473,7 @@ > */ > public MenuElement[] getSubElements() { > MenuElement result[]; > - Vector tmp = new Vector(); > + Vector tmp = new Vector(); > int c = getComponentCount(); > int i; > Component m; > @@ -1482,12 +1481,12 @@ > for(i=0 ; i < c ; i++) { > m = getComponent(i); > if(m instanceof MenuElement) > - tmp.addElement(m); > + tmp.addElement((MenuElement) m); > } > > result = new MenuElement[tmp.size()]; > for(i=0,c=tmp.size() ; i < c ; i++) > - result[i] = (MenuElement) tmp.elementAt(i); > + result[i] = tmp.elementAt(i); > return result; > } > > @@ -1537,3 +1536,4 @@ > } > } > > + > Index: classes/javax/swing/JProgressBar.java > =================================================================== > --- classes/javax/swing/JProgressBar.java (revision 250) > +++ classes/javax/swing/JProgressBar.java (working copy) > @@ -129,6 +129,7 @@ > * @version 1.102 05/05/07 > * @author Michael C. Albers > * @author Kathy Walrath > + * @author Florian Brunner > */ > public class JProgressBar extends JComponent implements SwingConstants, Accessible > { > @@ -700,8 +701,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > Index: classes/javax/swing/JScrollBar.java > =================================================================== > --- classes/javax/swing/JScrollBar.java (revision 250) > +++ classes/javax/swing/JScrollBar.java (working copy) > @@ -78,6 +78,7 @@ > * > * @version 1.87 05/05/07 > * @author David Kloba > + * @author Florian Brunner > */ > public class JScrollBar extends JComponent implements Adjustable, Accessible > { > @@ -660,8 +661,7 @@ > * @since 1.4 > */ > public AdjustmentListener[] getAdjustmentListeners() { > - return (AdjustmentListener[])listenerList.getListeners( > - AdjustmentListener.class); > + return listenerList.getListeners(AdjustmentListener.class); > } > > > Index: classes/javax/swing/JSlider.java > =================================================================== > --- classes/javax/swing/JSlider.java (revision 250) > +++ classes/javax/swing/JSlider.java (working copy) > @@ -80,6 +80,7 @@ > * > * @version 1.116 05/05/07 > * @author David Kloba > + * @author Florian Brunner > */ > public class JSlider extends JComponent implements SwingConstants, Accessible { > /** > @@ -410,8 +411,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > > @@ -914,7 +914,7 @@ > throw new IllegalArgumentException( "Label incremement must be > 0" ); > } > > - class SmartHashtable extends Hashtable implements PropertyChangeListener { > + class SmartHashtable extends Hashtable implements PropertyChangeListener { > int increment = 0; > int start = 0; > boolean startAtMin = false; > @@ -963,7 +963,7 @@ > > Enumeration keys = getLabelTable().keys(); > Object key = null; > - Hashtable hashtable = new Hashtable(); > + Hashtable hashtable = new Hashtable(); > > // Save the labels that were added by the developer > while ( keys.hasMoreElements() ) { > Index: classes/javax/swing/JSpinner.java > =================================================================== > --- classes/javax/swing/JSpinner.java (revision 250) > +++ classes/javax/swing/JSpinner.java (working copy) > @@ -123,6 +123,7 @@ > * @version 1.57 05/05/07 > * @author Hans Muller > * @author Lynn Monsanto (accessibility) > + * @author Florian Brunner > * @since 1.4 > */ > public class JSpinner extends JComponent implements Accessible > @@ -433,8 +434,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > > Index: classes/javax/swing/JTabbedPane.java > =================================================================== > --- classes/javax/swing/JTabbedPane.java (revision 250) > +++ classes/javax/swing/JTabbedPane.java (working copy) > @@ -104,6 +104,7 @@ > * @author Dave Moore > * @author Philip Milne > * @author Amy Fowler > + * @author Florian Brunner > * > * @see SingleSelectionModel > */ > @@ -314,8 +315,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > Index: classes/javax/swing/JTable.java > =================================================================== > --- classes/javax/swing/JTable.java (revision 250) > +++ classes/javax/swing/JTable.java (working copy) > @@ -211,6 +211,7 @@ > * @version 1.294 05/05/07 > * @author Philip Milne > * @author Shannon Hickey (printing support) > + * @author Florian Brunner > * @see javax.swing.table.DefaultTableModel > * @see javax.swing.table.TableRowSorter > */ > @@ -1678,9 +1679,9 @@ > if (!forDrop && state != null) { > clearSelection(); > > - int[] rows = (int[])((int[][])state)[0]; > - int[] cols = (int[])((int[][])state)[1]; > - int[] anchleads = (int[])((int[][])state)[2]; > + int[] rows = ((int[][])state)[0]; > + int[] cols = ((int[][])state)[1]; > + int[] anchleads = ((int[][])state)[2]; > > for (int i = 0; i < rows.length; i++) { > addRowSelectionInterval(rows[i], rows[i]); > @@ -1777,7 +1778,7 @@ > boolean oldValue = this.autoCreateRowSorter; > this.autoCreateRowSorter = autoCreateRowSorter; > if (autoCreateRowSorter) { > - setRowSorter(new TableRowSorter(getModel())); > + setRowSorter(new TableRowSorter(getModel())); > } > firePropertyChange("autoCreateRowSorter", oldValue, > autoCreateRowSorter); > @@ -3634,7 +3635,7 @@ > firePropertyChange("model", old, dataModel); > > if (getAutoCreateRowSorter()) { > - setRowSorter(new TableRowSorter(dataModel)); > + setRowSorter(new TableRowSorter(dataModel)); > } > } > } > @@ -5249,7 +5250,7 @@ > return retValue; > } > > - private void setLazyValue(Hashtable h, Class c, String s) { > + private void setLazyValue(Hashtable h, Class c, String s) { > h.put(c, new UIDefaults.ProxyLazyValue(s)); > } > > @@ -5428,7 +5429,7 @@ > this.value = null; > ((JComponent)getComponent()).setBorder(new LineBorder(Color.black)); > try { > - Class type = table.getColumnClass(column); > + Class type = table.getColumnClass(column); > // Since our obligation is to produce a value which is > // assignable for the required type it is OK to use the > // String constructor for columns which are declared > Index: classes/javax/swing/JTextField.java > =================================================================== > --- classes/javax/swing/JTextField.java (revision 250) > +++ classes/javax/swing/JTextField.java (working copy) > @@ -155,6 +155,7 @@ > * description: A component which allows for the editing of a single line of text. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.101 05/05/07 > * @see #setActionCommand > * @see JPasswordField > @@ -476,8 +477,7 @@ > * @since 1.4 > */ > public synchronized ActionListener[] getActionListeners() { > - return (ActionListener[])listenerList.getListeners( > - ActionListener.class); > + return listenerList.getListeners(ActionListener.class); > } > > /** > Index: classes/javax/swing/JTree.java > =================================================================== > --- classes/javax/swing/JTree.java (revision 250) > +++ classes/javax/swing/JTree.java (working copy) > @@ -142,6 +142,7 @@ > * @author Rob Davis > * @author Ray Ryan > * @author Scott Violet > + * @author Florian Brunner > */ > public class JTree extends JComponent implements Scrollable, Accessible > { > @@ -188,7 +189,7 @@ > * information must be determined by visiting all the parent > * paths and seeing if they are visible. > */ > - transient private Hashtable expandedState; > + transient private Hashtable expandedState; > > > /** > @@ -282,7 +283,7 @@ > * Used when setExpandedState is invoked, > * will be a Stack of Stacks. > */ > - transient private Stack expandedStack; > + transient private Stack> expandedStack; > > /** > * Lead selection path, may not be null. > @@ -653,9 +654,9 @@ > @ConstructorProperties({"model"}) > public JTree(TreeModel newModel) { > super(); > - expandedStack = new Stack(); > + expandedStack = new Stack>(); > toggleClickCount = 2; > - expandedState = new Hashtable(); > + expandedState = new Hashtable(); > setLayout(null); > rowHeight = 16; > visibleRowCount = 20; > @@ -1942,7 +1943,7 @@ > return null; > > Enumeration toggledPaths = expandedState.keys(); > - Vector elements = null; > + Vector elements = null; > TreePath path; > Object value; > > @@ -1957,7 +1958,7 @@ > ((Boolean)value).booleanValue() && > parent.isDescendant(path) && isVisible(path)) { > if (elements == null) { > - elements = new Vector(); > + elements = new Vector(); > } > elements.addElement(path); > } > @@ -2019,7 +2020,7 @@ > TreePath path = tree.getPathForRow(this, row); > > if(path != null) { > - Boolean value = (Boolean)expandedState.get(path); > + Boolean value = expandedState.get(path); > > return (value != null && value.booleanValue()); > } > @@ -2705,8 +2706,7 @@ > * @since 1.4 > */ > public TreeExpansionListener[] getTreeExpansionListeners() { > - return (TreeExpansionListener[])listenerList.getListeners( > - TreeExpansionListener.class); > + return listenerList.getListeners(TreeExpansionListener.class); > } > > /** > @@ -2738,8 +2738,7 @@ > * @since 1.4 > */ > public TreeWillExpandListener[] getTreeWillExpandListeners() { > - return (TreeWillExpandListener[])listenerList.getListeners( > - TreeWillExpandListener.class); > + return listenerList.getListeners(TreeWillExpandListener.class); > } > > /** > @@ -2896,8 +2895,7 @@ > * @since 1.4 > */ > public TreeSelectionListener[] getTreeSelectionListeners() { > - return (TreeSelectionListener[])listenerList.getListeners( > - TreeSelectionListener.class); > + return listenerList.getListeners(TreeSelectionListener.class); > } > > /** > @@ -3031,7 +3029,7 @@ > > // Serialization support. > private void writeObject(ObjectOutputStream s) throws IOException { > - Vector values = new Vector(); > + Vector values = new Vector(); > > s.defaultWriteObject(); > // Save the cellRenderer, if its Serializable. > @@ -3078,9 +3076,9 @@ > > // Create an instance of expanded state. > > - expandedState = new Hashtable(); > + expandedState = new Hashtable(); > > - expandedStack = new Stack(); > + expandedStack = new Stack>(); > > Vector values = (Vector)s.readObject(); > int indexCounter = 0; > @@ -3136,7 +3134,7 @@ > Enumeration paths = expandedState.keys(); > > if(paths != null) { > - Vector state = new Vector(); > + Vector state = new Vector(); > > while(paths.hasMoreElements()) { > TreePath path = (TreePath)paths.nextElement(); > @@ -3536,14 +3534,14 @@ > protected void setExpandedState(TreePath path, boolean state) { > if(path != null) { > // Make sure all parents of path are expanded. > - Stack stack; > - TreePath parentPath = path.getParentPath(); > + Stack stack; > + TreePath parentPath = path.getParentPath(); > > if (expandedStack.size() == 0) { > - stack = new Stack(); > + stack = new Stack(); > } > else { > - stack = (Stack)expandedStack.pop(); > + stack = expandedStack.pop(); > } > > try { > @@ -3557,7 +3555,7 @@ > } > } > for(int counter = stack.size() - 1; counter >= 0; counter--) { > - parentPath = (TreePath)stack.pop(); > + parentPath = stack.pop(); > if(!isExpanded(parentPath)) { > try { > fireTreeWillExpand(parentPath); > @@ -3637,12 +3635,10 @@ > if(parent == null) > return null; > > - Vector descendants = new Vector(); > - Enumeration nodes = expandedState.keys(); > - TreePath path; > + Vector descendants = new Vector(); > + Set nodes = expandedState.keySet(); > > - while(nodes.hasMoreElements()) { > - path = (TreePath)nodes.nextElement(); > + for(TreePath path : nodes) { > if(parent.isDescendant(path)) > descendants.addElement(path); > } > @@ -3665,8 +3661,8 @@ > { > if(toRemove != null) { > while(toRemove.hasMoreElements()) { > - Enumeration descendants = getDescendantToggledPaths > - ((TreePath)toRemove.nextElement()); > + Enumeration descendants = getDescendantToggledPaths > + (toRemove.nextElement()); > > if(descendants != null) { > while(descendants.hasMoreElements()) { > @@ -5512,3 +5508,4 @@ > > } // End of class JTree > > + > Index: classes/javax/swing/JViewport.java > =================================================================== > --- classes/javax/swing/JViewport.java (revision 250) > +++ classes/javax/swing/JViewport.java (working copy) > @@ -100,6 +100,7 @@ > * @version 1.128 05/05/07 > * @author Hans Muller > * @author Philip Milne > + * @author Florian Brunner > * @see JScrollPane > */ > public class JViewport extends JComponent implements Accessible > @@ -1379,8 +1380,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > Index: classes/javax/swing/JWindow.java > =================================================================== > --- classes/javax/swing/JWindow.java (revision 250) > +++ classes/javax/swing/JWindow.java (working copy) > @@ -89,6 +89,7 @@ > * > * @version 1.74 05/05/07 > * @author David Kloba > + * @author Florian Brunner > */ > public class JWindow extends Window implements Accessible, > RootPaneContainer, > @@ -186,7 +187,7 @@ > super(owner == null? SwingUtilities.getSharedOwnerFrame() : owner); > if (owner == null) { > WindowListener ownerShutdownListener = > - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); > + SwingUtilities.getSharedOwnerFrameShutdownListener(); > addWindowListener(ownerShutdownListener); > } > windowInit(); > @@ -213,7 +214,7 @@ > owner); > if (owner == null) { > WindowListener ownerShutdownListener = > - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); > + SwingUtilities.getSharedOwnerFrameShutdownListener(); > addWindowListener(ownerShutdownListener); > } > windowInit(); > @@ -251,7 +252,7 @@ > owner, gc); > if (owner == null) { > WindowListener ownerShutdownListener = > - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); > + SwingUtilities.getSharedOwnerFrameShutdownListener(); > addWindowListener(ownerShutdownListener); > } > windowInit(); > Index: classes/javax/swing/KeyboardManager.java > =================================================================== > --- classes/javax/swing/KeyboardManager.java (revision 250) > +++ classes/javax/swing/KeyboardManager.java (working copy) > @@ -60,6 +60,9 @@ > * > * > * @see InputMap > + * > + * @author unattributed > + * @author Florian Brunner > */ > class KeyboardManager { > > @@ -68,13 +71,13 @@ > /** > * maps top-level containers to a sub-hashtable full of keystrokes > */ > - Hashtable containerMap = new Hashtable(); > + Hashtable> containerMap = new Hashtable>(); > > /** > * Maps component/keystroke pairs to a topLevel container > * This is mainly used for fast unregister operations > */ > - Hashtable componentKeyStrokeMap = new Hashtable(); > + Hashtable componentKeyStrokeMap = new Hashtable(); > > public static KeyboardManager getCurrentManager() { > return currentManager; > @@ -95,7 +98,7 @@ > if (topContainer == null) { > return; > } > - Hashtable keyMap = (Hashtable)containerMap.get(topContainer); > + Hashtable keyMap = containerMap.get(topContainer); > > if (keyMap == null) { // lazy evaluate one > keyMap = registerNewTopContainer(topContainer); > @@ -105,7 +108,7 @@ > if (tmp == null) { > keyMap.put(k,c); > } else if (tmp instanceof Vector) { // if there's a Vector there then add to it. > - Vector v = (Vector)tmp; > + Vector v = (Vector)tmp; > if (!v.contains(c)) { // only add if this keystroke isn't registered for this component > v.addElement(c); > } > @@ -114,8 +117,8 @@ > // Then add the old compoennt and the new compoent to the vector > // then insert the vector in the table > if (tmp != c) { // this means this is already registered for this component, no need to dup > - Vector v = new Vector(); > - v.addElement(tmp); > + Vector v = new Vector(); > + v.addElement((JComponent) tmp); > v.addElement(c); > keyMap.put(k, v); > } > @@ -293,17 +296,17 @@ > if (top == null) { > return; > } > - Hashtable keyMap = (Hashtable)containerMap.get(top); > + Hashtable keyMap = containerMap.get(top); > > if (keyMap == null) { // lazy evaluate one > keyMap = registerNewTopContainer(top); > } > // use the menubar class as the key > - Vector menuBars = (Vector)keyMap.get(JMenuBar.class); > + Vector menuBars = (Vector)keyMap.get(JMenuBar.class); > > if (menuBars == null) { // if we don't have a list of menubars, > // then make one. > - menuBars = new Vector(); > + menuBars = new Vector(); > keyMap.put(JMenuBar.class, menuBars); > } > > @@ -334,7 +337,7 @@ > } > } > protected Hashtable registerNewTopContainer(Container topContainer) { > - Hashtable keyMap = new Hashtable(); > + Hashtable keyMap = new Hashtable(); > containerMap.put(topContainer, keyMap); > return keyMap; > } > Index: classes/javax/swing/LayoutComparator.java > =================================================================== > --- classes/javax/swing/LayoutComparator.java (revision 250) > +++ classes/javax/swing/LayoutComparator.java (working copy) > @@ -39,8 +39,9 @@ > * > * @version 1.14, 05/05/07 > * @author David Mendenhall > + * @author Florian Brunner > */ > -final class LayoutComparator implements Comparator, java.io.Serializable { > +final class LayoutComparator implements Comparator, java.io.Serializable { > > private static final int ROW_TOLERANCE = 10; > > @@ -52,10 +53,7 @@ > leftToRight = orientation.isLeftToRight(); > } > > - public int compare(Object o1, Object o2) { > - Component a = (Component)o1; > - Component b = (Component)o2; > - > + public int compare(Component a, Component b) { > if (a == b) { > return 0; > } > @@ -66,9 +64,9 @@ > // each Component and then search from the Window down until the > // hierarchy branches. > if (a.getParent() != b.getParent()) { > - LinkedList aAncestory, bAncestory; > + LinkedList aAncestory, bAncestory; > > - for(aAncestory = new LinkedList(); a != null; a = a.getParent()) { > + for(aAncestory = new LinkedList(); a != null; a = a.getParent()) { > aAncestory.add(a); > if (a instanceof Window) { > break; > @@ -79,7 +77,7 @@ > throw new ClassCastException(); > } > > - for(bAncestory = new LinkedList(); b != null; b = b.getParent()) { > + for(bAncestory = new LinkedList(); b != null; b = b.getParent()) { > bAncestory.add(b); > if (b instanceof Window) { > break; > @@ -90,18 +88,18 @@ > throw new ClassCastException(); > } > > - for (ListIterator > + for (ListIterator > aIter = aAncestory.listIterator(aAncestory.size()), > bIter = bAncestory.listIterator(bAncestory.size()); ;) { > if (aIter.hasPrevious()) { > - a = (Component)aIter.previous(); > + a = aIter.previous(); > } else { > // a is an ancestor of b > return -1; > } > > if (bIter.hasPrevious()) { > - b = (Component)bIter.previous(); > + b = bIter.previous(); > } else { > // b is an ancestor of a > return 1; > Index: classes/javax/swing/LayoutFocusTraversalPolicy.java > =================================================================== > --- classes/javax/swing/LayoutFocusTraversalPolicy.java (revision 250) > +++ classes/javax/swing/LayoutFocusTraversalPolicy.java (working copy) > @@ -43,6 +43,7 @@ > * > * @version 1.18, 05/05/07 > * @author David Mendenhall > + * @author Florian Brunner > * > * @see java.awt.ComponentOrientation > * @since 1.4 > @@ -66,7 +67,7 @@ > * Constructs a LayoutFocusTraversalPolicy with the passed in > * Comparator. > */ > - LayoutFocusTraversalPolicy(Comparator c) { > + LayoutFocusTraversalPolicy(Comparator c) { > super(c); > } > > @@ -258,7 +259,7 @@ > private void readObject(ObjectInputStream in) > throws IOException, ClassNotFoundException > { > - setComparator((Comparator)in.readObject()); > + setComparator((Comparator)in.readObject()); > setImplicitDownCycleTraversal(in.readBoolean()); > } > } > Index: classes/javax/swing/LegacyGlueFocusTraversalPolicy.java > =================================================================== > --- classes/javax/swing/LegacyGlueFocusTraversalPolicy.java (revision 250) > +++ classes/javax/swing/LegacyGlueFocusTraversalPolicy.java (working copy) > @@ -42,6 +42,7 @@ > * > * @version 1.13, 05/05/07 > * @author David Mendenhall > + * @author Florian Brunner > */ > final class LegacyGlueFocusTraversalPolicy extends FocusTraversalPolicy > implements Serializable > @@ -49,8 +50,8 @@ > private transient FocusTraversalPolicy delegatePolicy; > private transient DefaultFocusManager delegateManager; > > - private HashMap forwardMap = new HashMap(), > - backwardMap = new HashMap(); > + private HashMap forwardMap = new HashMap(), > + backwardMap = new HashMap(); > > LegacyGlueFocusTraversalPolicy(FocusTraversalPolicy delegatePolicy) { > this.delegatePolicy = delegatePolicy; > @@ -71,11 +72,11 @@ > public Component getComponentAfter(Container focusCycleRoot, > Component aComponent) { > Component hardCoded = aComponent, prevHardCoded; > - HashSet sanity = new HashSet(); > + HashSet sanity = new HashSet(); > > do { > prevHardCoded = hardCoded; > - hardCoded = (Component)forwardMap.get(hardCoded); > + hardCoded = forwardMap.get(hardCoded); > if (hardCoded == null) { > if (delegatePolicy != null && > prevHardCoded.isFocusCycleRoot(focusCycleRoot)) { > @@ -100,11 +101,11 @@ > public Component getComponentBefore(Container focusCycleRoot, > Component aComponent) { > Component hardCoded = aComponent, prevHardCoded; > - HashSet sanity = new HashSet(); > + HashSet sanity = new HashSet(); > > do { > prevHardCoded = hardCoded; > - hardCoded = (Component)backwardMap.get(hardCoded); > + hardCoded = backwardMap.get(hardCoded); > if (hardCoded == null) { > if (delegatePolicy != null && > prevHardCoded.isFocusCycleRoot(focusCycleRoot)) { > Index: classes/javax/swing/MenuSelectionManager.java > =================================================================== > --- classes/javax/swing/MenuSelectionManager.java (revision 250) > +++ classes/javax/swing/MenuSelectionManager.java (working copy) > @@ -36,9 +36,10 @@ > * > * @version 1.47 05/05/07 > * @author Arnaud Weber > + * @author Florian Brunner > */ > public class MenuSelectionManager { > - private Vector selection = new Vector(); > + private Vector selection = new Vector(); > > /* diagnostic aids -- should be false for production builds. */ > private static final boolean TRACE = false; // trace creates and disposes > @@ -101,14 +102,14 @@ > } > > for(i=0,c=path.length;i - if(i < currentSelectionCount && (MenuElement)selection.elementAt(i) == path[i]) > + if(i < currentSelectionCount && selection.elementAt(i) == path[i]) > firstDifference++; > else > break; > } > > for(i=currentSelectionCount - 1 ; i >= firstDifference ; i--) { > - MenuElement me = (MenuElement)selection.elementAt(i); > + MenuElement me = selection.elementAt(i); > selection.removeElementAt(i); > me.menuSelectionChanged(false); > } > @@ -132,7 +133,7 @@ > MenuElement res[] = new MenuElement[selection.size()]; > int i,c; > for(i=0,c=selection.size();i - res[i] = (MenuElement) selection.elementAt(i); > + res[i] = selection.elementAt(i); > return res; > } > > @@ -173,8 +174,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > @@ -337,7 +337,7 @@ > for(i=0,j=path.length; i for (int k=0; k<=i; k++) > System.out.print(" "); > - MenuElement me = (MenuElement) path[i]; > + MenuElement me = path[i]; > if(me instanceof JMenuItem) { > System.out.println(((JMenuItem)me).getText() + ", "); > } else if (me instanceof JMenuBar) { > @@ -428,7 +428,7 @@ > */ > public void processKeyEvent(KeyEvent e) { > MenuElement[] sel2 = new MenuElement[0]; > - sel2 = (MenuElement[])selection.toArray(sel2); > + sel2 = selection.toArray(sel2); > int selSize = sel2.length; > MenuElement[] path; > > @@ -473,7 +473,7 @@ > */ > public boolean isComponentPartOfCurrentMenu(Component c) { > if(selection.size() > 0) { > - MenuElement me = (MenuElement)selection.elementAt(0); > + MenuElement me = selection.elementAt(0); > return isComponentPartOfCurrentMenu(me,c); > } else > return false; > @@ -500,3 +500,4 @@ > } > > > + > Index: classes/javax/swing/MultiUIDefaults.java > =================================================================== > --- classes/javax/swing/MultiUIDefaults.java (revision 250) > +++ classes/javax/swing/MultiUIDefaults.java (working copy) > @@ -34,6 +34,7 @@ > * > * @version 1.10 02/02/00 > * @author Hans Muller > + * @author Florian Brunner > */ > class MultiUIDefaults extends UIDefaults > { > @@ -103,7 +104,7 @@ > } > > > - public Enumeration keys() > + public Enumeration keys() > { > Enumeration[] enums = new Enumeration[1 + tables.length]; > enums[0] = super.keys(); > @@ -117,7 +118,7 @@ > } > > > - public Enumeration elements() > + public Enumeration elements() > { > Enumeration[] enums = new Enumeration[1 + tables.length]; > enums[0] = super.elements(); > @@ -138,7 +139,7 @@ > } > } > > - private static class MultiUIDefaultsEnumerator implements Enumeration > + private static class MultiUIDefaultsEnumerator implements Enumeration > { > Enumeration[] enums; > int n = 0; > Index: classes/javax/swing/plaf/basic/BasicButtonListener.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicButtonListener.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicButtonListener.java (working copy) > @@ -42,6 +42,7 @@ > * @version 1.75 05/05/07 > * @author Jeff Dinkins > * @author Arnaud Weber (keyboard UI support) > + * @author Florian Brunner > */ > > public class BasicButtonListener implements MouseListener, MouseMotionListener, > @@ -166,7 +167,7 @@ > JRootPane root = b.getRootPane(); > if (root != null) { > BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( > - ((AbstractButton)b).getUI(), BasicButtonUI.class); > + b.getUI(), BasicButtonUI.class); > if (ui != null && DefaultLookup.getBoolean(b, ui, > ui.getPropertyPrefix() + > "defaultButtonFollowsFocus", true)) { > @@ -186,7 +187,7 @@ > JButton initialDefault = (JButton)root.getClientProperty("initialDefaultButton"); > if (b != initialDefault) { > BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( > - ((AbstractButton)b).getUI(), BasicButtonUI.class); > + b.getUI(), BasicButtonUI.class); > if (ui != null && DefaultLookup.getBoolean(b, ui, > ui.getPropertyPrefix() + > "defaultButtonFollowsFocus", true)) { > Index: classes/javax/swing/plaf/basic/BasicButtonUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicButtonUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicButtonUI.java (working copy) > @@ -43,6 +43,7 @@ > * > * @version 1.124 05/05/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class BasicButtonUI extends ButtonUI{ > // Shared UI object > @@ -238,7 +239,7 @@ > > /* the fallback icon should be based on the selected state */ > if (model.isSelected()) { > - selectedIcon = (Icon) b.getSelectedIcon(); > + selectedIcon = b.getSelectedIcon(); > if (selectedIcon != null) { > icon = selectedIcon; > } > @@ -246,31 +247,31 @@ > > if(!model.isEnabled()) { > if(model.isSelected()) { > - tmpIcon = (Icon) b.getDisabledSelectedIcon(); > + tmpIcon = b.getDisabledSelectedIcon(); > if (tmpIcon == null) { > tmpIcon = selectedIcon; > } > } > > if (tmpIcon == null) { > - tmpIcon = (Icon) b.getDisabledIcon(); > + tmpIcon = b.getDisabledIcon(); > } > } else if(model.isPressed() && model.isArmed()) { > - tmpIcon = (Icon) b.getPressedIcon(); > + tmpIcon = b.getPressedIcon(); > if(tmpIcon != null) { > // revert back to 0 offset > clearTextShiftOffset(); > } > } else if(b.isRolloverEnabled() && model.isRollover()) { > if(model.isSelected()) { > - tmpIcon = (Icon) b.getRolloverSelectedIcon(); > + tmpIcon = b.getRolloverSelectedIcon(); > if (tmpIcon == null) { > tmpIcon = selectedIcon; > } > } > > if (tmpIcon == null) { > - tmpIcon = (Icon) b.getRolloverIcon(); > + tmpIcon = b.getRolloverIcon(); > } > } > > Index: classes/javax/swing/plaf/basic/BasicComboBoxEditor.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicComboBoxEditor.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicComboBoxEditor.java (working copy) > @@ -42,6 +42,7 @@ > * @version 1.34 05/05/07 > * @author Arnaud Weber > * @author Mark Davidson > + * @author Florian Brunner > */ > public class BasicComboBoxEditor implements ComboBoxEditor,FocusListener { > protected JTextField editor; > @@ -93,7 +94,7 @@ > return oldValue; > } else { > // Must take the value from the editor and get the value and cast it to the new type. > - Class cls = oldValue.getClass(); > + Class cls = oldValue.getClass(); > try { > Method method = cls.getMethod("valueOf", new Class[]{String.class}); > newValue = method.invoke(oldValue, new Object[] { editor.getText()}); > @@ -166,3 +167,4 @@ > } > } > > + > Index: classes/javax/swing/plaf/basic/BasicDirectoryModel.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicDirectoryModel.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicDirectoryModel.java (working copy) > @@ -39,15 +39,16 @@ > * > * @version %i% %g% > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class BasicDirectoryModel extends AbstractListModel implements PropertyChangeListener { > > private JFileChooser filechooser = null; > // PENDING(jeff) pick the size more sensibly > - private Vector fileCache = new Vector(50); > + private Vector fileCache = new Vector(50); > private LoadFilesThread loadThread = null; > - private Vector files = null; > - private Vector directories = null; > + private Vector files = null; > + private Vector directories = null; > private int fetchID = 0; > > private PropertyChangeSupport changeSupport; > @@ -107,14 +108,14 @@ > if (files != null) { > return files; > } > - files = new Vector(); > - directories = new Vector(); > + files = new Vector(); > + directories = new Vector(); > directories.addElement(filechooser.getFileSystemView().createFileObject( > filechooser.getCurrentDirectory(), "..") > ); > > for (int i = 0; i < getSize(); i++) { > - File f = (File)fileCache.get(i); > + File f = fileCache.get(i); > if (filechooser.isTraversable(f)) { > directories.add(f); > } else { > @@ -216,7 +217,7 @@ > class LoadFilesThread extends Thread { > File currentDirectory = null; > int fid; > - Vector runnables = new Vector(10); > + Vector runnables = new Vector(10); > > public LoadFilesThread(File currentDirectory, int fid) { > super("Basic L&F File Loading Thread"); > @@ -259,11 +260,11 @@ > // First sort alphabetically by filename > sort(acceptsList); > > - Vector newDirectories = new Vector(50); > - Vector newFiles = new Vector(); > + Vector newDirectories = new Vector(50); > + Vector newFiles = new Vector(); > // run through list grabbing directories in chunks of ten > for(int i = 0; i < acceptsList.size(); i++) { > - File f = (File) acceptsList.elementAt(i); > + File f = acceptsList.elementAt(i); > boolean isTraversable = filechooser.isTraversable(f); > if (isTraversable) { > newDirectories.addElement(f); > @@ -275,7 +276,7 @@ > } > } > > - Vector newFileCache = new Vector(newDirectories); > + Vector newFileCache = new Vector(newDirectories); > newFileCache.addAll(newFiles); > > int newSize = newFileCache.size(); > @@ -321,7 +322,7 @@ > if(isInterrupted()) { > return; > } > - invokeLater(new DoChangeContents(null, 0, new Vector(fileCache.subList(start, end)), > + invokeLater(new DoChangeContents(null, 0, new Vector(fileCache.subList(start, end)), > start, fid)); > newFileCache = null; > } > @@ -450,15 +451,15 @@ > > > class DoChangeContents implements Runnable { > - private List addFiles; > - private List remFiles; > + private List addFiles; > + private List remFiles; > private boolean doFire = true; > private int fid; > private int addStart = 0; > private int remStart = 0; > private int change; > > - public DoChangeContents(List addFiles, int addStart, List remFiles, int remStart, int fid) { > + public DoChangeContents(List addFiles, int addStart, List remFiles, int remStart, int fid) { > this.addFiles = addFiles; > this.addStart = addStart; > this.remFiles = remFiles; > @@ -496,3 +497,4 @@ > } > } > > + > Index: classes/javax/swing/plaf/basic/BasicFileChooserUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicFileChooserUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicFileChooserUI.java (working copy) > @@ -46,6 +46,7 @@ > * > * @version %i% %g% > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class BasicFileChooserUI extends FileChooserUI { > > @@ -158,9 +159,9 @@ > } > > public void uninstallUI(JComponent c) { > - uninstallListeners((JFileChooser) filechooser); > - uninstallComponents((JFileChooser) filechooser); > - uninstallDefaults((JFileChooser) filechooser); > + uninstallListeners(filechooser); > + uninstallComponents(filechooser); > + uninstallDefaults(filechooser); > > if(accessoryPanel != null) { > accessoryPanel.removeAll(); > @@ -498,7 +499,7 @@ > setDirectorySelected(true); > setDirectory(((File)objects[0])); > } else { > - ArrayList fList = new ArrayList(objects.length); > + ArrayList fList = new ArrayList(objects.length); > for (int i = 0; i < objects.length; i++) { > File f = (File)objects[i]; > boolean isDir = f.isDirectory(); > @@ -510,7 +511,7 @@ > } > } > if (fList.size() > 0) { > - files = (File[])fList.toArray(new File[fList.size()]); > + files = fList.toArray(new File[fList.size()]); > } > setDirectorySelected(false); > } > @@ -836,7 +837,7 @@ > } > > if (chooser.isMultiSelectionEnabled() && filename.startsWith("\"")) { > - ArrayList fList = new ArrayList(); > + ArrayList fList = new ArrayList(); > > filename = filename.substring(1); > if (filename.endsWith("\"")) { > @@ -872,7 +873,7 @@ > fList.add(file); > } while (filename.length() > 0); > if (fList.size() > 0) { > - selectedFiles = (File[])fList.toArray(new File[fList.size()]); > + selectedFiles = fList.toArray(new File[fList.size()]); > } > resetGlobFilter(); > } else { > @@ -1196,7 +1197,7 @@ > } > > public Icon getCachedIcon(File f) { > - return (Icon) iconCache.get(f); > + return iconCache.get(f); > } > > public void cacheIcon(File f, Icon i) { > @@ -1320,7 +1321,7 @@ > */ > protected Object getRicherData(DataFlavor flavor) { > if (DataFlavor.javaFileListFlavor.equals(flavor)) { > - ArrayList files = new ArrayList(); > + ArrayList files = new ArrayList(); > for (int i = 0; i < fileData.length; i++) { > files.add(fileData[i]); > } > Index: classes/javax/swing/plaf/basic/BasicGraphicsUtils.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicGraphicsUtils.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicGraphicsUtils.java (working copy) > @@ -40,6 +40,7 @@ > /* > * @version 1.44 02/11/99 > * @author Hans Muller > + * @author Florian Brunner > */ > > public class BasicGraphicsUtils > @@ -267,7 +268,7 @@ > return null; > } > > - Icon icon = (Icon) b.getIcon(); > + Icon icon = b.getIcon(); > String text = b.getText(); > > Font font = b.getFont(); > Index: classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java (working copy) > @@ -57,6 +57,7 @@ > * @version 1.41 01/18/01 > * @author David Kloba > * @author Steve Wilson > + * @author Florian Brunner > */ > public class BasicInternalFrameTitlePane extends JComponent > { > @@ -269,18 +270,18 @@ > } > > protected void addSystemMenuItems(JMenu systemMenu) { > - JMenuItem mi = (JMenuItem)systemMenu.add(restoreAction); > + JMenuItem mi = systemMenu.add(restoreAction); > mi.setMnemonic('R'); > - mi = (JMenuItem)systemMenu.add(moveAction); > + mi = systemMenu.add(moveAction); > mi.setMnemonic('M'); > - mi = (JMenuItem)systemMenu.add(sizeAction); > + mi = systemMenu.add(sizeAction); > mi.setMnemonic('S'); > - mi = (JMenuItem)systemMenu.add(iconifyAction); > + mi = systemMenu.add(iconifyAction); > mi.setMnemonic('n'); > - mi = (JMenuItem)systemMenu.add(maximizeAction); > + mi = systemMenu.add(maximizeAction); > mi.setMnemonic('x'); > systemMenu.add(new JSeparator()); > - mi = (JMenuItem)systemMenu.add(closeAction); > + mi = systemMenu.add(closeAction); > mi.setMnemonic('C'); > } > > @@ -414,7 +415,7 @@ > // PropertyChangeListener > // > public void propertyChange(PropertyChangeEvent evt) { > - String prop = (String)evt.getPropertyName(); > + String prop = evt.getPropertyName(); > > if (prop == JInternalFrame.IS_SELECTED_PROPERTY) { > repaint(); > @@ -788,3 +789,4 @@ > > } // End Title Pane Class > > + > Index: classes/javax/swing/plaf/basic/BasicInternalFrameUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicInternalFrameUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicInternalFrameUI.java (working copy) > @@ -46,6 +46,7 @@ > * @version 1.135 05/05/07 > * @author David Kloba > * @author Rich Schiavi > + * @author Florian Brunner > */ > public class BasicInternalFrameUI extends InternalFrameUI > { > @@ -321,7 +322,7 @@ > if (resizing) { > return; > } > - Cursor s = (Cursor)frame.getLastCursor(); > + Cursor s = frame.getLastCursor(); > if (s == null) { > s = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR); > } > @@ -1404,7 +1405,7 @@ > > // PropertyChangeListener > public void propertyChange(PropertyChangeEvent evt) { > - String prop = (String)evt.getPropertyName(); > + String prop = evt.getPropertyName(); > JInternalFrame f = (JInternalFrame)evt.getSource(); > Object newValue = evt.getNewValue(); > Object oldValue = evt.getOldValue(); > Index: classes/javax/swing/plaf/basic/BasicLookAndFeel.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicLookAndFeel.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicLookAndFeel.java (working copy) > @@ -101,6 +101,7 @@ > * > * @version 1.283 05/09/07 > * @author unattributed > + * @author Florian Brunner > */ > public abstract class BasicLookAndFeel extends LookAndFeel implements Serializable > { > @@ -2120,9 +2121,9 @@ > * Class.getResourceAsStream just returns raw > * bytes, which we can convert to a sound. > */ > - byte[] buffer = (byte[])AccessController.doPrivileged( > - new PrivilegedAction() { > - public Object run() { > + byte[] buffer = AccessController.doPrivileged( > + new PrivilegedAction() { > + public byte[] run() { > try { > InputStream resource = BasicLookAndFeel.this. > getClass().getResourceAsStream(soundFile); > @@ -2184,7 +2185,7 @@ > UIManager.get("AuditoryCues.playList"); > if (audioStrings != null) { > // create a HashSet to help us decide to play or not > - HashSet audioCues = new HashSet(); > + HashSet audioCues = new HashSet(); > for (int i = 0; i < audioStrings.length; i++) { > audioCues.add(audioStrings[i]); > } > @@ -2237,7 +2238,7 @@ > * This class contains listener that watches for all the mouse > * events that can possibly invoke popup on the component > */ > - class AWTEventHelper implements AWTEventListener,PrivilegedAction { > + class AWTEventHelper implements AWTEventListener,PrivilegedAction { > AWTEventHelper() { > super(); > AccessController.doPrivileged(this); > Index: classes/javax/swing/plaf/basic/BasicMenuItemUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicMenuItemUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicMenuItemUI.java (working copy) > @@ -49,6 +49,7 @@ > * @author David Karlton > * @author Arnaud Weber > * @author Fredrik Lagerblad > + * @author Florian Brunner > */ > public class BasicMenuItemUI extends MenuItemUI > { > @@ -702,15 +703,15 @@ > // Paint the Icon > if(icon != null ) { > if(!model.isEnabled()) { > - icon = (Icon) b.getDisabledIcon(); > + icon = b.getDisabledIcon(); > } else if(model.isPressed() && model.isArmed()) { > - icon = (Icon) b.getPressedIcon(); > + icon = b.getPressedIcon(); > if(icon == null) { > // Use default icon > - icon = (Icon) b.getIcon(); > + icon = b.getIcon(); > } > } else { > - icon = (Icon) b.getIcon(); > + icon = b.getIcon(); > } > > if (icon!=null) { > @@ -1151,7 +1152,7 @@ > for(i=0,j=path.length; i for (int k=0; k<=i; k++) > System.out.print(" "); > - MenuElement me = (MenuElement) path[i]; > + MenuElement me = path[i]; > if(me instanceof JMenuItem) > System.out.println(((JMenuItem)me).getText() + ", "); > else if (me == null) > Index: classes/javax/swing/plaf/basic/BasicMenuUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicMenuUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicMenuUI.java (working copy) > @@ -46,6 +46,7 @@ > * @author Georges Saab > * @author David Karlton > * @author Arnaud Weber > + * @author Florian Brunner > */ > public class BasicMenuUI extends BasicMenuItemUI > { > @@ -605,7 +606,7 @@ > MenuSelectionManager manager = e.getMenuSelectionManager(); > if (key == Character.toLowerCase(e.getKeyChar())) { > JPopupMenu popupMenu = ((JMenu)menuItem).getPopupMenu(); > - ArrayList newList = new ArrayList(Arrays.asList(path)); > + ArrayList newList = new ArrayList(Arrays.asList(path)); > newList.add(popupMenu); > MenuElement subs[] = popupMenu.getSubElements(); > MenuElement sub = > @@ -613,8 +614,8 @@ > if(sub != null) { > newList.add(sub); > } > - MenuElement newPath[] = new MenuElement[0];; > - newPath = (MenuElement[]) newList.toArray(newPath); > + MenuElement newPath[] = new MenuElement[0]; > + newPath = newList.toArray(newPath); > manager.setSelectedPath(newPath); > e.consume(); > } else if (((JMenu)menuItem).isTopLevelMenu() > Index: classes/javax/swing/plaf/basic/BasicOptionPaneUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicOptionPaneUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicOptionPaneUI.java (working copy) > @@ -77,6 +77,7 @@ > * @author James Gosling > * @author Scott Violet > * @author Amy Fowler > + * @author Florian Brunner > */ > public class BasicOptionPaneUI extends OptionPaneUI { > > @@ -110,7 +111,7 @@ > > > static { > - newline = (String)java.security.AccessController.doPrivileged( > + newline = java.security.AccessController.doPrivileged( > new GetPropertyAction("line.separator")); > if (newline == null) { > newline = "\n"; > Index: classes/javax/swing/plaf/basic/BasicPopupMenuUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicPopupMenuUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicPopupMenuUI.java (working copy) > @@ -60,6 +60,7 @@ > * @author Georges Saab > * @author David Karlton > * @author Arnaud Weber > + * @author Florian Brunner > */ > public class BasicPopupMenuUI extends PopupMenuUI { > static final StringBuilder MOUSE_GRABBER_KEY = new StringBuilder( > @@ -226,11 +227,11 @@ > return popup; > } > > - static List getPopups() { > + static List getPopups() { > MenuSelectionManager msm = MenuSelectionManager.defaultManager(); > MenuElement[] p = msm.getSelectedPath(); > > - List list = new ArrayList(p.length); > + List list = new ArrayList(p.length); > for(int i = 0; i < p.length; i++) { > if (p[i] instanceof JPopupMenu) { > list.add((JPopupMenu)p[i]); > @@ -291,14 +292,14 @@ > MenuElement subitem = findEnabledChild( > subpopup.getSubElements(), -1, true); > > - ArrayList lst = new ArrayList(Arrays.asList(e.getPath())); > + ArrayList lst = new ArrayList(Arrays.asList(e.getPath())); > lst.add(menuToOpen); > lst.add(subpopup); > if (subitem != null) { > lst.add(subitem); > } > - MenuElement newPath[] = new MenuElement[0];; > - newPath = (MenuElement[])lst.toArray(newPath); > + MenuElement newPath[] = new MenuElement[0]; > + newPath = lst.toArray(newPath); > MenuSelectionManager.defaultManager().setSelectedPath(newPath); > e.consume(); > } > @@ -620,7 +621,7 @@ > // 4234793: This action should call JPopupMenu.firePopupMenuCanceled but it's > // a protected method. The real solution could be to make > // firePopupMenuCanceled public and call it directly. > - JPopupMenu lastPopup = (JPopupMenu)getLastPopup(); > + JPopupMenu lastPopup = getLastPopup(); > if (lastPopup != null) { > lastPopup.putClientProperty("JPopupMenu.firePopupMenuCanceled", Boolean.TRUE); > } > @@ -747,7 +748,7 @@ > // A grab needs to be added > final Toolkit tk = Toolkit.getDefaultToolkit(); > java.security.AccessController.doPrivileged( > - new java.security.PrivilegedAction() { > + new java.security.PrivilegedAction() { > public Object run() { > tk.addAWTEventListener(MouseGrabber.this, > AWTEvent.MOUSE_EVENT_MASK | > @@ -780,7 +781,7 @@ > final Toolkit tk = Toolkit.getDefaultToolkit(); > // The grab should be removed > java.security.AccessController.doPrivileged( > - new java.security.PrivilegedAction() { > + new java.security.PrivilegedAction() { > public Object run() { > tk.removeAWTEventListener(MouseGrabber.this); > return null; > Index: classes/javax/swing/plaf/basic/BasicRadioButtonUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicRadioButtonUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicRadioButtonUI.java (working copy) > @@ -39,6 +39,7 @@ > * > * @version 1.77 05/05/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class BasicRadioButtonUI extends BasicToggleButtonUI > { > @@ -151,15 +152,15 @@ > } > } else if(model.isSelected()) { > if(b.isRolloverEnabled() && model.isRollover()) { > - altIcon = (Icon) b.getRolloverSelectedIcon(); > + altIcon = b.getRolloverSelectedIcon(); > if (altIcon == null) { > - altIcon = (Icon) b.getSelectedIcon(); > + altIcon = b.getSelectedIcon(); > } > } else { > - altIcon = (Icon) b.getSelectedIcon(); > + altIcon = b.getSelectedIcon(); > } > } else if(b.isRolloverEnabled() && model.isRollover()) { > - altIcon = (Icon) b.getRolloverIcon(); > + altIcon = b.getRolloverIcon(); > } > > if(altIcon == null) { > @@ -215,7 +216,7 @@ > > String text = b.getText(); > > - Icon buttonIcon = (Icon) b.getIcon(); > + Icon buttonIcon = b.getIcon(); > if(buttonIcon == null) { > buttonIcon = getDefaultIcon(); > } > Index: classes/javax/swing/plaf/basic/BasicSliderUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicSliderUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicSliderUI.java (working copy) > @@ -56,6 +56,7 @@ > * > * @version 1.113 05/05/07 > * @author Tom Santos > + * @author Florian Brunner > */ > public class BasicSliderUI extends SliderUI{ > // Old actions forward to an instance of this. > @@ -1351,7 +1352,7 @@ > int min = slider.getMinimum(); > int max = slider.getMaximum(); > double valueRange = (double)max - (double)min; > - double pixelsPerValue = (double)trackHeight / (double)valueRange; > + double pixelsPerValue = (double)trackHeight / valueRange; > int trackBottom = trackY + (trackHeight - 1); > int yPosition; > > Index: classes/javax/swing/plaf/basic/BasicSplitPaneUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicSplitPaneUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicSplitPaneUI.java (working copy) > @@ -52,6 +52,7 @@ > * @author Scott Violet > * @author Steve Wilson > * @author Ralph Kar > + * @author Florian Brunner > */ > public class BasicSplitPaneUI extends SplitPaneUI > { > @@ -107,13 +108,13 @@ > * Keys to use for forward focus traversal when the JComponent is > * managing focus. > */ > - private static Set managingFocusForwardTraversalKeys; > + private static Set managingFocusForwardTraversalKeys; > > /** > * Keys to use for backward focus traversal when the JComponent is > * managing focus. > */ > - private static Set managingFocusBackwardTraversalKeys; > + private static Set managingFocusBackwardTraversalKeys; > > > /** > @@ -371,7 +372,7 @@ > > // focus forward traversal key > if (managingFocusForwardTraversalKeys==null) { > - managingFocusForwardTraversalKeys = new HashSet(); > + managingFocusForwardTraversalKeys = new HashSet(); > managingFocusForwardTraversalKeys.add( > KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)); > } > @@ -379,7 +380,7 @@ > managingFocusForwardTraversalKeys); > // focus backward traversal key > if (managingFocusBackwardTraversalKeys==null) { > - managingFocusBackwardTraversalKeys = new HashSet(); > + managingFocusBackwardTraversalKeys = new HashSet(); > managingFocusBackwardTraversalKeys.add( > KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK)); > } > @@ -2171,7 +2172,7 @@ > Component focusOn = (direction > 0) ? > policy.getComponentAfter(rootAncestor, splitPane) : > policy.getComponentBefore(rootAncestor, splitPane); > - HashSet focusFrom = new HashSet(); > + HashSet focusFrom = new HashSet(); > if (splitPane.isAncestorOf(focusOn)) { > do { > focusFrom.add(focusOn); > Index: classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java (working copy) > @@ -51,6 +51,7 @@ > * @author Steve Wilson > * @author Tom Santos > * @author Dave Moore > + * @author Florian Brunner > */ > public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants { > > @@ -143,9 +144,9 @@ > > private Component visibleComponent; > // PENDING(api): See comment for ContainerHandler > - private Vector htmlViews; > + private Vector htmlViews; > > - private Hashtable mnemonicToIndexMap; > + private Hashtable mnemonicToIndexMap; > > /** > * InputMap used for mnemonics. Only non-null if the JTabbedPane has > @@ -540,14 +541,14 @@ > } > mnemonicInputMap.put(KeyStroke.getKeyStroke(mnemonic, Event.ALT_MASK), > "setSelectedIndex"); > - mnemonicToIndexMap.put(new Integer(mnemonic), new Integer(index)); > + mnemonicToIndexMap.put(mnemonic, index); > } > > /** > * Installs the state needed for mnemonics. > */ > private void initMnemonics() { > - mnemonicToIndexMap = new Hashtable(); > + mnemonicToIndexMap = new Hashtable(); > mnemonicInputMap = new ComponentInputMapUIResource(tabPane); > mnemonicInputMap.setParent(SwingUtilities.getUIInputMap(tabPane, > JComponent.WHEN_IN_FOCUSED_WINDOW)); > @@ -1695,7 +1696,7 @@ > */ > protected View getTextViewForTab(int tabIndex) { > if (htmlViews != null) { > - return (View)htmlViews.elementAt(tabIndex); > + return htmlViews.elementAt(tabIndex); > } > return null; > } > @@ -2231,8 +2232,7 @@ > if (mnemonic >= 'a' && mnemonic <='z') { > mnemonic -= ('a' - 'A'); > } > - Integer index = (Integer)ui.mnemonicToIndexMap. > - get(new Integer(mnemonic)); > + Integer index = ui.mnemonicToIndexMap.get(new Integer(mnemonic)); > if (index != null && pane.isEnabledAt(index.intValue())) { > pane.setSelectedIndex(index.intValue()); > } > @@ -3789,8 +3789,8 @@ > } > } > > - private Vector createHTMLVector() { > - Vector htmlViews = new Vector(); > + private Vector createHTMLVector() { > + Vector htmlViews = new Vector(); > int count = tabPane.getTabCount(); > if (count>0) { > for (int i=0 ; i Index: classes/javax/swing/plaf/basic/BasicTextUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicTextUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicTextUI.java (working copy) > @@ -101,6 +101,7 @@ > * > * @author Timothy Prinzing > * @author Shannon Hickey (drag and drop) > + * @author Florian Brunner > * @version 1.126 05/05/07 > */ > public abstract class BasicTextUI extends TextUI implements ViewFactory { > @@ -527,16 +528,16 @@ > EditorKit editorKit = getEditorKit(editor); > if ( editorKit != null > && editorKit instanceof DefaultEditorKit) { > - Set storedForwardTraversalKeys = editor. > + Set storedForwardTraversalKeys = editor. > getFocusTraversalKeys(KeyboardFocusManager. > FORWARD_TRAVERSAL_KEYS); > - Set storedBackwardTraversalKeys = editor. > + Set storedBackwardTraversalKeys = editor. > getFocusTraversalKeys(KeyboardFocusManager. > BACKWARD_TRAVERSAL_KEYS); > - Set forwardTraversalKeys = > - new HashSet(storedForwardTraversalKeys); > - Set backwardTraversalKeys = > - new HashSet(storedBackwardTraversalKeys); > + Set forwardTraversalKeys = > + new HashSet(storedForwardTraversalKeys); > + Set backwardTraversalKeys = > + new HashSet(storedBackwardTraversalKeys); > if (editor.isEditable()) { > forwardTraversalKeys. > remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)); > @@ -2010,7 +2011,7 @@ > public void addLayoutComponent(Component comp, Object constraint) { > if (constraint instanceof View) { > if (constraints == null) { > - constraints = new Hashtable(7); > + constraints = new Hashtable(7); > } > constraints.put(comp, constraint); > } > @@ -2061,7 +2062,7 @@ > * These are View objects for those components that are represented > * by a View in the View tree. > */ > - private Hashtable constraints; > + private Hashtable constraints; > > private boolean i18nView = false; > } > @@ -2458,8 +2459,7 @@ > JTextComponent c = (JTextComponent)comp; > > int pos = modeBetween > - ? ((JTextComponent.DropLocation)c.getDropLocation()).getIndex() > - : c.getCaretPosition(); > + ? c.getDropLocation().getIndex() : c.getCaretPosition(); > > // if we are importing to the same component that we exported from > // then don't actually do anything if the drop location is inside > @@ -2650,3 +2650,4 @@ > > } > > + > Index: classes/javax/swing/plaf/basic/BasicToggleButtonUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicToggleButtonUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicToggleButtonUI.java (working copy) > @@ -41,6 +41,7 @@ > * > * @version 1.65 05/05/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class BasicToggleButtonUI extends BasicButtonUI { > > @@ -126,31 +127,31 @@ > > if(!model.isEnabled()) { > if(model.isSelected()) { > - icon = (Icon) b.getDisabledSelectedIcon(); > + icon = b.getDisabledSelectedIcon(); > } else { > - icon = (Icon) b.getDisabledIcon(); > + icon = b.getDisabledIcon(); > } > } else if(model.isPressed() && model.isArmed()) { > - icon = (Icon) b.getPressedIcon(); > + icon = b.getPressedIcon(); > if(icon == null) { > // Use selected icon > - icon = (Icon) b.getSelectedIcon(); > + icon = b.getSelectedIcon(); > } > } else if(model.isSelected()) { > if(b.isRolloverEnabled() && model.isRollover()) { > - icon = (Icon) b.getRolloverSelectedIcon(); > + icon = b.getRolloverSelectedIcon(); > if (icon == null) { > - icon = (Icon) b.getSelectedIcon(); > + icon = b.getSelectedIcon(); > } > } else { > - icon = (Icon) b.getSelectedIcon(); > + icon = b.getSelectedIcon(); > } > } else if(b.isRolloverEnabled() && model.isRollover()) { > - icon = (Icon) b.getRolloverIcon(); > + icon = b.getRolloverIcon(); > } > > if(icon == null) { > - icon = (Icon) b.getIcon(); > + icon = b.getIcon(); > } > > icon.paintIcon(b, g, iconRect.x, iconRect.y); > Index: classes/javax/swing/plaf/basic/BasicToolBarUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicToolBarUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicToolBarUI.java (working copy) > @@ -49,6 +49,7 @@ > * @version 1.109 05/05/07 > * @author Georges Saab > * @author Jeff Shapiro > + * @author Florian Brunner > */ > public class BasicToolBarUI extends ToolBarUI implements SwingConstants > { > @@ -84,8 +85,8 @@ > private static Border nonRolloverToggleBorder; > private boolean rolloverBorders = false; > > - private HashMap borderTable = new HashMap(); > - private Hashtable rolloverTable = new Hashtable(); > + private HashMap borderTable = new HashMap(); > + private Hashtable rolloverTable = new Hashtable(); > > > /** > @@ -682,7 +683,7 @@ > if (c instanceof AbstractButton) { > AbstractButton b = (AbstractButton)c; > > - Border border = (Border)borderTable.get(b); > + Border border = borderTable.get(b); > if (border == null || border instanceof UIResource) { > borderTable.put(b, b.getBorder()); > } > @@ -722,7 +723,7 @@ > if (c instanceof AbstractButton) { > AbstractButton b = (AbstractButton)c; > > - Border border = (Border)borderTable.get(b); > + Border border = borderTable.get(b); > if (border == null || border instanceof UIResource) { > borderTable.put(b, b.getBorder()); > } > @@ -766,10 +767,10 @@ > if (c instanceof AbstractButton) { > AbstractButton b = (AbstractButton)c; > > - Border border = (Border)borderTable.remove(b); > + Border border = borderTable.remove(b); > b.setBorder(border); > > - Boolean value = (Boolean)rolloverTable.remove(b); > + Boolean value = rolloverTable.remove(b); > if (value != null) { > b.setRolloverEnabled(value.booleanValue()); > } > Index: classes/javax/swing/plaf/basic/BasicTreeUI.java > =================================================================== > --- classes/javax/swing/plaf/basic/BasicTreeUI.java (revision 250) > +++ classes/javax/swing/plaf/basic/BasicTreeUI.java (working copy) > @@ -58,6 +58,7 @@ > * @version 1.202 05/05/07 > * @author Scott Violet > * @author Shannon Hickey (drag and drop) > + * @author Florian Brunner > */ > > public class BasicTreeUI extends TreeUI > @@ -3126,7 +3127,7 @@ > > private static final TransferHandler defaultTransferHandler = new TreeTransferHandler(); > > - static class TreeTransferHandler extends TransferHandler implements UIResource, Comparator { > + static class TreeTransferHandler extends TransferHandler implements UIResource, Comparator { > > private JTree tree; > > @@ -3180,9 +3181,9 @@ > return null; > } > > - public int compare(Object o1, Object o2) { > - int row1 = tree.getRowForPath((TreePath)o1); > - int row2 = tree.getRowForPath((TreePath)o2); > + public int compare(TreePath o1, TreePath o2) { > + int row1 = tree.getRowForPath(o1); > + int row2 = tree.getRowForPath(o2); > return row1 - row2; > } > > @@ -3201,7 +3202,7 @@ > */ > TreePath[] getDisplayOrderPaths(TreePath[] paths) { > // sort the paths to display order rather than selection order > - ArrayList selOrder = new ArrayList(); > + ArrayList selOrder = new ArrayList(); > for (int i = 0; i < paths.length; i++) { > selOrder.add(paths[i]); > } > @@ -3209,7 +3210,7 @@ > int n = selOrder.size(); > TreePath[] displayPaths = new TreePath[n]; > for (int i = 0; i < n; i++) { > - displayPaths[i] = (TreePath) selOrder.get(i); > + displayPaths[i] = selOrder.get(i); > } > return displayPaths; > } > Index: classes/javax/swing/plaf/basic/DragRecognitionSupport.java > =================================================================== > --- classes/javax/swing/plaf/basic/DragRecognitionSupport.java (revision 250) > +++ classes/javax/swing/plaf/basic/DragRecognitionSupport.java (working copy) > @@ -39,6 +39,7 @@ > * public static methods call into the appropriate instance. > * > * @author Shannon Hickey > + * @author Florian Brunner > * @version 1.8 05/05/07 > */ > class DragRecognitionSupport { > @@ -74,8 +75,7 @@ > * Returns whether or not the event is potentially part of a drag sequence. > */ > public static boolean mousePressed(MouseEvent me) { > - return ((DragRecognitionSupport)getDragRecognitionSupport()). > - mousePressedImpl(me); > + return getDragRecognitionSupport().mousePressedImpl(me); > } > > /** > @@ -83,16 +83,14 @@ > * that started the recognition. Otherwise, return null. > */ > public static MouseEvent mouseReleased(MouseEvent me) { > - return ((DragRecognitionSupport)getDragRecognitionSupport()). > - mouseReleasedImpl(me); > + return getDragRecognitionSupport().mouseReleasedImpl(me); > } > > /** > * Returns whether or not a drag gesture recognition is ongoing. > */ > public static boolean mouseDragged(MouseEvent me, BeforeDrag bd) { > - return ((DragRecognitionSupport)getDragRecognitionSupport()). > - mouseDraggedImpl(me, bd); > + return getDragRecognitionSupport().mouseDraggedImpl(me, bd); > } > > private void clearState() { > Index: classes/javax/swing/plaf/basic/LazyActionMap.java > =================================================================== > --- classes/javax/swing/plaf/basic/LazyActionMap.java (revision 250) > +++ classes/javax/swing/plaf/basic/LazyActionMap.java (working copy) > @@ -35,6 +35,7 @@ > * > * @version 1.12, 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > */ > class LazyActionMap extends ActionMapUIResource { > /** > @@ -143,7 +144,7 @@ > Object loader = _loader; > > _loader = null; > - Class klass = (Class)loader; > + Class klass = (Class)loader; > try { > Method method = klass.getDeclaredMethod("loadActionMap", > new Class[] { LazyActionMap.class }); > Index: classes/javax/swing/plaf/metal/DefaultMetalTheme.java > =================================================================== > --- classes/javax/swing/plaf/metal/DefaultMetalTheme.java (revision 250) > +++ classes/javax/swing/plaf/metal/DefaultMetalTheme.java (working copy) > @@ -88,6 +88,7 @@ > * > * @version 1.37 05/05/07 > * @author Steve Wilson > + * @author Florian Brunner > */ > public class DefaultMetalTheme extends MetalTheme { > /** > @@ -388,9 +389,9 @@ > * that it is wrapped inside a doPrivileged call. > */ > protected Font getPrivilegedFont(final int key) { > - return (Font)java.security.AccessController.doPrivileged( > - new java.security.PrivilegedAction() { > - public Object run() { > + return java.security.AccessController.doPrivileged( > + new java.security.PrivilegedAction() { > + public Font run() { > return Font.getFont(getDefaultPropertyName(key)); > } > } > Index: classes/javax/swing/plaf/metal/MetalBumps.java > =================================================================== > --- classes/javax/swing/plaf/metal/MetalBumps.java (revision 250) > +++ classes/javax/swing/plaf/metal/MetalBumps.java (working copy) > @@ -37,6 +37,7 @@ > * @version 1.32 05/05/07 > * @author Tom Santos > * @author Steve Wilson > + * @author Florian Brunner > */ > > > @@ -50,7 +51,7 @@ > protected Color shadowColor; > protected Color backColor; > > - protected static Vector buffers = new Vector(); > + protected static Vector buffers = new Vector(); > protected BumpBuffer buffer; > > public MetalBumps( Dimension bumpArea ) { > @@ -121,8 +122,8 @@ > > public void paintIcon( Component c, Graphics g, int x, int y ) { > GraphicsConfiguration gc = (g instanceof Graphics2D) ? > - (GraphicsConfiguration)((Graphics2D)g). > - getDeviceConfiguration() : null; > + ((Graphics2D)g).getDeviceConfiguration() > + : null; > > buffer = getBuffer(gc, topColor, shadowColor, backColor); > > Index: classes/javax/swing/plaf/metal/MetalFileChooserUI.java > =================================================================== > --- classes/javax/swing/plaf/metal/MetalFileChooserUI.java (revision 250) > +++ classes/javax/swing/plaf/metal/MetalFileChooserUI.java (working copy) > @@ -48,6 +48,7 @@ > * > * @version 1.100 05/09/07 > * @author Jeff Dinkins > + * @author Florian Brunner > */ > public class MetalFileChooserUI extends BasicFileChooserUI { > > @@ -947,7 +948,7 @@ > * Data model for a type-face selection combo-box. > */ > protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel { > - Vector directories = new Vector(); > + Vector directories = new Vector(); > int[] depths = null; > File selectedDirectory = null; > JFileChooser chooser = getFileChooser(); > @@ -999,7 +1000,7 @@ > File sf = useShellFolder ? ShellFolder.getShellFolder(canonical) > : canonical; > File f = sf; > - Vector path = new Vector(10); > + Vector path = new Vector(10); > do { > path.addElement(f); > } while ((f = f.getParentFile()) != null); > @@ -1007,7 +1008,7 @@ > int pathCount = path.size(); > // Insert chain at appropriate place in vector > for (int i = 0; i < pathCount; i++) { > - f = (File)path.get(i); > + f = path.get(i); > if (directories.contains(f)) { > int topIndex = directories.indexOf(f); > for (int j = i-1; j >= 0; j--) { > @@ -1026,12 +1027,12 @@ > private void calculateDepths() { > depths = new int[directories.size()]; > for (int i = 0; i < depths.length; i++) { > - File dir = (File)directories.get(i); > + File dir = directories.get(i); > File parent = dir.getParentFile(); > depths[i] = 0; > if (parent != null) { > for (int j = i-1; j >= 0; j--) { > - if (parent.equals((File)directories.get(j))) { > + if (parent.equals(directories.get(j))) { > depths[i] = depths[j] + 1; > break; > } > Index: classes/javax/swing/plaf/metal/MetalIconFactory.java > =================================================================== > --- classes/javax/swing/plaf/metal/MetalIconFactory.java (revision 250) > +++ classes/javax/swing/plaf/metal/MetalIconFactory.java (working copy) > @@ -58,6 +58,7 @@ > * > * @version 1.70 05/05/07 > * @author Michael C. Albers > + * @author Florian Brunner > */ > public class MetalIconFactory implements Serializable { > > @@ -599,7 +600,7 @@ > } > > // Some calculations that are needed more than once later on. > - int oneHalf = (int)(iconSize / 2); // 16 -> 8 > + int oneHalf = iconSize / 2; // 16 -> 8 > > g.translate(x, y); > > @@ -1503,7 +1504,7 @@ > > // PENDING: Replace this class with CachedPainter. > > - Vector images = new Vector(1, 1); > + Vector images = new Vector(1, 1); > ImageGcPair currentImageGcPair; > > class ImageGcPair { > Index: classes/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java > =================================================================== > --- classes/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java (revision 250) > +++ classes/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java (working copy) > @@ -42,6 +42,7 @@ > * @version 1.65 05/05/07 > * @author Steve Wilson > * @author Brian Beck > + * @author Florian Brunner > * @since 1.3 > */ > > @@ -192,7 +193,7 @@ > extends BasicInternalFrameTitlePane.PropertyChangeHandler > { > public void propertyChange(PropertyChangeEvent evt) { > - String prop = (String)evt.getPropertyName(); > + String prop = evt.getPropertyName(); > if( prop.equals(JInternalFrame.IS_SELECTED_PROPERTY) ) { > Boolean b = (Boolean)evt.getNewValue(); > iconButton.putClientProperty("paintActive", b); > Index: classes/javax/swing/plaf/metal/MetalLookAndFeel.java > =================================================================== > --- classes/javax/swing/plaf/metal/MetalLookAndFeel.java (revision 250) > +++ classes/javax/swing/plaf/metal/MetalLookAndFeel.java (working copy) > @@ -82,6 +82,7 @@ > * > * @version @(#)MetalLookAndFeel.java 1.213 07/06/07 > * @author Steve Wilson > + * @author Florian Brunner > */ > public class MetalLookAndFeel extends BasicLookAndFeel > { > @@ -2219,9 +2220,9 @@ > if (methodName == null) { > return c.newInstance(); > } > - Method method = (Method)AccessController.doPrivileged( > - new PrivilegedAction() { > - public Object run() { > + Method method = AccessController.doPrivileged( > + new PrivilegedAction() { > + public Method run() { > Method[] methods = c.getDeclaredMethods(); > for (int counter = methods.length - 1; counter >= 0; > counter--) { > @@ -2284,7 +2285,7 @@ > } > } > > - static ReferenceQueue queue = new ReferenceQueue(); > + static ReferenceQueue queue = new ReferenceQueue(); > > static void flushUnreferenced() { > AATextListener aatl; > @@ -2294,7 +2295,7 @@ > } > > static class AATextListener > - extends WeakReference implements PropertyChangeListener { > + extends WeakReference implements PropertyChangeListener { > > private String key = SunToolkit.DESKTOPFONTHINTS; > > @@ -2305,7 +2306,7 @@ > } > > public void propertyChange(PropertyChangeEvent pce) { > - LookAndFeel laf = (LookAndFeel)get(); > + LookAndFeel laf = get(); > if (laf == null || laf != UIManager.getLookAndFeel()) { > dispose(); > return; > Index: classes/javax/swing/plaf/metal/MetalRadioButtonUI.java > =================================================================== > --- classes/javax/swing/plaf/metal/MetalRadioButtonUI.java (revision 250) > +++ classes/javax/swing/plaf/metal/MetalRadioButtonUI.java (working copy) > @@ -51,6 +51,7 @@ > * @version 1.37 05/05/07 > * @author Michael C. Albers (Metal modifications) > * @author Jeff Dinkins (original BasicRadioButtonCode) > + * @author Florian Brunner > */ > public class MetalRadioButtonUI extends BasicRadioButtonUI { > > @@ -165,15 +166,15 @@ > } > } else if(model.isSelected()) { > if(b.isRolloverEnabled() && model.isRollover()) { > - altIcon = (Icon) b.getRolloverSelectedIcon(); > + altIcon = b.getRolloverSelectedIcon(); > if (altIcon == null) { > - altIcon = (Icon) b.getSelectedIcon(); > + altIcon = b.getSelectedIcon(); > } > } else { > - altIcon = (Icon) b.getSelectedIcon(); > + altIcon = b.getSelectedIcon(); > } > } else if(b.isRolloverEnabled() && model.isRollover()) { > - altIcon = (Icon) b.getRolloverIcon(); > + altIcon = b.getRolloverIcon(); > } > > if(altIcon == null) { > Index: classes/javax/swing/plaf/metal/MetalToolBarUI.java > =================================================================== > --- classes/javax/swing/plaf/metal/MetalToolBarUI.java (revision 250) > +++ classes/javax/swing/plaf/metal/MetalToolBarUI.java (working copy) > @@ -54,6 +54,7 @@ > * > * @version 1.48 05/05/07 > * @author Jeff Shapiro > + * @author Florian Brunner > */ > public class MetalToolBarUI extends BasicToolBarUI > { > @@ -62,7 +63,7 @@ > * instances of JToolBars and JMenuBars and is used to find > * JToolBars/JMenuBars that border each other. > */ > - private static java.util.List components = new ArrayList(); > + private static java.util.List> components = new ArrayList>(); > > /** > * This protected field is implemenation specific. Do not access directly > @@ -96,7 +97,7 @@ > // typed to throw an NPE. > throw new NullPointerException("JComponent must be non-null"); > } > - components.add(new WeakReference(c)); > + components.add(new WeakReference(c)); > } > > /** > Index: classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java > =================================================================== > --- classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java (revision 250) > +++ classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java (working copy) > @@ -40,6 +40,7 @@ > * > * @version 1.15, 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > */ > class DefaultSynthStyleFactory extends SynthStyleFactory { > /** > @@ -64,7 +65,7 @@ > /** > * Maps from a List (BakedArrayList to be precise) to the merged style. > */ > - private Map _resolvedStyles; > + private Map _resolvedStyles; > > /** > * Used if there are no styles matching a widget. > @@ -75,7 +76,7 @@ > DefaultSynthStyleFactory() { > _tmpList = new BakedArrayList(5); > _styles = new ArrayList(); > - _resolvedStyles = new HashMap(); > + _resolvedStyles = new HashMap(); > } > > public synchronized void addStyle(DefaultSynthStyle style, > @@ -139,7 +140,7 @@ > * Fetches any styles that match the passed into arguments into > * matches. > */ > - private void getMatchingStyles(java.util.List matches, JComponent c, > + private void getMatchingStyles(java.util.List matches, JComponent c, > Region id) { > String idName = id.getLowerCaseName(); > String cName = c.getName(); > @@ -180,7 +181,7 @@ > if (styles.size() == 0) { > return null; > } > - return (SynthStyle)_resolvedStyles.get(styles); > + return _resolvedStyles.get(styles); > } > > /** > Index: classes/javax/swing/plaf/synth/ImagePainter.java > =================================================================== > --- classes/javax/swing/plaf/synth/ImagePainter.java (revision 250) > +++ classes/javax/swing/plaf/synth/ImagePainter.java (working copy) > @@ -40,6 +40,7 @@ > * > * @version 1.18, 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > */ > class ImagePainter extends SynthPainter { > private static final StringBuffer CACHE_KEY = > @@ -67,7 +68,7 @@ > Paint9Painter painter; > if (cacheRef == null || (painter = cacheRef.get()) == null) { > painter = new Paint9Painter(30); > - cacheRef = new WeakReference(painter); > + cacheRef = new WeakReference(painter); > AppContext.getAppContext().put(CACHE_KEY, cacheRef); > } > return painter; > Index: classes/javax/swing/plaf/synth/Region.java > =================================================================== > --- classes/javax/swing/plaf/synth/Region.java (revision 250) > +++ classes/javax/swing/plaf/synth/Region.java (working copy) > @@ -66,10 +66,11 @@ > * @version 1.37, 05/05/07 > * @since 1.5 > * @author Scott Violet > + * @author Florian Brunner > */ > public class Region { > - private static final Map uiToRegionMap = new HashMap(); > - private static final Map lowerCaseNameMap = new HashMap(); > + private static final Map uiToRegionMap = new HashMap(); > + private static final Map lowerCaseNameMap = new HashMap(); > > /** > * ArrowButton's are special types of buttons that also render a > @@ -452,7 +453,7 @@ > > > static Region getRegion(JComponent c) { > - return (Region)uiToRegionMap.get(c.getUIClassID()); > + return uiToRegionMap.get(c.getUIClassID()); > } > > static void registerUIs(UIDefaults table) { > @@ -522,7 +523,7 @@ > */ > String getLowerCaseName() { > synchronized(lowerCaseNameMap) { > - String lowerCaseName = (String)lowerCaseNameMap.get(this); > + String lowerCaseName = lowerCaseNameMap.get(this); > if (lowerCaseName == null) { > lowerCaseName = getName().toLowerCase(); > lowerCaseNameMap.put(this, lowerCaseName); > Index: classes/javax/swing/plaf/synth/SynthComboBoxUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthComboBoxUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthComboBoxUI.java (working copy) > @@ -46,6 +46,7 @@ > * > * @version 1.25, 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > */ > class SynthComboBoxUI extends BasicComboBoxUI implements > PropertyChangeListener, SynthUI { > @@ -337,7 +338,7 @@ > return oldValue; > } else { > // Must take the value from the editor and get the value and cast it to the new type. > - Class cls = oldValue.getClass(); > + Class cls = oldValue.getClass(); > try { > Method method = cls.getMethod("valueOf", new Class[]{String.class}); > newValue = method.invoke(oldValue, new Object[] { editor.getText()}); > Index: classes/javax/swing/plaf/synth/SynthContext.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthContext.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthContext.java (working copy) > @@ -38,9 +38,10 @@ > * @version 1.16, 05/05/07 > * @since 1.5 > * @author Scott Violet > + * @author Florian Brunner > */ > public class SynthContext { > - private static final Map contextMap; > + private static final Map> contextMap; > > private JComponent component; > private Region region; > @@ -49,7 +50,7 @@ > > > static { > - contextMap = new HashMap(); > + contextMap = new HashMap>(); > } > > > @@ -82,11 +83,10 @@ > > static void releaseContext(SynthContext context) { > synchronized(contextMap) { > - java.util.List instances = (java.util.List)contextMap.get( > - context.getClass()); > + List instances = contextMap.get(context.getClass()); > > if (instances == null) { > - instances = new ArrayList(5); > + instances = new ArrayList(5); > contextMap.put(context.getClass(), instances); > } > instances.add(context); > Index: classes/javax/swing/plaf/synth/SynthEditorPaneUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthEditorPaneUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthEditorPaneUI.java (working copy) > @@ -38,6 +38,7 @@ > * Synth look and feel. > * > * @author Shannon Hickey > + * @author Florian Brunner > * @version 1.16 05/05/07 > */ > class SynthEditorPaneUI extends BasicEditorPaneUI implements SynthUI { > @@ -70,7 +71,7 @@ > c.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, > localTrue); > } > - updateStyle((JTextComponent)getComponent()); > + updateStyle(getComponent()); > } > > protected void uninstallDefaults() { > Index: classes/javax/swing/plaf/synth/SynthGraphicsUtils.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthGraphicsUtils.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthGraphicsUtils.java (working copy) > @@ -37,6 +37,7 @@ > * @version 1.27, 05/05/07 > * @since 1.5 > * @author Scott Violet > + * @author Florian Brunner > */ > public class SynthGraphicsUtils { > // These are used in the text painting code to avoid allocating a bunch of > @@ -417,7 +418,7 @@ > * the SynthIcon with a given SynthContext. > */ > private static class SynthIconWrapper implements Icon { > - private static final java.util.List CACHE = new java.util.ArrayList(1); > + private static final java.util.List CACHE = new java.util.ArrayList(1); > > private SynthIcon synthIcon; > private SynthContext context; > @@ -426,8 +427,7 @@ > synchronized(CACHE) { > int size = CACHE.size(); > if (size > 0) { > - SynthIconWrapper wrapper = (SynthIconWrapper)CACHE.remove( > - size - 1); > + SynthIconWrapper wrapper = CACHE.remove(size - 1); > wrapper.reset(icon, context); > return wrapper; > } > Index: classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java (working copy) > @@ -47,6 +47,7 @@ > * @author David Kloba > * @author Joshua Outwater > * @author Steve Wilson > + * @author Florian Brunner > */ > class SynthInternalFrameTitlePane extends BasicInternalFrameTitlePane > implements SynthUI, PropertyChangeListener { > @@ -198,18 +199,18 @@ > > protected void addSystemMenuItems(JPopupMenu menu) { > // PENDING: this should all be localizable! > - JMenuItem mi = (JMenuItem)menu.add(restoreAction); > + JMenuItem mi = menu.add(restoreAction); > mi.setMnemonic('R'); > - mi = (JMenuItem)menu.add(moveAction); > + mi = menu.add(moveAction); > mi.setMnemonic('M'); > - mi = (JMenuItem)menu.add(sizeAction); > + mi = menu.add(sizeAction); > mi.setMnemonic('S'); > - mi = (JMenuItem)menu.add(iconifyAction); > + mi = menu.add(iconifyAction); > mi.setMnemonic('n'); > - mi = (JMenuItem)menu.add(maximizeAction); > + mi = menu.add(maximizeAction); > mi.setMnemonic('x'); > menu.add(new JSeparator()); > - mi = (JMenuItem)menu.add(closeAction); > + mi = menu.add(closeAction); > mi.setMnemonic('C'); > } > > Index: classes/javax/swing/plaf/synth/SynthLookAndFeel.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthLookAndFeel.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthLookAndFeel.java (working copy) > @@ -63,6 +63,7 @@ > * @version 1.48, 05/24/05 > * @since 1.5 > * @author Scott Violet > + * @author Florian Brunner > */ > public class SynthLookAndFeel extends BasicLookAndFeel { > /** > @@ -108,7 +109,7 @@ > * Map of defaults table entries. This is populated via the load > * method. > */ > - private Map defaultsMap; > + private Map defaultsMap; > > private Handler _handler; > > @@ -582,7 +583,7 @@ > } > > if (defaultsMap == null) { > - defaultsMap = new HashMap(); > + defaultsMap = new HashMap(); > } > > new SynthParser().parse(input, (DefaultSynthStyleFactory) factory, > @@ -612,7 +613,7 @@ > } > > if (defaultsMap == null) { > - defaultsMap = new HashMap(); > + defaultsMap = new HashMap(); > } > > InputStream input = url.openStream(); > @@ -772,7 +773,7 @@ > */ > private static Object getAATextInfo() { > String language = Locale.getDefault().getLanguage(); > - String desktop = (String) > + String desktop = > AccessController.doPrivileged(new GetPropertyAction("sun.desktop")); > > boolean isCjkLocale = (Locale.CHINESE.getLanguage().equals(language) || > @@ -787,7 +788,7 @@ > return aaTextInfo; > } > > - private static ReferenceQueue queue = new ReferenceQueue(); > + private static ReferenceQueue queue = new ReferenceQueue(); > > private static void flushUnreferenced() { > AATextListener aatl; > @@ -797,7 +798,7 @@ > } > > private static class AATextListener > - extends WeakReference implements PropertyChangeListener { > + extends WeakReference implements PropertyChangeListener { > private String key = SunToolkit.DESKTOPFONTHINTS; > > AATextListener(LookAndFeel laf) { > @@ -813,7 +814,7 @@ > return; > } > > - LookAndFeel laf = (LookAndFeel) get(); > + LookAndFeel laf = get(); > if (laf == null || laf != UIManager.getLookAndFeel()) { > dispose(); > return; > Index: classes/javax/swing/plaf/synth/SynthMenuItemUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthMenuItemUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthMenuItemUI.java (working copy) > @@ -48,6 +48,7 @@ > * @author David Karlton > * @author Arnaud Weber > * @author Fredrik Lagerblad > + * @author Florian Brunner > */ > class SynthMenuItemUI extends BasicMenuItemUI implements > PropertyChangeListener, SynthUI { > @@ -107,7 +108,7 @@ > Icon checkIcon, Icon arrowIcon, int defaultTextIconGap, > String acceleratorDelimiter) { > JMenuItem b = (JMenuItem) c; > - Icon icon = (Icon) b.getIcon(); > + Icon icon = b.getIcon(); > String text = b.getText(); > KeyStroke accelerator = b.getAccelerator(); > String acceleratorText = ""; > @@ -307,15 +308,15 @@ > if(b.getIcon() != null) { > Icon icon; > if(!model.isEnabled()) { > - icon = (Icon) b.getDisabledIcon(); > + icon = b.getDisabledIcon(); > } else if(model.isPressed() && model.isArmed()) { > - icon = (Icon) b.getPressedIcon(); > + icon = b.getPressedIcon(); > if(icon == null) { > // Use default icon > - icon = (Icon) b.getIcon(); > + icon = b.getIcon(); > } > } else { > - icon = (Icon) b.getIcon(); > + icon = b.getIcon(); > } > > if (icon!=null) { > Index: classes/javax/swing/plaf/synth/SynthParser.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthParser.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthParser.java (working copy) > @@ -68,6 +68,8 @@ > import com.sun.beans.ObjectHandler; > > /** > + * @author unattributed > + * @author Florian Brunner > * @version 1.23, 09/12/05 > */ > class SynthParser extends HandlerBase { > @@ -139,7 +141,7 @@ > * Array of state infos for the current style. These are pushed to the > * style when is received. > */ > - private java.util.List _stateInfos; > + private java.util.List _stateInfos; > > /** > * Current style. > @@ -154,7 +156,7 @@ > /** > * Bindings for the current InputMap > */ > - private java.util.List _inputMapBindings; > + private java.util.List _inputMapBindings; > > /** > * ID for the input map. This is cached as > @@ -180,30 +182,30 @@ > /** > * List of ColorTypes. This is populated in startColorType. > */ > - private java.util.List _colorTypes; > + private java.util.List _colorTypes; > > /** > * defaultsPropertys are placed here. > */ > - private Map _defaultsMap; > + private Map _defaultsMap; > > /** > * List of SynthStyle.Painters that will be applied to the current style. > */ > - private java.util.List _stylePainters; > + private java.util.List _stylePainters; > > /** > * List of SynthStyle.Painters that will be applied to the current state. > */ > - private java.util.List _statePainters; > + private java.util.List _statePainters; > > SynthParser() { > _mapping = new HashMap(); > - _stateInfos = new ArrayList(); > - _colorTypes = new ArrayList(); > + _stateInfos = new ArrayList(); > + _colorTypes = new ArrayList(); > _inputMapBindings = new ArrayList(); > - _stylePainters = new ArrayList(); > - _statePainters = new ArrayList(); > + _stylePainters = new ArrayList(); > + _statePainters = new ArrayList(); > } > > /** > @@ -222,7 +224,7 @@ > public void parse(InputStream inputStream, > DefaultSynthStyleFactory factory, > URL urlResourceBase, Class classResourceBase, > - Map defaultsMap) > + Map defaultsMap) > throws ParseException, IllegalArgumentException { > if (inputStream == null || factory == null || > (urlResourceBase == null && classResourceBase == null)) { > @@ -426,15 +428,12 @@ > private void endStyle() throws SAXException { > int size = _stylePainters.size(); > if (size > 0) { > - _style.setPainters((ParsedSynthStyle.PainterInfo[]) > - _stylePainters.toArray(new ParsedSynthStyle. > - PainterInfo[size])); > + _style.setPainters(_stylePainters.toArray(new ParsedSynthStyle.PainterInfo[size])); > _stylePainters.clear(); > } > size = _stateInfos.size(); > if (size > 0) { > - _style.setStateInfo((ParsedSynthStyle.StateInfo[])_stateInfos. > - toArray(new ParsedSynthStyle.StateInfo[size])); > + _style.setStateInfo(_stateInfos.toArray(new ParsedSynthStyle.StateInfo[size])); > _stateInfos.clear(); > } > _style = null; > @@ -504,9 +503,7 @@ > private void endState() throws SAXException { > int size = _statePainters.size(); > if (size > 0) { > - _stateInfo.setPainters((ParsedSynthStyle.PainterInfo[]) > - _statePainters.toArray(new ParsedSynthStyle. > - PainterInfo[size])); > + _stateInfo.setPainters(_statePainters.toArray(new ParsedSynthStyle.PainterInfo[size])); > _statePainters.clear(); > } > _stateInfo = null; > @@ -687,8 +684,7 @@ > int max = 0; > for (int counter = _colorTypes.size() - 1; counter >= 0; > counter--) { > - max = Math.max(max, ((ColorType)_colorTypes.get(counter)). > - getID()); > + max = Math.max(max, _colorTypes.get(counter).getID()); > } > if (colors == null || colors.length <= max) { > Color[] newColors = new Color[max + 1]; > @@ -699,7 +695,7 @@ > } > for (int counter = _colorTypes.size() - 1; counter >= 0; > counter--) { > - colors[((ColorType)_colorTypes.get(counter)).getID()] = color; > + colors[_colorTypes.get(counter).getID()] = color; > } > _stateInfo.setColors(colors); > } > @@ -708,7 +704,7 @@ > private void startProperty(AttributeList attributes, > Object property) throws SAXException { > Object value = null; > - Object key = null; > + String key = null; > // Type of the value: 0=idref, 1=boolean, 2=dimension, 3=insets, > // 4=integer,5=string > int iType = 0; > @@ -791,7 +787,7 @@ > } > else if (_stateInfo != null) { > if (_stateInfo.getData() == null) { > - _stateInfo.setData(new HashMap()); > + _stateInfo.setData(new HashMap()); > } > _stateInfo.getData().put(key, value); > } > @@ -1030,7 +1026,7 @@ > } > } > > - private void addPainterOrMerge(java.util.List painters, String method, > + private void addPainterOrMerge(java.util.List painters, String method, > SynthPainter painter, int direction) { > ParsedSynthStyle.PainterInfo painterInfo; > painterInfo = new ParsedSynthStyle.PainterInfo(method, > Index: classes/javax/swing/plaf/synth/SynthSliderUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthSliderUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthSliderUI.java (working copy) > @@ -56,6 +56,7 @@ > * > * @version 1.36, 05/09/07 > * @author Joshua Outwater > + * @author Florian Brunner > */ > class SynthSliderUI extends BasicSliderUI implements PropertyChangeListener, > SynthUI { > @@ -545,7 +546,7 @@ > trackBorder; > int trackLength = trackBottom - trackTop; > double valueRange = (double)max - (double)min; > - double pixelsPerValue = (double)trackLength / (double)valueRange; > + double pixelsPerValue = (double)trackLength / valueRange; > int yPosition; > > if (!drawInverted()) { > Index: classes/javax/swing/plaf/synth/SynthSplitPaneUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthSplitPaneUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthSplitPaneUI.java (working copy) > @@ -42,6 +42,7 @@ > * > * @version 1.23, 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > */ > class SynthSplitPaneUI extends BasicSplitPaneUI implements > PropertyChangeListener, SynthUI { > @@ -49,13 +50,13 @@ > * Keys to use for forward focus traversal when the JComponent is > * managing focus. > */ > - private static Set managingFocusForwardTraversalKeys; > + private static Set managingFocusForwardTraversalKeys; > > /** > * Keys to use for backward focus traversal when the JComponent is > * managing focus. > */ > - private static Set managingFocusBackwardTraversalKeys; > + private static Set managingFocusBackwardTraversalKeys; > > /** > * Style for the JSplitPane. > @@ -97,7 +98,7 @@ > > // focus forward traversal key > if (managingFocusForwardTraversalKeys==null) { > - managingFocusForwardTraversalKeys = new HashSet(); > + managingFocusForwardTraversalKeys = new HashSet(); > managingFocusForwardTraversalKeys.add( > KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)); > } > @@ -105,7 +106,7 @@ > managingFocusForwardTraversalKeys); > // focus backward traversal key > if (managingFocusBackwardTraversalKeys==null) { > - managingFocusBackwardTraversalKeys = new HashSet(); > + managingFocusBackwardTraversalKeys = new HashSet(); > managingFocusBackwardTraversalKeys.add( > KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK)); > } > Index: classes/javax/swing/plaf/synth/SynthStyle.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthStyle.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthStyle.java (working copy) > @@ -49,12 +49,13 @@ > * @version 1.44, 05/05/07 > * @since 1.5 > * @author Scott Violet > + * @author Florian Brunner > */ > public abstract class SynthStyle { > /** > * Contains the default values for certain properties. > */ > - private static Map DEFAULT_VALUES; > + private static Map DEFAULT_VALUES; > > /** > * Shared SynthGraphics. > @@ -716,7 +717,7 @@ > private static Object getDefaultValue(Object key) { > synchronized(SynthStyle.class) { > if (DEFAULT_VALUES == null) { > - DEFAULT_VALUES = new HashMap(); > + DEFAULT_VALUES = new HashMap(); > populateDefaultValues(); > } > Object value = DEFAULT_VALUES.get(key); > Index: classes/javax/swing/plaf/synth/SynthTextAreaUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthTextAreaUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthTextAreaUI.java (working copy) > @@ -49,6 +49,7 @@ > * Please see {@link java.beans.XMLEncoder}. > * > * @author Shannon Hickey > + * @author Florian Brunner > * @version 1.16 05/05/07 > */ > class SynthTextAreaUI extends BasicTextAreaUI implements SynthUI { > @@ -67,7 +68,7 @@ > protected void installDefaults() { > // Installs the text cursor on the component > super.installDefaults(); > - updateStyle((JTextComponent)getComponent()); > + updateStyle(getComponent()); > } > > protected void uninstallDefaults() { > Index: classes/javax/swing/plaf/synth/SynthTextFieldUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthTextFieldUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthTextFieldUI.java (working copy) > @@ -51,6 +51,7 @@ > * Please see {@link java.beans.XMLEncoder}. > * > * @author Shannon Hickey > + * @author Florian Brunner > * @version 1.19 05/05/07 > */ > class SynthTextFieldUI > @@ -233,7 +234,7 @@ > protected void installDefaults() { > // Installs the text cursor on the component > super.installDefaults(); > - updateStyle((JTextComponent)getComponent()); > + updateStyle(getComponent()); > getComponent().addFocusListener(this); > } > > Index: classes/javax/swing/plaf/synth/SynthTreeUI.java > =================================================================== > --- classes/javax/swing/plaf/synth/SynthTreeUI.java (revision 250) > +++ classes/javax/swing/plaf/synth/SynthTreeUI.java (working copy) > @@ -44,6 +44,7 @@ > * > * @version 1.40, 05/05/07 > * @author Scott Violet > + * @author Florian Brunner > */ > class SynthTreeUI extends BasicTreeUI implements PropertyChangeListener, > SynthUI { > @@ -524,7 +525,7 @@ > // Don't paint the renderer if editing this row. > boolean selected = tree.isRowSelected(row); > > - JTree.DropLocation dropLocation = (JTree.DropLocation)tree.getDropLocation(); > + JTree.DropLocation dropLocation = tree.getDropLocation(); > boolean isDrop = dropLocation != null > && dropLocation.getChildIndex() == -1 > && path == dropLocation.getPath(); > Index: classes/javax/swing/PopupFactory.java > =================================================================== > --- classes/javax/swing/PopupFactory.java (revision 250) > +++ classes/javax/swing/PopupFactory.java (working copy) > @@ -53,6 +53,8 @@ > * > * @see Popup > * > + * @author unattributed > + * @author Florian Brunner > * @version 1.26 02/22/05 > * @since 1.4 > */ > @@ -381,13 +383,13 @@ > * Window to a List of > * HeavyWeightPopups. > */ > - private static Map getHeavyWeightPopupCache() { > + private static Map> getHeavyWeightPopupCache() { > synchronized (HeavyWeightPopup.class) { > - Map cache = (Map)SwingUtilities.appContextGet( > + Map> cache = (Map>)SwingUtilities.appContextGet( > heavyWeightPopupCacheKey); > > if (cache == null) { > - cache = new HashMap(2); > + cache = new HashMap>(2); > SwingUtilities.appContextPut(heavyWeightPopupCacheKey, > cache); > } > @@ -400,13 +402,13 @@ > */ > private static void recycleHeavyWeightPopup(HeavyWeightPopup popup) { > synchronized (HeavyWeightPopup.class) { > - List cache; > - Object window = SwingUtilities.getWindowAncestor( > + List cache; > + Window window = SwingUtilities.getWindowAncestor( > popup.getComponent()); > - Map heavyPopupCache = getHeavyWeightPopupCache(); > + Map> heavyPopupCache = getHeavyWeightPopupCache(); > > if (window instanceof Popup.DefaultFrame || > - !((Window)window).isVisible()) { > + !window.isVisible()) { > // If the Window isn't visible, we don't cache it as we > // likely won't ever get a windowClosed event to clean up. > // We also don't cache DefaultFrames as this indicates > @@ -415,12 +417,12 @@ > popup._dispose(); > return; > } else if (heavyPopupCache.containsKey(window)) { > - cache = (List)heavyPopupCache.get(window); > + cache = heavyPopupCache.get(window); > } else { > - cache = new ArrayList(); > + cache = new ArrayList(); > heavyPopupCache.put(window, cache); > // Clean up if the Window is closed > - final Window w = (Window)window; > + final Window w = window; > > w.addWindowListener(new WindowAdapter() { > public void windowClosed(WindowEvent e) { > @@ -644,11 +646,11 @@ > /** > * Returns the cache to use for heavy weight popups. > */ > - private static List getLightWeightPopupCache() { > - List cache = (List)SwingUtilities.appContextGet( > + private static List getLightWeightPopupCache() { > + List cache = (List)SwingUtilities.appContextGet( > lightWeightPopupCacheKey); > if (cache == null) { > - cache = new ArrayList(); > + cache = new ArrayList(); > SwingUtilities.appContextPut(lightWeightPopupCacheKey, cache); > } > return cache; > @@ -659,7 +661,7 @@ > */ > private static void recycleLightWeightPopup(LightWeightPopup popup) { > synchronized (LightWeightPopup.class) { > - List lightPopupCache = getLightWeightPopupCache(); > + List lightPopupCache = getLightWeightPopupCache(); > if (lightPopupCache.size() < MAX_CACHE_SIZE) { > lightPopupCache.add(popup); > } > @@ -803,12 +805,12 @@ > /** > * Returns the cache to use for medium weight popups. > */ > - private static List getMediumWeightPopupCache() { > - List cache = (List)SwingUtilities.appContextGet( > + private static List getMediumWeightPopupCache() { > + List cache = (List)SwingUtilities.appContextGet( > mediumWeightPopupCacheKey); > > if (cache == null) { > - cache = new ArrayList(); > + cache = new ArrayList(); > SwingUtilities.appContextPut(mediumWeightPopupCacheKey, cache); > } > return cache; > @@ -819,7 +821,7 @@ > */ > private static void recycleMediumWeightPopup(MediumWeightPopup popup) { > synchronized (MediumWeightPopup.class) { > - List mediumPopupCache = getMediumWeightPopupCache(); > + List mediumPopupCache = getMediumWeightPopupCache(); > if (mediumPopupCache.size() < MAX_CACHE_SIZE) { > mediumPopupCache.add(popup); > } > Index: classes/javax/swing/ProgressMonitor.java > =================================================================== > --- classes/javax/swing/ProgressMonitor.java (revision 250) > +++ classes/javax/swing/ProgressMonitor.java (working copy) > @@ -76,7 +76,8 @@ > * > * @see ProgressMonitorInputStream > * @author James Gosling > - * @author Lynn Monsanto (accessibility) > + * @author Lynn Monsanto (accessibility) > + * @author Florian Brunner > * @version 1.43 05/05/07 > */ > public class ProgressMonitor extends Object implements Accessible > @@ -187,7 +188,7 @@ > } > if (window instanceof SwingUtilities.SharedOwnerFrame) { > WindowListener ownerShutdownListener = > - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); > + SwingUtilities.getSharedOwnerFrameShutdownListener(); > dialog.addWindowListener(ownerShutdownListener); > } > Container contentPane = dialog.getContentPane(); > @@ -274,7 +275,7 @@ > if (dT >= millisToDecideToPopup) { > int predictedCompletionTime; > if (nv > min) { > - predictedCompletionTime = (int)((long)dT * > + predictedCompletionTime = (int)(dT * > (max - min) / > (nv - min)); > } > Index: classes/javax/swing/RepaintManager.java > =================================================================== > --- classes/javax/swing/RepaintManager.java (revision 250) > +++ classes/javax/swing/RepaintManager.java (working copy) > @@ -54,6 +54,7 @@ > * > * @version 1.76 05/09/07 > * @author Arnaud Weber > + * @author Florian Brunner > */ > public class RepaintManager > { > @@ -573,7 +574,7 @@ > */ > private synchronized boolean extendDirtyRegion( > Component c, int x, int y, int w, int h) { > - Rectangle r = (Rectangle)dirtyComponents.get(c); > + Rectangle r = dirtyComponents.get(c); > if (r != null) { > // A non-null r implies c is already marked as dirty, > // and that the parent is valid. Therefore we can > @@ -591,7 +592,7 @@ > public Rectangle getDirtyRegion(JComponent aComponent) { > Rectangle r = null; > synchronized(this) { > - r = (Rectangle)dirtyComponents.get(aComponent); > + r = dirtyComponents.get(aComponent); > } > if(r == null) > return new Rectangle(0,0,0,0); > @@ -819,7 +820,7 @@ > > dx = rootDx = 0; > dy = rootDy = 0; > - tmp.setBounds((Rectangle) dirtyComponents.get(dirtyComponent)); > + tmp.setBounds(dirtyComponents.get(dirtyComponent)); > > // System.out.println("Collect dirty component for bound " + tmp + > // "component bounds is " + cBounds);; > @@ -866,7 +867,7 @@ > Rectangle r; > tmp.setLocation(tmp.x + rootDx - dx, > tmp.y + rootDy - dy); > - r = (Rectangle)dirtyComponents.get(rootDirtyComponent); > + r = dirtyComponents.get(rootDirtyComponent); > SwingUtilities.computeUnion(tmp.x,tmp.y,tmp.width,tmp.height,r); > } > > @@ -1011,7 +1012,7 @@ > Iterator gcs = volatileMap.keySet().iterator(); > while (gcs.hasNext()) { > GraphicsConfiguration gc = (GraphicsConfiguration)gcs.next(); > - VolatileImage image = (VolatileImage)volatileMap.get(gc); > + VolatileImage image = volatileMap.get(gc); > if (image.getWidth() > width || image.getHeight() > height) { > image.flush(); > gcs.remove(); > Index: classes/javax/swing/SortingFocusTraversalPolicy.java > =================================================================== > --- classes/javax/swing/SortingFocusTraversalPolicy.java (revision 250) > +++ classes/javax/swing/SortingFocusTraversalPolicy.java (working copy) > @@ -54,6 +54,7 @@ > * policy is used to perform the search operation. > * > * @author David Mendenhall > + * @author Florian Brunner > * @version 1.16, 05/05/07 > * > * @see java.util.Comparator > @@ -80,7 +81,7 @@ > * sorted list should be reused if possible. > */ > private Container cachedRoot; > - private List cachedCycle; > + private List cachedCycle; > > // Delegate our fitness test to ContainerOrder so that we only have to > // code the algorithm once. > @@ -104,8 +105,8 @@ > } > > private void enumerateAndSortCycle(Container focusCycleRoot, > - List cycle, Map defaults) { > - List defaultRoots = null; > + List cycle, Map defaults) { > + List defaultRoots = null; > > if (!focusCycleRoot.isShowing()) { > return; > @@ -121,13 +122,12 @@ > // Create a list of all default Components which should be added > // to the list > if (addDefaultComponents) { > - defaultRoots = new ArrayList(); > - for (Iterator iter = cycle.iterator(); iter.hasNext(); ) { > - Component comp = (Component)iter.next(); > + defaultRoots = new ArrayList(); > + for (Component comp : cycle) { > if ((comp instanceof Container) && > ((Container)comp).isFocusCycleRoot()) > { > - defaultRoots.add(comp); > + defaultRoots.add((Container) comp); > } > } > Collections.sort(defaultRoots, comparator); > @@ -160,13 +160,13 @@ > index = -index - 2; > } > > - defaults.put(new Integer(index), defComp); > + defaults.put(index, defComp); > } > } > } > } > > - private void enumerateCycle(Container container, List cycle) { > + private void enumerateCycle(Container container, List cycle) { > if (!(container.isVisible() && container.isDisplayable())) { > return; > } > @@ -257,8 +257,8 @@ > aComponent = ftp; > } > > - List cycle = new ArrayList(); > - Map defaults = new HashMap(); > + List cycle = new ArrayList(); > + Map defaults = new HashMap(); > enumerateAndSortCycle(aContainer, cycle, defaults); > > int index; > @@ -286,7 +286,7 @@ > } > } > > - Component defComp = (Component)defaults.get(new Integer(index)); > + Component defComp = defaults.get(new Integer(index)); > if (defComp != null) { > return defComp; > } > @@ -309,7 +309,7 @@ > return null; > } > } else { > - Component comp = (Component)cycle.get(index); > + Component comp = cycle.get(index); > if (accept(comp)) { > return comp; > } else if (comp instanceof Container && ((Container)comp).isFocusTraversalPolicyProvider()) { > @@ -370,8 +370,8 @@ > } > > > - List cycle = new ArrayList(); > - Map defaults = new HashMap(); > + List cycle = new ArrayList(); > + Map defaults = new HashMap(); > enumerateAndSortCycle(aContainer, cycle, defaults); > > if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent); > @@ -396,7 +396,7 @@ > if (log.isLoggable(Level.FINE)) log.fine("### Index is " + index); > > if (index >= 0) { > - Component defComp = (Component)defaults.get(new Integer(index)); > + Component defComp = defaults.get(new Integer(index)); > if (defComp != null && cycle.get(index) != aContainer) { > if (log.isLoggable(Level.FINE)) log.fine("### Returning default " + defComp.getName() + " at " + index); > return defComp; > @@ -415,7 +415,7 @@ > > return retval; > } else { > - Component comp = (Component)cycle.get(index); > + Component comp = cycle.get(index); > if (accept(comp)) { > return comp; > } else if (comp instanceof Container && ((Container)comp).isFocusTraversalPolicyProvider()) { > @@ -438,7 +438,7 @@ > * @throws IllegalArgumentException if aContainer is null > */ > public Component getFirstComponent(Container aContainer) { > - List cycle; > + List cycle; > > if (log.isLoggable(Level.FINE)) log.fine("### Getting first component in " + aContainer.getName()); > if (aContainer == null) { > @@ -448,7 +448,7 @@ > if (this.cachedRoot == aContainer) { > cycle = this.cachedCycle; > } else { > - cycle = new ArrayList(); > + cycle = new ArrayList(); > enumerateAndSortCycle(aContainer, cycle, null); > } > > @@ -458,7 +458,7 @@ > } > > for (int i= 0; i < cycle.size(); i++) { > - Component comp = (Component)cycle.get(i); > + Component comp = cycle.get(i); > if (accept(comp)) { > return comp; > } else if (comp instanceof Container && !(comp == aContainer) && ((Container)comp).isFocusTraversalPolicyProvider()) { > @@ -480,7 +480,7 @@ > * @throws IllegalArgumentException if aContainer is null > */ > public Component getLastComponent(Container aContainer) { > - List cycle; > + List cycle; > if (log.isLoggable(Level.FINE)) log.fine("### Getting last component in " + aContainer.getName()); > > if (aContainer == null) { > @@ -490,7 +490,7 @@ > if (this.cachedRoot == aContainer) { > cycle = this.cachedCycle; > } else { > - cycle = new ArrayList(); > + cycle = new ArrayList(); > enumerateAndSortCycle(aContainer, cycle, null); > } > > @@ -502,7 +502,7 @@ > if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle); > > for (int i= cycle.size()-1; i >= 0; i--) { > - Component comp = (Component)cycle.get(i); > + Component comp = cycle.get(i); > if (accept(comp)) { > return comp; > } else if (comp instanceof Container && !(comp == aContainer) && ((Container)comp).isFocusTraversalPolicyProvider()) { > Index: classes/javax/swing/SpringLayout.java > =================================================================== > --- classes/javax/swing/SpringLayout.java (revision 250) > +++ classes/javax/swing/SpringLayout.java (working copy) > @@ -183,14 +183,15 @@ > * @author Philip Milne > * @author Scott Violet > * @author Joe Winchester > + * @author Florian Brunner > * @since 1.4 > */ > public class SpringLayout implements LayoutManager2 { > - private Map componentConstraints = new HashMap(); > + private Map componentConstraints = new HashMap(); > > private Spring cyclicReference = Spring.constant(Spring.UNSET); > - private Set cyclicSprings; > - private Set acyclicSprings; > + private Set cyclicSprings; > + private Set acyclicSprings; > > > /** > @@ -882,8 +883,8 @@ > public SpringLayout() {} > > private void resetCyclicStatuses() { > - cyclicSprings = new HashSet(); > - acyclicSprings = new HashSet(); > + cyclicSprings = new HashSet(); > + acyclicSprings = new HashSet(); > } > > private void setParent(Container p) { > @@ -1146,7 +1147,7 @@ > * @return the constraints for the specified component > */ > public Constraints getConstraints(Component c) { > - Constraints result = (Constraints)componentConstraints.get(c); > + Constraints result = componentConstraints.get(c); > if (result == null) { > if (c instanceof javax.swing.JComponent) { > Object cp = ((javax.swing.JComponent)c).getClientProperty(SpringLayout.class); > Index: classes/javax/swing/SwingUtilities.java > =================================================================== > --- classes/javax/swing/SwingUtilities.java (revision 250) > +++ classes/javax/swing/SwingUtilities.java (working copy) > @@ -52,6 +52,7 @@ > * > * @version 1.154 05/05/07 > * @author unknown > + * @author Florian Brunner > */ > public class SwingUtilities implements SwingConstants > { > @@ -1870,7 +1871,7 @@ > } > > > - static Class loadSystemClass(String className) throws ClassNotFoundException { > + static Class loadSystemClass(String className) throws ClassNotFoundException { > return Class.forName(className, true, Thread.currentThread(). > getContextClassLoader()); > } > Index: classes/javax/swing/SwingWorker.java > =================================================================== > --- classes/javax/swing/SwingWorker.java (revision 250) > +++ classes/javax/swing/SwingWorker.java (working copy) > @@ -214,6 +214,7 @@ > * {@link java.util.concurrent.Executor} for execution. > * > * @author Igor Kushnirskiy > + * @author Florian Brunner > * @version 1.14 05/05/07 > * > * @param the result type returned by this {@code SwingWorker's} > @@ -875,7 +876,7 @@ > } > private static class DoSubmitAccumulativeRunnable > extends AccumulativeRunnable implements ActionListener { > - private final static int DELAY = (int) (1000 / 30); > + private final static int DELAY = 1000 / 30; > @Override > protected void run(List args) { > for (Runnable runnable : args) { > Index: classes/javax/swing/table/AbstractTableModel.java > =================================================================== > --- classes/javax/swing/table/AbstractTableModel.java (revision 250) > +++ classes/javax/swing/table/AbstractTableModel.java (working copy) > @@ -57,6 +57,7 @@ > * @version 1.48 05/05/07 > * @author Alan Chung > * @author Philip Milne > + * @author Florian Brunner > */ > public abstract class AbstractTableModel implements TableModel, Serializable > { > @@ -177,8 +178,7 @@ > * @since 1.4 > */ > public TableModelListener[] getTableModelListeners() { > - return (TableModelListener[])listenerList.getListeners( > - TableModelListener.class); > + return listenerList.getListeners(TableModelListener.class); > } > > // > Index: classes/javax/swing/table/DefaultTableColumnModel.java > =================================================================== > --- classes/javax/swing/table/DefaultTableColumnModel.java (revision 250) > +++ classes/javax/swing/table/DefaultTableColumnModel.java (working copy) > @@ -51,6 +51,7 @@ > * @version 1.58 05/05/07 > * @author Alan Chung > * @author Philip Milne > + * @author Florian Brunner > * @see JTable > */ > public class DefaultTableColumnModel implements TableColumnModel, > @@ -191,7 +192,7 @@ > fireColumnMoved(new TableColumnModelEvent(this, columnIndex, newIndex)); > return; > } > - aColumn = (TableColumn)tableColumns.elementAt(columnIndex); > + aColumn = tableColumns.elementAt(columnIndex); > > tableColumns.removeElementAt(columnIndex); > boolean selected = selectionModel.isSelectedIndex(columnIndex); > @@ -292,7 +293,7 @@ > * at columnIndex > */ > public TableColumn getColumn(int columnIndex) { > - return (TableColumn)tableColumns.elementAt(columnIndex); > + return tableColumns.elementAt(columnIndex); > } > > /** > @@ -505,8 +506,7 @@ > * @since 1.4 > */ > public TableColumnModelListener[] getColumnModelListeners() { > - return (TableColumnModelListener[])listenerList.getListeners( > - TableColumnModelListener.class); > + return listenerList.getListeners(TableColumnModelListener.class); > } > > // > Index: classes/javax/swing/table/DefaultTableModel.java > =================================================================== > --- classes/javax/swing/table/DefaultTableModel.java (revision 250) > +++ classes/javax/swing/table/DefaultTableModel.java (working copy) > @@ -27,7 +27,6 @@ > > import java.io.Serializable; > import java.util.Vector; > -import java.util.Enumeration; > import javax.swing.event.TableModelEvent; > > > @@ -56,6 +55,7 @@ > * > * @version 1.49 05/05/07 > * @author Philip Milne > + * @author Florian Brunner > * > * @see TableModel > * @see #getDataVector > @@ -394,13 +394,13 @@ > return (j == 0) ? i : gcd(j, i%j); > } > > - private static void rotate(Vector v, int a, int b, int shift) { > + private static void rotate(Vector> v, int a, int b, int shift) { > int size = b - a; > int r = size - shift; > int g = gcd(size, r); > for(int i = 0; i < g; i++) { > int to = i; > - Object tmp = v.elementAt(a + to); > + Vector tmp = v.elementAt(a + to); > for(int from = (to + r) % size; from != i; from = (to + r) % size) { > v.setElementAt(v.elementAt(a + from), a + to); > to = from; > @@ -558,7 +558,7 @@ > justifyRows(0, getRowCount()); > int newColumn = getColumnCount() - 1; > for(int i = 0; i < columnSize; i++) { > - Vector row = (Vector)dataVector.elementAt(i); > + Vector row = (Vector) dataVector.elementAt(i); > row.setElementAt(columnData.elementAt(i), newColumn); > } > } > @@ -663,7 +663,7 @@ > * column was given > */ > public void setValueAt(Object aValue, int row, int column) { > - Vector rowVector = (Vector)dataVector.elementAt(row); > + Vector rowVector = (Vector) dataVector.elementAt(row); > rowVector.setElementAt(aValue, column); > fireTableCellUpdated(row, column); > } > @@ -682,7 +682,7 @@ > if (anArray == null) { > return null; > } > - Vector v = new Vector(anArray.length); > + Vector v = new Vector(anArray.length); > for (int i=0; i < anArray.length; i++) { > v.addElement(anArray[i]); > } > @@ -699,7 +699,7 @@ > if (anArray == null) { > return null; > } > - Vector v = new Vector(anArray.length); > + Vector> v = new Vector>(anArray.length); > for (int i=0; i < anArray.length; i++) { > v.addElement(convertToVector(anArray[i])); > } > Index: classes/javax/swing/text/AbstractDocument.java > =================================================================== > --- classes/javax/swing/text/AbstractDocument.java (revision 250) > +++ classes/javax/swing/text/AbstractDocument.java (working copy) > @@ -96,6 +96,7 @@ > * Please see {@link java.beans.XMLEncoder}. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.163 05/05/07 > */ > public abstract class AbstractDocument implements Document, Serializable { > @@ -125,7 +126,7 @@ > if (defaultI18NProperty == null) { > // determine default setting for i18n support > Object o = java.security.AccessController.doPrivileged( > - new java.security.PrivilegedAction() { > + new java.security.PrivilegedAction() { > public Object run() { > return System.getProperty(I18NProperty); > } > @@ -164,7 +165,7 @@ > */ > public Dictionary getDocumentProperties() { > if (documentProperties == null) { > - documentProperties = new Hashtable(2); > + documentProperties = new Hashtable(2); > } > return documentProperties; > } > @@ -468,8 +469,7 @@ > * @since 1.4 > */ > public DocumentListener[] getDocumentListeners() { > - return (DocumentListener[])listenerList.getListeners( > - DocumentListener.class); > + return listenerList.getListeners(DocumentListener.class); > } > > /** > @@ -509,8 +509,7 @@ > * @since 1.4 > */ > public UndoableEditListener[] getUndoableEditListeners() { > - return (UndoableEditListener[])listenerList.getListeners( > - UndoableEditListener.class); > + return listenerList.getListeners(UndoableEditListener.class); > } > > /** > @@ -1052,7 +1051,7 @@ > byte levels[] = calculateBidiLevels( firstPStart, lastPEnd ); > > > - Vector newElements = new Vector(); > + Vector newElements = new Vector(); > > // Calculate the first span of characters in the affected range with > // the same bidi level. If this level is the same as the level of the > @@ -2461,7 +2460,7 @@ > if(nchildren == 0) > return null; > > - Vector tempVector = new Vector(nchildren); > + Vector tempVector = new Vector(nchildren); > > for(int counter = 0; counter < nchildren; counter++) > tempVector.addElement(children[counter]); > @@ -2750,7 +2749,7 @@ > // if the number of changes gets too great, start using > // a hashtable for to locate the change for a given element. > if ((changeLookup == null) && (edits.size() > 10)) { > - changeLookup = new Hashtable(); > + changeLookup = new Hashtable(); > int n = edits.size(); > for (int i = 0; i < n; i++) { > Object o = edits.elementAt(i); > @@ -2919,7 +2918,7 @@ > */ > public DocumentEvent.ElementChange getChange(Element elem) { > if (changeLookup != null) { > - return (DocumentEvent.ElementChange) changeLookup.get(elem); > + return changeLookup.get(elem); > } > int n = edits.size(); > for (int i = 0; i < n; i++) { > @@ -2938,7 +2937,7 @@ > > private int offset; > private int length; > - private Hashtable changeLookup; > + private Hashtable changeLookup; > private DocumentEvent.EventType type; > > } > Index: classes/javax/swing/text/AsyncBoxView.java > =================================================================== > --- classes/javax/swing/text/AsyncBoxView.java (revision 250) > +++ classes/javax/swing/text/AsyncBoxView.java (working copy) > @@ -45,6 +45,7 @@ > * so that the model is stable while being accessed. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.24 05/05/07 > * @since 1.3 > */ > @@ -59,7 +60,7 @@ > */ > public AsyncBoxView(Element elem, int axis) { > super(elem); > - stats = new ArrayList(); > + stats = new ArrayList(); > this.axis = axis; > locator = new ChildLocator(); > flushTask = new FlushTask(); > @@ -198,7 +199,7 @@ > protected ChildState getChildState(int index) { > synchronized(stats) { > if ((index >= 0) && (index < stats.size())) { > - return (ChildState) stats.get(index); > + return stats.get(index); > } > return null; > } > @@ -358,7 +359,7 @@ > synchronized(stats) { > // remove the replaced state records > for (int i = 0; i < length; i++) { > - ChildState cs = (ChildState)stats.remove(offset); > + ChildState cs = stats.remove(offset); > float csSpan = cs.getMajorSpan(); > > cs.getChildView().setParent(null); > @@ -864,7 +865,7 @@ > /** > * The children and their layout statistics. > */ > - java.util.List stats; > + java.util.List stats; > > /** > * Current span along the major axis. This > Index: classes/javax/swing/text/ComponentView.java > =================================================================== > --- classes/javax/swing/text/ComponentView.java (revision 250) > +++ classes/javax/swing/text/ComponentView.java (working copy) > @@ -65,6 +65,7 @@ > * views of a shared model. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.60 05/05/07 > */ > public class ComponentView extends View { > @@ -481,7 +482,7 @@ > return yalign; > } > > - public java.util.Set getFocusTraversalKeys(int id) { > + public java.util.Set getFocusTraversalKeys(int id) { > return KeyboardFocusManager.getCurrentKeyboardFocusManager(). > getDefaultFocusTraversalKeys(id); > } > @@ -503,3 +504,4 @@ > > } > > + > Index: classes/javax/swing/text/DefaultCaret.java > =================================================================== > --- classes/javax/swing/text/DefaultCaret.java (revision 250) > +++ classes/javax/swing/text/DefaultCaret.java (working copy) > @@ -103,6 +103,7 @@ > * Please see {@link java.beans.XMLEncoder}. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.154 05/05/07 > * @see Caret > */ > @@ -775,8 +776,7 @@ > * @since 1.4 > */ > public ChangeListener[] getChangeListeners() { > - return (ChangeListener[])listenerList.getListeners( > - ChangeListener.class); > + return listenerList.getListeners(ChangeListener.class); > } > > /** > @@ -1917,3 +1917,4 @@ > } > } > > + > Index: classes/javax/swing/text/DefaultFormatter.java > =================================================================== > --- classes/javax/swing/text/DefaultFormatter.java (revision 250) > +++ classes/javax/swing/text/DefaultFormatter.java (working copy) > @@ -54,6 +54,8 @@ > * > * @see javax.swing.JFormattedTextField.AbstractFormatter > * > + * @author unattributed > + * @author Florian Brunner > * @version 1.20 05/05/07 > * @since 1.4 > */ > @@ -69,7 +71,7 @@ > private boolean commitOnEdit; > > /** Class used to create new instances. */ > - private Class valueClass; > + private Class valueClass; > > /** NavigationFilter that forwards calls back to DefaultFormatter. */ > private NavigationFilter navigationFilter; > @@ -232,7 +234,7 @@ > * @return Object representation of text > */ > public Object stringToValue(String string) throws ParseException { > - Class vc = getValueClass(); > + Class vc = getValueClass(); > JFormattedTextField ftf = getFormattedTextField(); > > if (vc == null && ftf != null) { > Index: classes/javax/swing/text/DefaultHighlighter.java > =================================================================== > --- classes/javax/swing/text/DefaultHighlighter.java (revision 250) > +++ classes/javax/swing/text/DefaultHighlighter.java (working copy) > @@ -34,6 +34,7 @@ > * painter that renders in a solid color. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.47 05/21/07 > * @see Highlighter > */ > @@ -57,7 +58,7 @@ > // PENDING(prinz) - should cull ranges not visible > int len = highlights.size(); > for (int i = 0; i < len; i++) { > - HighlightInfo info = (HighlightInfo) highlights.elementAt(i); > + HighlightInfo info = highlights.elementAt(i); > if (!(info instanceof LayeredHighlightInfo)) { > // Avoid allocing unless we need it. > Rectangle a = component.getBounds(); > @@ -67,7 +68,7 @@ > a.width -= insets.left + insets.right; > a.height -= insets.top + insets.bottom; > for (; i < len; i++) { > - info = (HighlightInfo)highlights.elementAt(i); > + info = highlights.elementAt(i); > if (!(info instanceof LayeredHighlightInfo)) { > Highlighter.HighlightPainter p = info.getPainter(); > p.paint(g, info.getStartOffset(), info.getEndOffset(), > @@ -160,7 +161,7 @@ > int p0 = -1; > int p1 = -1; > for (int i = 0; i < len; i++) { > - HighlightInfo hi = (HighlightInfo)highlights.elementAt(i); > + HighlightInfo hi = highlights.elementAt(i); > if (hi instanceof LayeredHighlightInfo) { > LayeredHighlightInfo info = (LayeredHighlightInfo)hi; > minX = Math.min(minX, info.x); > @@ -196,7 +197,7 @@ > int p0 = Integer.MAX_VALUE; > int p1 = 0; > for (int i = 0; i < len; i++) { > - HighlightInfo info = (HighlightInfo) highlights.elementAt(i); > + HighlightInfo info = highlights.elementAt(i); > p0 = Math.min(p0, info.p0.getOffset()); > p1 = Math.max(p1, info.p1.getOffset()); > } > @@ -334,7 +335,7 @@ > > private final static Highlighter.Highlight[] noHighlights = > new Highlighter.Highlight[0]; > - private Vector highlights = new Vector(); // Vector > + private Vector highlights = new Vector(); // Vector > private JTextComponent component; > private boolean drawsLayeredHighlights; > private SafeDamager safeDamager = new SafeDamager(); > @@ -574,8 +575,8 @@ > * call. > */ > class SafeDamager implements Runnable { > - private Vector p0 = new Vector(10); > - private Vector p1 = new Vector(10); > + private Vector p0 = new Vector(10); > + private Vector p1 = new Vector(10); > private Document lastDoc = null; > > /** > @@ -590,8 +591,8 @@ > int len = p0.size(); > for (int i = 0; i < len; i++){ > mapper.damageRange(component, > - ((Position)p0.get(i)).getOffset(), > - ((Position)p1.get(i)).getOffset()); > + (p0.get(i)).getOffset(), > + (p1.get(i)).getOffset()); > } > } > } > Index: classes/javax/swing/text/DefaultStyledDocument.java > =================================================================== > --- classes/javax/swing/text/DefaultStyledDocument.java (revision 250) > +++ classes/javax/swing/text/DefaultStyledDocument.java (working copy) > @@ -70,6 +70,7 @@ > * Please see {@link java.beans.XMLEncoder}. > * > * @author Timothy Prinzing > + * @author Florian Brunner > * @version 1.133 05/05/07 > * @see Document > * @see AbstractDocument > @@ -85,7 +86,7 @@ > */ > public DefaultStyledDocument(Content c, StyleContext styles) { > super(c, styles); > - listeningStyles = new Vector(); > + listeningStyles = new Vector