Feature - Implemented Change target platform from Java 1.4 to something newer.

roippi

Developer
Also of note is the 1.5 addition of the java.util.concurrent.locks interface. Mafia is a multi-threaded application and thus has to make sure those threads don't interfere with one another. Synchronized blocks do the job, but the locks package really adds a lot more flexibility. You can explicitly unlock threads, interrupt locks, create timed locks, etc.

I bring this up because recently there was this thread which has to do with thread deadlock. It's pretty inevitable that every so often concurrency issues are going to pop up, so it's nice to have additional tools in that regard.
 

Veracity

Developer
Staff member
I'd like to put in a vote for not going any higher than 1.5, since that's end-of-the-line for my 10.4 Mac.
While it's not required that I be able to use KoLmafia on my Mac since I have another computer, I'd really appreciate this as well. :D
My (almost) 5-year old Mac laptop runs OS X 10.6.8, which currently has 1.6. You guys must have ancient computers!

That said, I don't personally know anybody who can't run 1.5, so, if we are going to do this, going from 1.4 to 1.5 would be fine. I wouldn't mind learning and using the newer Java features.
 

roippi

Developer
Cool! :)

What say we announce an end-of-life for 1.4, then, with the next point release being the last to officially support 1.4?
 

roippi

Developer
Works for me but quite frankly I always considered it Hola's decision to make.

I agree, of course. Hola (and Jason) have said they're okay with 1.5, so I think we're ok on that front?

The question is suddenly no longer academic as I need to import an adapter library (this one). Basically need to change a ListModel (which is the format inventory/etc data is in) into a TableModel. The library is 1.5+.
 

Bale

Minion
It seems that the three big devs have agreed to Java 1.5 and nobody at all dissents, so good luck with that project. 15.2 will be the last to be restricted to Java 1.4 as you already suggested.


I'd like to put in a vote for not going any higher than 1.5, since that's end-of-the-line for my 10.4 Mac.

Java 1.6 is vetoed, but Java 1.5 has no nay sayers.
 
Last edited:

roippi

Developer
Alrighty then. r11014 bumps build.xml to 1.5; I think that's all that's needed for "officially" dropping 1.4.2. Set IDEs to 1.5 compliance and phasers to stun.
 

fronobulax

Developer
Staff member
Alrighty then. r11014 bumps build.xml to 1.5; I think that's all that's needed for "officially" dropping 1.4.2. Set IDEs to 1.5 compliance and phasers to stun.

Someone should also update the appropriate SourceForge page.
 

Aankhen

Member
(Sorry for the sorta necro. I wasn’t sure where this should go.)

I saw that roippi’s been converting things into enums. Thought I’d help out since it’s fairly tedious. Here’s a patch that replaces KoLConstants.ABORT_STATE, etc. with an enumeration. The vast majority of it was just searching and replacing, and adding an import.

…I was going to attach it, but 300 KB is apparently larger than the forum’s weirdly specific limit of 97.something KB, so I uploaded it elsewhere.
 

roippi

Developer
Cool, thanks. I'll check it out and commit later tonight.

Edit: bit of a problem patching (root was b/src instead of /src) but after some finagling, patch looks fine. Thanks. r11170
 
Last edited:

Aankhen

Member
Sorry. That seems to be an artifact of Mercurial’s diff format.

If I have any more enumification patches, should I post them here? Or would somewhere else be more appropriate?
 

roippi

Developer
S'okay, I've now learned how to ignore leading directories with one of my patching tools. Useful!

I'd say make a new feature request thread for new enum patches.
 
Top