• Post Reply Bookmark Topic Watch Topic
  • New Topic

New Keywords in JavaSE5.0  RSS feed

 
Vinayagam Kulandaivel
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Techies,

enum become the keyword in JavaSE5.0, What will happend in the existing apps that using "enum" as instance. Is there any possible to avoid this.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same thing that happened to apps that used "assert" under JDK 1.4. There's a compiler switch (the -source switch) which allows you to turn off some newer language features when compiling legacy code. Such code needs to be updated eventually, but you can still compile it with the Tiger compiler.
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not to mention that renaming a variable is not what I'd consider a particularly difficult refactoring...
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Jess rule engine -- which is essentially just a Java library -- exported a public method named assert() which a great deal of legacy code depended on. Therefore, we had to add a replacement method and deprecate the original method in later patchlevels of the existing version, and then finally remove the method in the development stream of the next major release. So although it's technically trivial, the social issues can take much longer!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!