subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r908298 - /subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
Date Wed, 10 Feb 2010 00:45:59 GMT
Author: hwright
Date: Wed Feb 10 00:45:58 2010
New Revision: 908298

URL: http://svn.apache.org/viewvc?rev=908298&view=rev
Log:
* subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
  (BlameCallback2Wrapper): Move this class definition into the only
    method in which it is actually used.

Modified:
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=908298&r1=908297&r2=908298&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
Wed Feb 10 00:45:58 2010
@@ -2029,9 +2029,47 @@
                       BlameCallback2 callback)
             throws ClientException
     {
-        BlameCallback2Wrapper cw = new BlameCallback2Wrapper(callback);
+        class BlameCallback2Wrapper implements BlameCallback3
+        {
+            private BlameCallback2 oldCallback;
+
+            public BlameCallback2Wrapper(BlameCallback2 callback)
+            {
+                oldCallback = callback;
+            }
+
+            public void singleLine(long lineNum, long revision, Map revProps,
+                                   long mergedRevision, Map mergedRevProps,
+                                   String mergedPath, String line,
+                                   boolean localChange)
+                throws ClientException
+            {
+                DateFormat df =
+                        new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
+
+                try
+                {
+                    oldCallback.singleLine(
+                        df.parse((String) revProps.get("svn:date")),
+                        revision,
+                        (String) revProps.get("svn:author"),
+                        mergedRevProps == null ? null
+                            : df.parse((String)
+                                            mergedRevProps.get("svn:date")),
+                        mergedRevision,
+                        mergedRevProps == null ? null
+                            : (String) mergedRevProps.get("svn:author"),
+                        mergedPath, line);
+                }
+                catch (ParseException e)
+                {
+                    throw ClientException.fromException(e);
+                }
+            }
+        }
+
         blame(path, pegRevision, revisionStart, revisionEnd, ignoreMimeType,
-              includeMergedRevisions, cw);
+              includeMergedRevisions, new BlameCallback2Wrapper(callback));
     }
 
     /**
@@ -2538,43 +2576,6 @@
         }
     }
 
-    /**
-     * A private wrapper for compatibility of blame implementations.
-     */
-    private class BlameCallback2Wrapper implements BlameCallback3
-    {
-        private BlameCallback2 oldCallback;
-
-        public BlameCallback2Wrapper(BlameCallback2 callback)
-        {
-            oldCallback = callback;
-        }
-
-        public void singleLine(long lineNum, long revision, Map revProps,
-                               long mergedRevision, Map mergedRevProps,
-                               String mergedPath, String line,
-                               boolean localChange)
-            throws ClientException
-        {
-            DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
-
-            try {
-                oldCallback.singleLine(
-                    df.parse((String) revProps.get("svn:date")),
-                    revision,
-                    (String) revProps.get("svn:author"),
-                    mergedRevProps == null ? null
-                        : df.parse((String) mergedRevProps.get("svn:date")),
-                    mergedRevision,
-                    mergedRevProps == null ? null
-                        : (String) mergedRevProps.get("svn:author"),
-                    mergedPath, line);
-            } catch (ParseException e) {
-                throw ClientException.fromException(e);
-            }
-        }
-    }
-
     private class MyDiffSummaryReceiver
         implements org.apache.subversion.javahl.callback.DiffSummaryCallback
     {



Mime
View raw message