empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franci...@apache.org
Subject svn commit: r882884 - in /incubator/empire-db/trunk: empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/ empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/ empire-db-str...
Date Sat, 21 Nov 2009 11:29:48 GMT
Author: francisdb
Date: Sat Nov 21 11:29:47 2009
New Revision: 882884

URL: http://svn.apache.org/viewvc?rev=882884&view=rev
Log:
fixing some findbugs issues

Modified:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/info/CalendarInfo.java

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java?rev=882884&r1=882883&r2=882884&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
Sat Nov 21 11:29:47 2009
@@ -48,7 +48,7 @@
 
 public class SampleAdvApp 
 {
-    public static Logger logger = Logger.getLogger(SampleAdvApp.class.getName());
+    private static final Logger logger = Logger.getLogger(SampleAdvApp.class.getName());
 
     private static final SampleAdvDB db = new SampleAdvDB();
 

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java?rev=882884&r1=882883&r2=882884&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java
(original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java
Sat Nov 21 11:29:47 2009
@@ -43,7 +43,7 @@
 
 public class SampleApp 
 {
-	public static Logger logger = Logger.getLogger(SampleApp.class.getName());
+	private static final Logger logger = Logger.getLogger(SampleApp.class.getName());
 
 	private static final SampleDB db = new SampleDB();
 

Modified: incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/info/CalendarInfo.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/info/CalendarInfo.java?rev=882884&r1=882883&r2=882884&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/info/CalendarInfo.java
(original)
+++ incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/info/CalendarInfo.java
Sat Nov 21 11:29:47 2009
@@ -35,16 +35,17 @@
     // Logger
     protected static Log log = LogFactory.getLog(ControlComponent.class);
 
-    // FIXME SimpleDateFormat is not thread safe, do not keep it in static context
-    protected static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
+    private static final String DATE_FORMAT = "yyyyMMdd";
     
     public static String formatDate(Date date)
     {
+    	SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
         return dateFormat.format(date);
     }
     
     public static Date parseDate(String date)
     {
+    	SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
         if (date==null || date.length()!=dateFormat.toPattern().length())
         {   // Error: Invalid Date supplied. Using Today
             log.error("Invalid date format: " + String.valueOf(date));



Mime
View raw message