Large Grails Log File

I was looking at reorganizing my directories for several grails and java projects I am on, and had local branches from our git hub I didn’t want to lose so re-cloning wasn’t an option. Much to my surprise, when I got info on the entire repo directory it was almost 28 gigabytes. My first check […]

Those Brackets Really Matter in a Groovy Switch!

I’ve been working on a data detector plugin for Grails as a side project, and thought it important to mention the importance of including brackets {} for logic statements in groovy switches. Below I have a simple detector for a simple DataType enum that has STRING and DECIMAL (which in my real code is BigDecimal) […]

Setting the Server TimeZone in a Grails Application

If you want to start up your grails server in a different timezone (for instance to test your client as if it were not co-located in the same zone as the server) just add this to BootStrap.groovy: TimeZone.setDefault(TimeZone.getTimeZone(“PST”))

Final Variables in Groovy Curiosity

(On my local I’m running Groovy 2.1.9 on Java/JDK 6). Was having a Discussion of final and static, and decided to try something in groovyConsole.  In the Java world, a final variable cannot be reassigned a value once initialized. Groovy Code: final String i = “test” println i i = “red”println i Output: groovy> final […]