Author: akushunin
Date: 2007-12-28 12:32:11 -0500 (Fri, 28 Dec 2007)
New Revision: 5091
Modified:
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
RF-1800
Modified:
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-12-28
17:20:22 UTC (rev 5090)
+++
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-12-28
17:32:11 UTC (rev 5091)
@@ -498,9 +498,10 @@
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
JSFunction result = new JSFunction("new Date");
- result.addParameter(Integer.valueOf(calendar.get(Calendar.YEAR)));
- result.addParameter(Integer.valueOf(calendar.get(Calendar.MONTH)));
- result.addParameter(Integer.valueOf(calendar.get(Calendar.DATE)));
+ //Fix for jdk 1.4 compatibility.
+ result.addParameter(new Integer(calendar.get(Calendar.YEAR)));
+ result.addParameter(new Integer(calendar.get(Calendar.MONTH)));
+ result.addParameter(new Integer(calendar.get(Calendar.DATE)));
return result;
}
@@ -509,11 +510,12 @@
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
JSFunction result = new JSFunction("new Date");
- result.addParameter(Integer.valueOf(calendar.get(Calendar.YEAR)));
- result.addParameter(Integer.valueOf(calendar.get(Calendar.MONTH)));
- result.addParameter(Integer.valueOf(calendar.get(Calendar.DATE)));
- result.addParameter(Integer.valueOf(calendar.get(Calendar.HOUR_OF_DAY)));
- result.addParameter(Integer.valueOf(calendar.get(Calendar.MINUTE)));
+ //Fix for jdk 1.4 compatibility.
+ result.addParameter(new Integer(calendar.get(Calendar.YEAR)));
+ result.addParameter(new Integer(calendar.get(Calendar.MONTH)));
+ result.addParameter(new Integer(calendar.get(Calendar.DATE)));
+ result.addParameter(new Integer(calendar.get(Calendar.HOUR_OF_DAY)));
+ result.addParameter(new Integer(calendar.get(Calendar.MINUTE)));
result.addParameter(new Integer(0));
return result;
}
Show replies by date