ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject incubator-ignite git commit: # ignite-715 Add check serialVersionUID for anonymous class.
Date Fri, 10 Apr 2015 07:34:48 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-715 [created] 021ddf81e


# ignite-715 Add check serialVersionUID for anonymous class.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/021ddf81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/021ddf81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/021ddf81

Branch: refs/heads/ignite-715
Commit: 021ddf81e4fb492c8f21d3b81d9b89928fcae144
Parents: 9e79a2d
Author: Andrey Novikov <anovikov@gridgain.com>
Authored: Fri Apr 10 14:34:21 2015 +0700
Committer: Andrey Novikov <anovikov@gridgain.com>
Committed: Fri Apr 10 14:34:21 2015 +0700

----------------------------------------------------------------------
 modules/core/pom.xml                                    |  2 +-
 .../internal/visor/cache/VisorCacheClearTask.java       |  3 +++
 .../ignite/internal/visor/log/VisorLogSearchTask.java   | 12 ++++--------
 .../visor/node/VisorNodeEventsCollectorTask.java        |  3 +++
 .../ignite/internal/visor/util/VisorTaskUtils.java      |  3 +++
 .../apache/ignite/tools/classgen/ClassesGenerator.java  |  3 +--
 6 files changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/021ddf81/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 466ccb9..4c88b07 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -238,7 +238,7 @@
 #
                                     ]]>
                                 </argument>
-                                <argument>org.apache.ignite:org.jdk8.backport</argument>
+                                <argument>org.apache.ignite:org.jsr166</argument>
                             </arguments>
                         </configuration>
                     </execution>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/021ddf81/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
index dbc2e92..4b588b6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
@@ -71,6 +71,9 @@ public class VisorCacheClearTask extends VisorOneNodeTask<String, IgniteBiTuple<
             this.cacheName = cacheName;
 
             lsnr = new IgniteInClosure<IgniteFuture<Integer>>() {
+                /** */
+                private static final long serialVersionUID = 0L;
+
                 @Override public void apply(IgniteFuture<Integer> f) {
                     assert futs[0].isDone();
                     assert futs[1] == null || futs[1].isDone();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/021ddf81/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
index 476d58c..3ebfb2d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
@@ -145,14 +145,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
             int line = 0;
 
             try (GridReversedLinesFileReader reader = new GridReversedLinesFileReader(f,
4096, charset)) {
-                Collection<String> lastLines = new LinkedList<String>() {
-                    @Override public boolean add(String s) {
-                        if (size() >= HALF)
-                            removeFirst();
-
-                        return super.add(s);
-                    }
-                };
+                Deque<String> lastLines = new LinkedList<>();
 
                 String s;
                 int lastFoundLine = 0, foundCnt = 0;
@@ -195,6 +188,9 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
                         }
                     }
 
+                    if (lastLines.size() >= HALF)
+                        lastLines.removeFirst();
+
                     lastLines.add(s);
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/021ddf81/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
index d1bd940..ef4415a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
@@ -270,6 +270,9 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
                 nl.get(arg.keyOrder()) : -1L;
 
             Collection<Event> evts = ignite.events().localQuery(new IgnitePredicate<Event>()
{
+                /** */
+                private static final long serialVersionUID = 0L;
+
                 @Override public boolean apply(Event evt) {
                     return evt.localOrder() > startEvtOrder &&
                         (arg.typeArgument() == null || F.contains(arg.typeArgument(), evt.type()))
&&

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/021ddf81/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index d052216..450b1da 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -377,6 +377,9 @@ public class VisorTaskUtils {
         final AtomicBoolean lastFound = new AtomicBoolean(lastOrder < 0);
 
         IgnitePredicate<Event> p = new IgnitePredicate<Event>() {
+            /** */
+            private static final long serialVersionUID = 0L;
+
             @Override public boolean apply(Event e) {
                 // Detects that events were lost.
                 if (!lastFound.get() && (lastOrder == e.localOrder()))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/021ddf81/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
----------------------------------------------------------------------
diff --git a/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
b/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
index 377f8c2..03e0384 100644
--- a/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
+++ b/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
@@ -186,8 +186,7 @@ public class ClassesGenerator {
             Class<?> cls = Class.forName(clsName, false, ldr);
 
             if (Serializable.class.isAssignableFrom(cls) && !AbstractQueuedSynchronizer.class.isAssignableFrom(cls))
{
-                if (!cls.isInterface() && !Modifier.isAbstract(cls.getModifiers())
&& !cls.isEnum() &&
-                    !cls.getSimpleName().isEmpty() && cls.getName().startsWith("org.apache.ignite"))
{
+                if (!cls.isInterface() && !Modifier.isAbstract(cls.getModifiers())
&& !cls.isEnum()) {
                     try {
                         Field field = cls.getDeclaredField("serialVersionUID");
 


Mime
View raw message