Bug 4547 - Softsqueeze doesn't run on Java 6 due to an IllegalArgumentException
: Softsqueeze doesn't run on Java 6 due to an IllegalArgumentException
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Softsqueeze
: 6.5.0
: PC All
: P2 normal (vote)
: ---
Assigned To: Richard Titmuss
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-26 06:53 UTC by Dominik M�hl
Modified: 2006-12-20 05:04 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
Patch for Softsqueeze (trunk) (1.65 KB, patch)
2006-11-26 06:53 UTC, Dominik M�hl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik M�hl 2006-11-26 06:53:24 UTC
Hi,

I'm currently running Java 6 RC on my workstation and could not run Softsqueeze due to an IllegalArgumentException:

java.lang.IllegalArgumentException: defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE
	at javax.swing.JDialog.setDefaultCloseOperation(JDialog.java:705)
	at org.titmuss.softsqueeze.skin.SkinWindow.createContainer(SkinWindow.java:150)
	at org.titmuss.softsqueeze.skin.Skin.<init>(Skin.java:99)
	at org.titmuss.softsqueeze.Softsqueeze.openSkins(Softsqueeze.java:254)
	at org.titmuss.softsqueeze.Softsqueeze.<init>(Softsqueeze.java:155)
	at org.titmuss.softsqueeze.Softsqueeze.<init>(Softsqueeze.java:110)
	at org.titmuss.softsqueeze.Softsqueeze.main(Softsqueeze.java:493)
	at org.titmuss.softsqueeze.Application.main(Application.java:55)

After getting the code I found out that EXIT_ON_CLOSE (the constant which is being set) was settable but being ignored on Java versions prior to 1.6.0 but now results in the above exception. EXIT_ON_CLOSE is still useable and supported on JFrames but not on JDialogs.

See these bugs in the Java Bugs Database:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5109681
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403861

As EXIT_ON_CLOSE on JDialogs did not have any effect in earlier java versions I propose a simple patch to make live for people using Java 6 (and of course especially me) a lot easier :)

The patch follows. It also contains a few changed project settings so Softsqueeze could be run from Eclipse without any tweaking :)

Hope it helps

Dominik
Comment 1 Dominik M�hl 2006-11-26 06:53:58 UTC
Created attachment 1727 [details]
Patch for Softsqueeze (trunk)
Comment 2 James Rome 2006-12-12 13:46:35 UTC
It does this with the released java 1.6.I had to use the SoftSqueeze with the jre included.
Comment 3 Chris Owens 2006-12-13 15:11:41 UTC
What action should we take on this, Richard?  Java 1.6 is still beta at this point.  Do you know Dominik?  Does his patch look good?  Does it look like a safe change in that it will still work with most users who have 1.4.2 installed?  Do you want to check this in for me to test as part of the ss 7.0 nightlies?

Comment 4 James Rome 2006-12-13 16:34:20 UTC
1.6 was released two days ago!
Comment 5 Richard Titmuss 2006-12-16 15:07:08 UTC
I've commited a fix to the softsqueeze source in svn, can folks please try this out. I'll try to make a binary release over the next fews days after testing on other platforms/jre releases.
Comment 6 Dominik M�hl 2006-12-17 05:48:21 UTC
I've checked out the Softsqueeze trunk and I'm happy to report that it works fine under Linux with JDK 1.5 and 1.6 (the two which I have installed)
Comment 7 Richard Titmuss 2006-12-20 01:49:42 UTC
*** Bug 4591 has been marked as a duplicate of this bug. ***
Comment 8 Mick 2006-12-20 02:56:58 UTC
Softsqueeze 3.3 in the 20_12 6.5 nightly is still reporting the same error in my system.

Looks like neither FW71 or Softsqueeze 3.3 made it into the Windows nightly.
Comment 9 Richard Titmuss 2006-12-20 05:04:33 UTC
Both the firware and softsqueeze will be in tomorrows nightly, 21 December. I put the wrong date in the forum posts, sorry.