FULL PRODUCT VERSION :
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
This issue was previously raised as JDK-8073620. That bug was closed as "Cannot Reproduce" under 8u25, 8u31, 8u40, yet the problem persists for me under 8u45. The description which follows, and the source code, remain the same as for JDK-8073620.
This is a simple Java 8 application which does the following:
- Declare a "Widget" class.
- Declare a "WidgetCollection" class that implements Iterable to contain Widgets.
- WidgetCollection overrides iterator() to support forEach().
- Populate the WidgetCollection with three Widget instances.
- Iterate through the collection, printing the names of the instances to the console.
If the iterator in WidgetCollection is instantiated using an anonymous class there is no problem. However, if the iterator is instantiated using a lambda expression which declares a local variable then a ClassFormatError occurs in the following scenario:
[1] The local variable is named after one of the locally overriden methods (i.e. "next" or "hasNext").
[2] The local variable is of type Widget.
[3] The lambda expression is actually used at runtime.
The ClassFormatError only occurs when all three of those conditions are met.
ADDITIONAL REGRESSION INFORMATION:
The problem has existed under Java 8 using 8u25, 8u31, 8u40 and 8u45.
Java releases prior to 8 are not relevant since the issue relates to a lambda expression.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
[1] Create a trivial Java application in file CreateBadClassFile.java, using the source code pasted below in the "Source code for an executable test case" section below.
[2] From the command line move to the directory containing the package 'badclassfile', and compile the code:
javac CreateBadClassFile.java
The code should compile with any errors.
[3] From the command line run "java -version" to verify that the compiler used is "javac 1.8.0_45"
[4] Run the application from the command line, from the directory containing the package 'createbadclassfile' as follows:
java -verbose createbadclassfile.CreateBadClassFile
[5] Verify from the verbose output that code from jre1.8.0_45 is being loaded.
[6] You will get an exception:
ClassFormatError: Duplicate field name&signature in class file createbadclassfile/WidgetCollection$1
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The expected output was a single line from System.out.println() as follows:
.foreach() call: W1 W2 W3
ACTUAL -
The actual result was a stack trace for error "java.lang.ClassFormatError: Duplicate field name&signature in class file createbadclassfile/WidgetCollection$1".
That is pasted in the "Error Message(s)/ Crash Logs" section below.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
The output from running "java -verbose createbadclassfile.CreateBadClassFile" is pasted below. Note the "ClassFormatError: Duplicate field name&signature" stack trace at the bottom of the output:
c:\CreateBadClassFile\src>java -verbose createbadclassfile.CreateBadClassFile
[Opened C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Object from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.Serializable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Comparable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.CharSequence from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.String from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.AnnotatedElement from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.GenericDeclaration from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Type from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Class from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Cloneable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.System from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Throwable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Error from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ThreadDeath from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Exception from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.RuntimeException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.SecurityManager from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.ProtectionDomain from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.AccessControlContext from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.SecureClassLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ReflectiveOperationException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassNotFoundException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.LinkageError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.NoClassDefFoundError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassCastException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ArrayStoreException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.VirtualMachineError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.OutOfMemoryError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.StackOverflowError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.IllegalMonitorStateException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.Reference from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.SoftReference from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.WeakReference from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.FinalReference from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.PhantomReference from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Cleaner from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.Finalizer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Runnable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Thread from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Thread$UncaughtExceptionHandler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ThreadGroup from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Map from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Dictionary from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Hashtable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Properties from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.AccessibleObject from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Member from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Field from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Parameter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Executable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Method from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Constructor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.MagicAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.MethodAccessor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.MethodAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.ConstructorAccessor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.ConstructorAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.DelegatingClassLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.ConstantPool from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.FieldAccessor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.FieldAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.UnsafeFieldAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.UnsafeStaticFieldAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.annotation.Annotation from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.CallerSensitive from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandle from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.DirectMethodHandle from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MemberName from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleNatives from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodType from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.BootstrapMethodError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.CallSite from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.ConstantCallSite from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MutableCallSite from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.VolatileCallSite from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Appendable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.AbstractStringBuilder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.StringBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.StringBuilder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Unsafe from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.AutoCloseable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.Closeable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.InputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.ByteArrayInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.File from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.URLClassLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.URL from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.jar.Manifest from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Launcher from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Launcher$AppClassLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Launcher$ExtClassLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.CodeSource from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.StackTraceElement from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.Buffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Boolean from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Character from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Number from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Float from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Double from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Byte from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Short from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Integer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Long from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.NullPointerException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ArithmeticException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.ObjectStreamField from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Comparator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.String$CaseInsensitiveComparator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.Guard from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.Permission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.BasicPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.RuntimePermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.AccessController from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.ReflectPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.PrivilegedAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.ReflectionFactory$GetReflectionFactoryAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.cert.Certificate from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Iterable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.List from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.RandomAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.AbstractCollection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.AbstractList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Vector from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Stack from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.ReflectionFactory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.Reference$Lock from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.Reference$ReferenceHandler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.ReferenceQueue from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.ReferenceQueue$Null from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.ReferenceQueue$Lock from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ref.Finalizer$FinalizerThread from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Map$Entry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.VM from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Hashtable$Entry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Math from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Set from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.AbstractSet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Hashtable$EntrySet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$EmptySet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$EmptyList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.AbstractMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$EmptyMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$SynchronizedCollection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$SynchronizedSet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Objects from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Enumeration from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Iterator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Hashtable$Enumerator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Runtime from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Version from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FileInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FileDescriptor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaIOFileDescriptorAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FileDescriptor$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.SharedSecrets from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.IncompatibleClassChangeError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.NoSuchMethodError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.ArrayList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$UnmodifiableCollection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$UnmodifiableList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$UnmodifiableRandomAccessList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.Reflection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap$Node from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.Flushable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.OutputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FileOutputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FilterInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.BufferedInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.PrivilegedExceptionAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Class$3 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Class$ReflectionData from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Class$Atomic from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.generics.repository.AbstractRepository from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.generics.repository.GenericDeclRepository from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.generics.repository.ClassRepository from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Class$AnnotationData from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.annotation.AnnotationType from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.WeakHashMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassValue$ClassValueMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Modifier from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.LangReflectAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.ReflectAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.misc.ReflectUtil from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FilterOutputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.PrintStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.BufferedOutputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.Charset from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.spi.CharsetProvider from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.FastCharsetProvider from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.StandardCharsets from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.PreHashedMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.StandardCharsets$Aliases from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.StandardCharsets$Classes from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.StandardCharsets$Cache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ThreadLocal from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.atomic.AtomicInteger from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Arrays from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.HistoricallyNamedCharset from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.IBM437 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.SingleByte from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Class$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.ReflectionFactory$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.NativeConstructorAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.DelegatingConstructorAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.Writer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.OutputStreamWriter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.StreamEncoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.ArrayEncoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.CharsetEncoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.SingleByte$Encoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.CodingErrorAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.ByteBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.HeapByteBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.Bits from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.ByteOrder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaNioAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.Bits$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.BufferedWriter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.security.action.GetPropertyAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.DefaultFileSystem from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FileSystem from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.WinNTFileSystem from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.ExpiringCache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.LinkedHashMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.ExpiringCache$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Enum from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.File$PathStatus from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.file.Watchable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.file.Path from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassLoader$NativeLibrary from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassLoader$3 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.ExpiringCache$Entry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.LinkedHashMap$Entry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Terminator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.SignalHandler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Terminator$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Signal from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.NativeSignalHandler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Integer$IntegerCache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.OSEnvironment from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.io.Win32ErrorMode from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaLangAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.System$2 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.IllegalArgumentException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Compiler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Compiler$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.URLStreamHandlerFactory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Launcher$Factory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.security.util.Debug from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassLoader$ParallelLoaders from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.WeakHashMap$Entry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$SetFromMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.WeakHashMap$KeySet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaNetAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.URLClassLoader$7 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.StringTokenizer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Launcher$ExtClassLoader$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.MetaIndex from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Readable from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.Reader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.BufferedReader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.InputStreamReader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FileReader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.StreamDecoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.MS1252 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.ArrayDecoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.CharsetDecoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.SingleByte$Decoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.CharBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.HeapCharBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.CoderResult from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.CoderResult$Cache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.CoderResult$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.CoderResult$2 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.reflect.Array from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Locale from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.locale.LocaleObjectCache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Locale$Cache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.locks.Lock from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.locks.ReentrantLock from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$Segment from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$Node from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$CounterCell from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$CollectionView from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$KeySetView from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$ValuesView from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$EntrySetView from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.locale.BaseLocale from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.locale.BaseLocale$Cache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.locale.BaseLocale$Key from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.locale.LocaleObjectCache$CacheEntry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Locale$LocaleKey from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.locale.LocaleUtils from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.CharacterData from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.CharacterDataLatin1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap$TreeNode from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FileInputStream$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.net.www.ParseUtil from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.BitSet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.Parts from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.URLStreamHandler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.net.www.protocol.file.Handler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaSecurityAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.ProtectionDomain$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaSecurityProtectionDomainAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.ProtectionDomain$3 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.ProtectionDomain$Key from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.Principal from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashSet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.URLClassPath from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.net.www.protocol.jar.Handler from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Launcher$AppClassLoader$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.SystemClassLoaderAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.function.Function from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$2 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$3 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassValue from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$4 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassValue$Entry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassValue$Identity from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ClassValue$Version from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MemberName$Factory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleStatics from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleStatics$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.PostVMInitHook from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.launcher.LauncherHelper from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.StringCoding from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ThreadLocal$ThreadLocalMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.ThreadLocal$ThreadLocalMap$Entry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.StringCoding$StringDecoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.URLClassLoader$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.net.util.URLUtil from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.URLClassPath$3 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.URLClassPath$Loader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.URLClassPath$JarLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipConstants from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipFile from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaUtilZipFileAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipFile$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.URLClassPath$JarLoader$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.FileURLMapper from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.jar.JarFile from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JavaUtilJarAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.jar.JavaUtilJarAccessImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.charset.StandardCharsets from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.US_ASCII from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.ISO_8859_1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.Unicode from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.UTF_8 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.UTF_16BE from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.UTF_16LE from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.UTF_16 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Queue from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Deque from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.ArrayDeque from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipCoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.PerfCounter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Perf$GetPerfAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Perf from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.PerfCounter$CoreCounters from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.ch.DirectBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.MappedByteBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.DirectByteBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.LongBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.nio.DirectLongBufferU from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.JarIndex from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.UTF_8$Encoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipEntry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipUtils from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Date from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.CalendarSystem from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.AbstractCalendar from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.BaseCalendar from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.Gregorian from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.TimeZone from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.ZoneInfo from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.ZoneInfoFile from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.ZoneInfoFile$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.DataInput from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.DataInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.ZoneInfoFile$ZoneOffsetTransitionRule from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.Checksum from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.CRC32 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.ZoneInfoFile$Checksum from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.TimeZone$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.CalendarDate from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.BaseCalendar$Date from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.Gregorian$Date from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.util.calendar.CalendarUtils from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.jar.JarEntry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.jar.JarFile$JarFileEntry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipFile$ZipFileInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.Inflater from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZStreamRef from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.InflaterInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.zip.ZipFile$ZipFileInflaterInputStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.cs.UTF_8$Decoder from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.AbstractSequentialList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.LinkedList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.LinkedList$Node from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.ExtensionDependency from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.IOUtils from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.URLClassPath$FileLoader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.Resource from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.misc.URLClassPath$FileLoader$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Package from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.nio.ByteBuffered from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.PermissionCollection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.Permissions from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.URLConnection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.net.www.URLConnection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.net.www.protocol.file.FileURLConnection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.net.www.MessageHeader from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FilePermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FilePermission$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.FilePermissionCollection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.AllPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.UnresolvedPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.BasicPermissionCollection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded createbadclassfile.CreateBadClassFile from file:/C:/CreateBadClassFile/src/]
[Loaded sun.launcher.LauncherHelper$FXHelper from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Class$MethodArray from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Void from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded createbadclassfile.WidgetCollection from file:/C:/CreateBadClassFile/src/]
[Loaded java.lang.invoke.LambdaMetafactory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandles$Lookup from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodType$ConcurrentWeakInternSet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodTypeForm from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.Invokers from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandles from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.invoke.util.Wrapper from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.invoke.util.Wrapper$Format from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Byte$ByteCache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Short$ShortCache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Character$CharacterCache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Long$LongCache from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.invoke.util.VerifyAccess from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.invoke.util.ValueConversions from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.NoSuchMethodException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$BasicType from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$Name from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$NamedFunction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$ForwardingNode from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.BoundMethodHandle from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.SimpleMethodHandle from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.BoundMethodHandle$SpeciesData from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.BoundMethodHandle$Factory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.BoundMethodHandle$Species_L from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.UnsafeFieldAccessorFactory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.UnsafeQualifiedStaticFieldAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap$EntrySet from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap$HashIterator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap$EntryIterator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap$Values from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.HashMap$ValueIterator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.invoke.util.BytecodeDescriptor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.DirectMethodHandle$Lazy from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.InstantiationException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Arrays$ArrayList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.Collections$UnmodifiableCollection$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.AbstractList$Itr from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.InvokerBytecodeGenerator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.ClassVisitor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.ClassWriter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.ByteVector from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.Item from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.MethodVisitor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.MethodWriter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.Type from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.Label from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.Frame from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.AnnotationVisitor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.AnnotationWriter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$Intrinsic from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.InvokerBytecodeGenerator$2 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.invoke.util.VerifyType from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.invoke.empty.Empty from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$DMH/1735600054 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/21685669 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/2133927002 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1836019240 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/325040804 from java.lang.invoke.LambdaForm]
[Loaded java.lang.NoSuchFieldException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.InvokerBytecodeGenerator$CpPatch from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$MH/1173230247 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.DirectMethodHandle$Accessor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$MH/856419764 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/621009875 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1265094477 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/2125039532 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/312714112 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/692404036 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1554874502 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1846274136 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1639705018 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1627674070 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1360875712 from java.lang.invoke.LambdaForm]
[Loaded java.util.ArrayList$Itr from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.SubList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.RandomAccessSubList from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.ListIterator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.SubList$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.AbstractList$ListItr from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$DMH/225534817 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1259475182 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.DirectMethodHandle$Special from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$DMH/1020371697 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.DelegatingMethodHandle from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$AsVarargsCollector from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.WrongMethodTypeException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$DMH/1229416514 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/2016447921 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/666988784 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$BMH/1414644648 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.MethodHandleImpl$Lazy from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$DMH/640070680 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.MethodHandleImpl$IntrinsicMethodHandle from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$MH/1510467688 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1995265320 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/746292446 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1072591677 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1523554304 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1175962212 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/918221580 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/2055281021 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1554547125 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/617901222 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1159190947 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/925858445 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/798154996 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/681842940 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1392838282 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/523429237 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/664740647 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/804564176 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1421795058 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1555009629 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/41359092 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/149928006 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/713338599 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/168423058 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/821270929 from java.lang.invoke.LambdaForm]
[Loaded java.lang.NoSuchFieldError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.IllegalAccessException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$DMH/1247233941 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/258952499 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1067040082 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$BMH/140435067 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaFormEditor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaFormEditor$Transform$Kind from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaFormEditor$Transform from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaFormBuffer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$MH/1450495309 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$BMH/1670782018 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$BMH/1706377736 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/468121027 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$DMH/1804094807 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/951007336 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$BMH/2001049719 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1528902577 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$BMH/1927950199 from java.lang.invoke.LambdaForm]
[Loaded jdk.internal.org.objectweb.asm.FieldVisitor from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded jdk.internal.org.objectweb.asm.FieldWriter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.BoundMethodHandle$Species_LL from __JVM_DefineClass__]
[Loaded java.lang.invoke.LambdaForm$BMH/1746572565 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$BMH/989110044 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.BoundMethodHandle$Species_L3 from __JVM_DefineClass__]
[Loaded java.lang.invoke.LambdaForm$BMH/321001045 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.BoundMethodHandle$Species_L4 from __JVM_DefineClass__]
[Loaded java.lang.invoke.LambdaForm$BMH/834600351 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.AbstractValidatingLambdaMetafactory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.InnerClassLambdaMetafactory from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.PropertyPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.AccessController$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.security.util.SecurityConstants from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.NetPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.SecurityPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.net.SocketPermission from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded sun.security.action.GetBooleanAction from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.AllPermissionCollection from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.MethodHandleInfo from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.InfoFromMemberName from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.TypeConvertingMethodAdapter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.InnerClassLambdaMetafactory$ForwardingMethodGenerator from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded createbadclassfile.WidgetCollection$$Lambda$1/531885035 from createbadclassfile.WidgetCollection]
[Loaded java.lang.invoke.LambdaForm$MH/1418481495 from java.lang.invoke.LambdaForm]
[Loaded createbadclassfile.WidgetCollection$2 from file:/C:/CreateBadClassFile/src/]
[Loaded createbadclassfile.Widget from file:/C:/CreateBadClassFile/src/]
.foreach() call: [Loaded java.util.function.Consumer from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded createbadclassfile.CreateBadClassFile$$Lambda$2/142257191 from createbadclassfile.CreateBadClassFile]
[Loaded java.lang.invoke.InnerClassLambdaMetafactory$1 from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.invoke.LambdaForm$MH/1044036744 from java.lang.invoke.LambdaForm]
[Loaded java.lang.invoke.LambdaForm$MH/1826771953 from java.lang.invoke.LambdaForm]
[Loaded java.lang.ClassFormatError from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.io.IOException from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.security.PrivilegedActionException from C:\Java\jre1.8.0_45\lib\rt.jar]
Exception in thread "main" [Loaded java.lang.Throwable$PrintStreamOrWriter from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Throwable$WrappedPrintStream from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.IdentityHashMap from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.util.IdentityHashMap$KeySet from C:\Java\jre1.8.0_45\lib\rt.jar]
java.lang.ClassFormatError: Duplicate field name&signature in class file createbadclassfile/WidgetCollection$1
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at createbadclassfile.WidgetCollection.lambda$new$0(CreateBadClassFile.java:15)
at createbadclassfile.WidgetCollection$$Lambda$1/531885035.iterator(Unknown Source)
at createbadclassfile.WidgetCollection.iterator(CreateBadClassFile.java:41)
at java.lang.Iterable.forEach(Unknown Source)
at createbadclassfile.CreateBadClassFile.main(CreateBadClassFile.java:52)
[Loaded java.lang.Shutdown from C:\Java\jre1.8.0_45\lib\rt.jar]
[Loaded java.lang.Shutdown$Lock from C:\Java\jre1.8.0_45\lib\rt.jar]
c:\CreateBadClassFile\src>
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package createbadclassfile;
import java.util.Iterator;
import java.util.LinkedList;
class Widget {
private String name;
Widget(String s) { name = s; }
@Override public String toString() { return name; }
}
class WidgetCollection<Widget> implements Iterable<Widget> {
private LinkedList<Widget> data;
// Instantiate an Iterable instance using a Lambda expression.
// Causes ClassFormatError if a local variable of type Widget is named after one of the methods.
private final Iterable<Widget> myIterator1 = () -> new Iterator<Widget>() {
private Widget hasNext = null; // Rename to "hasNext" or "next" to cause ClassFormatError
private int index = 0;
@Override public boolean hasNext() { return index < data.size(); }
@Override public Widget next() { return data.get(index++); }
};
// Instantiate an Iterable instance using an anonymous class.
// Always works fine regardless of the name of the local variable.
private final Iterable<Widget> myIterator2 =
new Iterable<Widget>() {
@Override
public Iterator<Widget> iterator() {
return new Iterator<Widget>() {
private Widget hasNext = null;
private int index = 0;
@Override public boolean hasNext() { return index < data.size(); }
@Override public Widget next() { return data.get(index++); }
};
}
};
public WidgetCollection() { data = new LinkedList<>(); }
public void add(Widget e) { data.add(e); }
@Override public String toString() { return data.toString(); }
// Change the next line to use "myIterator2" to use an anonymous class instead
// of a lambda expression when instantiating the Iterable instance.
@Override public Iterator<Widget> iterator() { return myIterator1.iterator(); }
}
public class CreateBadClassFile {
public static void main(String[] args) {
WidgetCollection<Widget> widgets = new WidgetCollection<>();
widgets.add(new Widget("W1"));
widgets.add(new Widget("W2"));
widgets.add(new Widget("W3"));
System.out.print(".foreach() call: ");
widgets.forEach(w -> System.out.print(w + " "));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
A simple change to one line in the source allows that output to be displayed correctly:
[1] First, note that line 16 of the source contains the declaration
private Widget hasNext = null;
That line is the cause of the ClassFormatError.
[2] The ClassFormatError occurs because the variable name "hasNext" is also the name of a method being overriden within the class.
[3] Change the name of the variable from "hasNext" to "harmless", recompile, and rerun. The application should now run without a ClassFormatError.
[4] Now change the name of the variable from "harmless" to "next" (another overriden method), recompile and rerun. The ClassFormatError returns.
[5] Also, note the size of the class file WidgetCollection$1.class. On my machine, when the ClassFormatError occurs that file is 997 bytes, yet when the code runs OK it is 1075 bytes. Changing the name of the variable is clearly having a non-trivial effect on the bytecode that gets generated.
Please email me if you cannot reproduce the problem because that implies that my instructions for reproducing the problem are inadequate. I am certain that there is an issue here that needs to be fixed.