ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [30/50] [abbrv] incubator-ignite git commit: IGNITE-141 - Marshallers refactoring
Date Wed, 11 Mar 2015 00:56:58 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d63a88d/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
index e630277..7ca47d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/marshaller/optimized/GridClientOptimizedMarshaller.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.client.marshaller.*;
 import org.apache.ignite.internal.processors.rest.client.message.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.marshaller.optimized.*;
 
 import java.io.*;
@@ -112,7 +111,7 @@ public class GridClientOptimizedMarshaller implements GridClientMarshaller
{
 
             assert clsName != null : id;
 
-            return U.forName(clsName, ldr);
+            return Class.forName(clsName, false, ldr);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d63a88d/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 50a1862..d6e3339 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -266,9 +266,6 @@ public abstract class IgniteUtils {
     /** */
     static volatile long curTimeMillis = System.currentTimeMillis();
 
-    /** Primitive class map. */
-    private static final Map<String, Class<?>> primitiveMap = new HashMap<>(16,
.5f);
-
     /** Boxed class map. */
     private static final Map<Class<?>, Class<?>> boxedClsMap = new HashMap<>(16,
.5f);
 
@@ -398,15 +395,6 @@ public abstract class IgniteUtils {
         IgniteUtils.javaRtName = javaRtName;
         IgniteUtils.javaRtVer = javaRtVer;
 
-        primitiveMap.put("byte", byte.class);
-        primitiveMap.put("short", short.class);
-        primitiveMap.put("int", int.class);
-        primitiveMap.put("long", long.class);
-        primitiveMap.put("float", float.class);
-        primitiveMap.put("double", double.class);
-        primitiveMap.put("char", char.class);
-        primitiveMap.put("boolean", boolean.class);
-
         boxedClsMap.put(byte.class, Byte.class);
         boxedClsMap.put(short.class, Short.class);
         boxedClsMap.put(int.class, Integer.class);
@@ -7898,24 +7886,6 @@ public abstract class IgniteUtils {
     }
 
     /**
-     * Gets class for provided name. Accepts primitive types names.
-     *
-     * @param clsName Class name.
-     * @param ldr Class loader.
-     * @return Class.
-     * @throws ClassNotFoundException If class not found.
-     */
-    public static Class<?> forName(@Nullable String clsName, @Nullable ClassLoader
ldr)
-        throws ClassNotFoundException {
-        if (clsName == null)
-            return null;
-
-        Class<?> cls = primitiveMap.get(clsName);
-
-        return cls != null ? cls : Class.forName(clsName, true, ldr);
-    }
-
-    /**
      * Applies a supplemental hash function to a given hashCode, which
      * defends against poor quality hash functions.  This is critical
      * because ConcurrentHashMap uses power-of-two length hash tables,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d63a88d/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
index 74a491f..5ce6956 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
@@ -877,7 +877,7 @@ class OptimizedClassDescriptor {
                 return in.readBooleanArray();
 
             case TYPE_OBJ_ARR:
-                return in.readArray(U.forName(in.readUTF(), in.classLoader()));
+                return in.readArray(Class.forName(in.readUTF(), false, in.classLoader()));
 
             case TYPE_STR:
                 return in.readString();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d63a88d/modules/core/src/main/resources/META-INF/classnames-jdk.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames-jdk.properties b/modules/core/src/main/resources/META-INF/classnames-jdk.properties
new file mode 100644
index 0000000..0cae0f7
--- /dev/null
+++ b/modules/core/src/main/resources/META-INF/classnames-jdk.properties
@@ -0,0 +1,325 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+[B
+[C
+[D
+[F
+[I
+[J
+[S
+[Z
+[Ljava.lang.Object;
+java.lang.AbstractMethodError
+java.lang.ArithmeticException
+java.lang.ArrayIndexOutOfBoundsException
+java.lang.ArrayStoreException
+java.lang.AssertionError
+java.lang.Boolean
+java.lang.BootstrapMethodError
+java.lang.Byte
+java.lang.Character
+java.lang.Character$UnicodeScript
+java.lang.Class
+java.lang.ClassCastException
+java.lang.ClassCircularityError
+java.lang.ClassFormatError
+java.lang.ClassNotFoundException
+java.lang.CloneNotSupportedException
+java.lang.Double
+java.lang.EnumConstantNotPresentException
+java.lang.Error
+java.lang.Exception
+java.lang.ExceptionInInitializerError
+java.lang.Float
+java.lang.IllegalAccessError
+java.lang.IllegalAccessException
+java.lang.IllegalArgumentException
+java.lang.IllegalMonitorStateException
+java.lang.IllegalStateException
+java.lang.IllegalThreadStateException
+java.lang.IncompatibleClassChangeError
+java.lang.IndexOutOfBoundsException
+java.lang.InstantiationError
+java.lang.InstantiationException
+java.lang.Integer
+java.lang.InternalError
+java.lang.InterruptedException
+java.lang.LinkageError
+java.lang.Long
+java.lang.NegativeArraySizeException
+java.lang.NoClassDefFoundError
+java.lang.NoSuchFieldError
+java.lang.NoSuchFieldException
+java.lang.NoSuchMethodError
+java.lang.NoSuchMethodException
+java.lang.NullPointerException
+java.lang.NumberFormatException
+java.lang.OutOfMemoryError
+java.lang.ProcessBuilder$Redirect$Type
+java.lang.ReflectiveOperationException
+java.lang.RuntimeException
+java.lang.RuntimePermission
+java.lang.SecurityException
+java.lang.Short
+java.lang.StackOverflowError
+java.lang.StackTraceElement
+java.lang.String
+java.lang.String$CaseInsensitiveComparator
+java.lang.StringBuffer
+java.lang.StringBuilder
+java.lang.StringIndexOutOfBoundsException
+java.lang.Thread$State
+java.lang.ThreadDeath
+java.lang.Throwable
+java.lang.TypeNotPresentException
+java.lang.UNIXProcess$LaunchMechanism
+java.lang.UnknownError
+java.lang.UnsatisfiedLinkError
+java.lang.UnsupportedClassVersionError
+java.lang.UnsupportedOperationException
+java.lang.VerifyError
+java.lang.annotation.AnnotationFormatError
+java.lang.annotation.AnnotationTypeMismatchException
+java.lang.annotation.ElementType
+java.lang.annotation.IncompleteAnnotationException
+java.lang.annotation.RetentionPolicy
+java.lang.instrument.IllegalClassFormatException
+java.lang.instrument.UnmodifiableClassException
+java.lang.invoke.MethodType
+java.lang.invoke.WrongMethodTypeException
+java.lang.management.ManagementPermission
+java.lang.management.MemoryType
+java.lang.management.PlatformComponent
+java.lang.reflect.GenericSignatureFormatError
+java.lang.reflect.InvocationTargetException
+java.lang.reflect.MalformedParameterizedTypeException
+java.lang.reflect.Proxy
+java.lang.reflect.ReflectPermission
+java.lang.reflect.UndeclaredThrowableException
+java.net.Authenticator$RequestorType
+java.net.BindException
+java.net.ConnectException
+java.net.HttpRetryException
+java.net.Inet4Address
+java.net.Inet6Address
+java.net.InetAddress
+java.net.InetAddress$Cache$Type
+java.net.InetSocketAddress
+java.net.MalformedURLException
+java.net.NetPermission
+java.net.NoRouteToHostException
+java.net.PortUnreachableException
+java.net.ProtocolException
+java.net.Proxy$Type
+java.net.SocketException
+java.net.SocketPermission
+java.net.SocketPermissionCollection
+java.net.SocketTimeoutException
+java.net.StandardProtocolFamily
+java.net.URI
+java.net.URISyntaxException
+java.net.URL
+java.net.UnknownHostException
+java.net.UnknownServiceException
+java.util.AbstractMap$SimpleEntry
+java.util.AbstractMap$SimpleImmutableEntry
+java.util.ArrayDeque
+java.util.ArrayList
+java.util.Arrays$ArrayList
+java.util.BitSet
+java.util.Collections$AsLIFOQueue
+java.util.Collections$CheckedCollection
+java.util.Collections$CheckedList
+java.util.Collections$CheckedMap
+java.util.Collections$CheckedRandomAccessList
+java.util.Collections$CheckedSet
+java.util.Collections$CheckedSortedMap
+java.util.Collections$CheckedSortedSet
+java.util.Collections$CopiesList
+java.util.Collections$EmptyList
+java.util.Collections$EmptyMap
+java.util.Collections$EmptySet
+java.util.Collections$ReverseComparator
+java.util.Collections$ReverseComparator2
+java.util.Collections$SetFromMap
+java.util.Collections$SingletonList
+java.util.Collections$SingletonMap
+java.util.Collections$SingletonSet
+java.util.Collections$SynchronizedCollection
+java.util.Collections$SynchronizedList
+java.util.Collections$SynchronizedMap
+java.util.Collections$SynchronizedRandomAccessList
+java.util.Collections$SynchronizedSet
+java.util.Collections$SynchronizedSortedMap
+java.util.Collections$SynchronizedSortedSet
+java.util.Collections$UnmodifiableCollection
+java.util.Collections$UnmodifiableList
+java.util.Collections$UnmodifiableMap
+java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet
+java.util.Collections$UnmodifiableRandomAccessList
+java.util.Collections$UnmodifiableSet
+java.util.Collections$UnmodifiableSortedMap
+java.util.Collections$UnmodifiableSortedSet
+java.util.ConcurrentModificationException
+java.util.Currency
+java.util.Date
+java.util.DuplicateFormatFlagsException
+java.util.EmptyStackException
+java.util.EnumMap
+java.util.EnumSet$SerializationProxy
+java.util.EventObject
+java.util.FormatFlagsConversionMismatchException
+java.util.Formatter$BigDecimalLayoutForm
+java.util.FormatterClosedException
+java.util.GregorianCalendar
+java.util.HashMap
+java.util.HashSet
+java.util.Hashtable
+java.util.IdentityHashMap
+java.util.IllegalFormatCodePointException
+java.util.IllegalFormatConversionException
+java.util.IllegalFormatException
+java.util.IllegalFormatFlagsException
+java.util.IllegalFormatPrecisionException
+java.util.IllegalFormatWidthException
+java.util.IllformedLocaleException
+java.util.InputMismatchException
+java.util.InvalidPropertiesFormatException
+java.util.JapaneseImperialCalendar
+java.util.JumboEnumSet
+java.util.LinkedHashMap
+java.util.LinkedHashSet
+java.util.LinkedList
+java.util.Locale
+java.util.Locale$Category
+java.util.MissingFormatArgumentException
+java.util.MissingFormatWidthException
+java.util.MissingResourceException
+java.util.NoSuchElementException
+java.util.PriorityQueue
+java.util.Properties
+java.util.PropertyPermission
+java.util.PropertyPermissionCollection
+java.util.Random
+java.util.RegularEnumSet
+java.util.ServiceConfigurationError
+java.util.SimpleTimeZone
+java.util.Stack
+java.util.TooManyListenersException
+java.util.TreeMap
+java.util.TreeMap$AscendingSubMap
+java.util.TreeMap$DescendingSubMap
+java.util.TreeMap$SubMap
+java.util.TreeSet
+java.util.UUID
+java.util.UnknownFormatConversionException
+java.util.UnknownFormatFlagsException
+java.util.Vector
+java.util.concurrent.ArrayBlockingQueue
+java.util.concurrent.BrokenBarrierException
+java.util.concurrent.CancellationException
+java.util.concurrent.ConcurrentHashMap
+java.util.concurrent.ConcurrentHashMap$Segment
+java.util.concurrent.ConcurrentHashMap$WriteThroughEntry
+java.util.concurrent.ConcurrentLinkedDeque
+java.util.concurrent.ConcurrentLinkedQueue
+java.util.concurrent.ConcurrentSkipListMap
+java.util.concurrent.ConcurrentSkipListMap$SubMap
+java.util.concurrent.ConcurrentSkipListSet
+java.util.concurrent.CopyOnWriteArrayList
+java.util.concurrent.CopyOnWriteArraySet
+java.util.concurrent.CountDownLatch$Sync
+java.util.concurrent.Exchanger$Node
+java.util.concurrent.Exchanger$Slot
+java.util.concurrent.ExecutionException
+java.util.concurrent.ForkJoinPool$InvokeAll
+java.util.concurrent.ForkJoinTask$AdaptedCallable
+java.util.concurrent.ForkJoinTask$AdaptedRunnable
+java.util.concurrent.LinkedBlockingDeque
+java.util.concurrent.LinkedBlockingQueue
+java.util.concurrent.LinkedTransferQueue
+java.util.concurrent.PriorityBlockingQueue
+java.util.concurrent.RejectedExecutionException
+java.util.concurrent.Semaphore
+java.util.concurrent.Semaphore$FairSync
+java.util.concurrent.Semaphore$NonfairSync
+java.util.concurrent.SynchronousQueue
+java.util.concurrent.SynchronousQueue$FifoWaitQueue
+java.util.concurrent.SynchronousQueue$LifoWaitQueue
+java.util.concurrent.SynchronousQueue$WaitQueue
+java.util.concurrent.ThreadLocalRandom
+java.util.concurrent.ThreadPoolExecutor$Worker
+java.util.concurrent.TimeUnit$1
+java.util.concurrent.TimeUnit$2
+java.util.concurrent.TimeUnit$3
+java.util.concurrent.TimeUnit$4
+java.util.concurrent.TimeUnit$5
+java.util.concurrent.TimeUnit$6
+java.util.concurrent.TimeUnit$7
+java.util.concurrent.TimeoutException
+java.util.concurrent.atomic.AtomicBoolean
+java.util.concurrent.atomic.AtomicInteger
+java.util.concurrent.atomic.AtomicIntegerArray
+java.util.concurrent.atomic.AtomicLong
+java.util.concurrent.atomic.AtomicLongArray
+java.util.concurrent.atomic.AtomicReference
+java.util.concurrent.atomic.AtomicReferenceArray
+java.util.concurrent.locks.AbstractQueuedLongSynchronizer$ConditionObject
+java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
+java.util.concurrent.locks.ReentrantLock
+java.util.concurrent.locks.ReentrantLock$FairSync
+java.util.concurrent.locks.ReentrantLock$NonfairSync
+java.util.concurrent.locks.ReentrantReadWriteLock
+java.util.concurrent.locks.ReentrantReadWriteLock$FairSync
+java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync
+java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock
+java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock
+java.util.jar.JarException
+java.util.jar.JarVerifier$VerifierCodeSource
+java.util.logging.Level
+java.util.logging.LogRecord
+java.util.logging.LoggingPermission
+java.util.prefs.AbstractPreferences$NodeAddedEvent
+java.util.prefs.AbstractPreferences$NodeRemovedEvent
+java.util.prefs.BackingStoreException
+java.util.prefs.InvalidPreferencesFormatException
+java.util.prefs.NodeChangeEvent
+java.util.prefs.PreferenceChangeEvent
+java.util.regex.Pattern
+java.util.regex.PatternSyntaxException
+java.util.regex.UnicodeProp$1
+java.util.regex.UnicodeProp$10
+java.util.regex.UnicodeProp$11
+java.util.regex.UnicodeProp$12
+java.util.regex.UnicodeProp$13
+java.util.regex.UnicodeProp$14
+java.util.regex.UnicodeProp$15
+java.util.regex.UnicodeProp$16
+java.util.regex.UnicodeProp$17
+java.util.regex.UnicodeProp$18
+java.util.regex.UnicodeProp$2
+java.util.regex.UnicodeProp$3
+java.util.regex.UnicodeProp$4
+java.util.regex.UnicodeProp$5
+java.util.regex.UnicodeProp$6
+java.util.regex.UnicodeProp$7
+java.util.regex.UnicodeProp$8
+java.util.regex.UnicodeProp$9
+java.util.zip.DataFormatException
+java.util.zip.ZipError
+java.util.zip.ZipException


Mime
View raw message