Skip to content

Commit

Permalink
Removing awkward @PostConstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
nurkiewicz committed Sep 4, 2011
1 parent 426e775 commit b252e00
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main/java/com/blogspot/nurkiewicz/Bar.scala
Expand Up @@ -2,7 +2,6 @@ package com.blogspot.nurkiewicz

import org.apache.commons.lang.time.FastDateFormat
import org.springframework.stereotype.Service
import javax.annotation.PostConstruct
import java.util.Date
import org.apache.commons.lang.time.FastDateFormat.FULL

Expand All @@ -12,11 +11,7 @@ import org.apache.commons.lang.time.FastDateFormat.FULL
*/
@Service
class Bar {
private var dateFormat: FastDateFormat = null

@PostConstruct def init() {
dateFormat = FastDateFormat.getDateTimeInstance(FULL, FULL)
}
private val dateFormat = FastDateFormat.getDateTimeInstance(FULL, FULL)

def format(date: Date): String = dateFormat.format(date)

Expand Down

0 comments on commit b252e00

Please sign in to comment.