I'm working at my local library today. I'm working from home, but an electrician is working on our house, so now power there. I'm working in the "laptop workstations" area - which just happens to be where a lot of students come for laptop support (incoming freshman are required to have a laptop). They wave a campus-wide Wi-Fi network, but I'm not a student, so alas - no access (that's why I'm plugged in). Since I've been here (approx. 4 hours), a number of students have come by to get their laptops fixed. All have been Windows XP machines, all have had Virus or Spyware issues. What a maintenance nightmare from a tech support perspective. It's good to be a Mac user - no viruses on my laptop!
I'm upgrading our application at work to the nightly build (20031020) of Struts in order to use the validwhen Validator. I found a few deprecations and errors in the process, so I thought I'd share to help others upgrade easier:
- ActionError has been deprecated in favor of ActionMessage. Likewise, ActionMessages.GLOBAL_MESSAGE replaces ActionErrors.GLOBAL_ERROR.
- Methods in ResponseUtils have been deprecated in favor of TagUtils' methods.
- RequestUtils.message has been deprecated in favor of TagUtils.message. Other methods include RequestUtils.lookup.
- Many of the methods in TagUtils aren't static (they where were in Request/ResponseUtils), so you have to create an instance of TagUtils. Anyone know the logic here?
- ValidatorResources.get deprecated in favor of ValidatorResources.getForm.
- ValidatorForm.getFieldMap() is gone, which no apparent replacement method (at least not in the JavaDocs).
- The Tiles' Controller interface's perform method has been deprecated in favor of execute. You gotta love this one - while perform has been deprecated, you must use it or you will get a compile error saying you must implement it (or declare your class abstract). Same goes for execute. So to upgrade, I had to implement both methods - where my perform method calls my execute method.
- org.apache.commons.lang.NumberUtils moved to org.apache.commons.lang.math.NumberUtils
- org.apache.commons.validator.ValidatorUtil moved to org.apache.commons.validator.util.ValidatorUtils
- stringToInt(java.lang.String) in org.apache.commons.lang.math.NumberUtils has been deprecated. Not according to the its JavaDoc.
Final tally - two deprecation errors that don't seem to have replacements (yet):
[javac] .../src/web/org/appfuse/webapp/filter/BreadCrumbFilter.java:182:
warning: stringToInt(java.lang.String) in
org.apache.commons.lang.math.NumberUtils has been deprecated
[javac] int mSS = NumberUtils.stringToInt(temp);
[javac] ^
[javac] .../src/web/org/appfuse/webapp/taglib/LabelTag.java:71: warning:
getFieldMap() in org.apache.commons.validator.Form has been deprecated
[javac] Field field = (Field) form.getFieldMap().get(fieldName);
Later: Thanks to Steve Raeburn (via the struts-dev mailing list), I now have no deprecation errors. NumberUtils.stringToInt(String) is now NumberUtils.toInt(String) and Form.getFieldMap().get(String) is now Form.getField(String). Thanks Steve!
I've been trying to use IDEA (on OS X) for the past few weeks and I keep reverting back to Eclipse for features that seem to be missing. I know the features must be there, but I just can't find them. Why else would everyone like it so much? Sidenote: I've never used IDEA for a feature that doesn't exist in Eclipse - I'm sure there are some, I'm just not using them. It sure would be cool if someone created a HowTo explaining how to migrate from Eclipse to IDEA. In the meantime, I'll settle for posting my questions here:
- Debugging in Tomcat - I'm currently using Sysdeo's Tomcat Plugin in Eclipse for Tomcat 4.1.27. It's super easy to setup and use - I expect the same ease-of-use from IDEA. I haven't looked much, but I'd love to hear feedback on IDEA's Tomcat debugging support.
- Renaming a variable in a JavaBean renames getter and setter methods. Sounds simple enough, in my 10 second search, I couldn't find it. In Eclipse, right-click -> Refactor -> Rename.
- Override/Implement methods (from parent classes and interfaces). Right click -> Source -> Override/Implement methods in Eclipse.
I'll add more as I think of them throughout the day. So far, I like IDEA, but to be honest - it's not saving me any time over Eclipse. It also locks up as much as Eclipse and it's responsiveness is still a big sluggish on OS X (10.2.8) with 1 GB of RAM (1.33 MHz processor). Hopefully Panther will make both IDEs faster. Two weeks ago, I was thinking of buying it (as well as Dreamweaver) - now I'm frustrated with IDEA's lack of features and Dreamweaver's slowness. I'll probably pass on shelling out the cash since Eclipse and BBEdit are giving me all the features I need in IDEA and Dreamweaver.