commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [lang] org.apache.commons.lang3.time.CalendarReflection is no longer needed now that we are on Java 7. Deprecate for now. Might remove depending on discussion on dev ML.
Date Thu, 17 Nov 2016 19:27:55 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master 46c42fcda -> e6b830bf9


org.apache.commons.lang3.time.CalendarReflection is no longer needed now
that we are on Java 7. Deprecate for now. Might remove depending on
discussion on dev ML.

Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/e6b830bf
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/e6b830bf
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/e6b830bf

Branch: refs/heads/master
Commit: e6b830bf95f712672cb9e77cd852606cd134c5fc
Parents: 46c42fc
Author: Gary Gregory <ggregory@apache.org>
Authored: Thu Nov 17 11:27:53 2016 -0800
Committer: Gary Gregory <ggregory@apache.org>
Committed: Thu Nov 17 11:27:53 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/commons/lang3/time/CalendarReflection.java     | 2 ++
 src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/e6b830bf/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java b/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
index 4f980ac..76a1f46 100644
--- a/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
+++ b/src/main/java/org/apache/commons/lang3/time/CalendarReflection.java
@@ -24,7 +24,9 @@ import org.apache.commons.lang3.exception.ExceptionUtils;
 
 /**
  * Use reflection to access java 1.7 methods in Calendar.  This allows compilation with 1.6
compiler.
+ * @deprecated Now that we are on Java 7.
  */
+@Deprecated
 class CalendarReflection {
 
     private static final Method IS_WEEK_DATE_SUPPORTED = getCalendarMethod("isWeekDateSupported");

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/e6b830bf/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
index 4d502c6..fafa71c 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
@@ -1292,7 +1292,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
 
         @Override
         public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException
{
-            mRule.appendTo(buffer, CalendarReflection.getWeekYear(calendar));
+            mRule.appendTo(buffer, calendar.getWeekYear());
         }
 
         @Override


Mime
View raw message