This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.asynchttpclient.Dsl.asyncHttpClient; | |
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; | |
import static com.github.tomakehurst.wiremock.client.WireMock.get; | |
import static com.github.tomakehurst.wiremock.client.WireMock.post; | |
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching; | |
import java.time.Duration; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicLong; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sun.instrument; | |
import net.bytebuddy.agent.ByteBuddyAgent; | |
import net.bytebuddy.agent.builder.AgentBuilder; | |
import net.bytebuddy.asm.Advice; | |
import net.bytebuddy.description.type.TypeDescription; | |
import net.bytebuddy.dynamic.DynamicType; | |
import net.bytebuddy.implementation.StubMethod; | |
import net.bytebuddy.implementation.bytecode.assign.Assigner; | |
import net.bytebuddy.utility.JavaModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GenericNestedType { | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target(ElementType.TYPE_USE) | |
@interface SampleTypeAnnotation { } | |
static class GenericNested<T> { | |
class Inner { } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.objectweb.asm.ClassReader; | |
import org.objectweb.asm.util.TraceClassVisitor; | |
import java.io.PrintWriter; | |
import java.lang.instrument.ClassFileTransformer; | |
import java.lang.instrument.Instrumentation; | |
import java.security.ProtectionDomain; | |
public class BugReportDeprecatedModifier { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import bar.Bar; | |
import qux.Qux; | |
import java.lang.invoke.MethodHandles; | |
import java.lang.invoke.MethodType; | |
import java.lang.reflect.Proxy; | |
import java.util.function.Consumer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.openjdk.jmh.annotations.Benchmark; | |
public class StackWalkerExtraction { | |
private static Object call(int depth, Callable<?> result) throws Exception { | |
if (depth == 0) { | |
return result.call(); | |
} else { | |
return call(depth - 1, result); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.bytebuddy.description.method.MethodDescription; | |
import net.bytebuddy.description.type.TypeDescription; | |
import net.bytebuddy.dynamic.DynamicType; | |
import net.bytebuddy.dynamic.scaffold.InstrumentedType; | |
import net.bytebuddy.implementation.Implementation; | |
import net.bytebuddy.implementation.bytecode.ByteCodeAppender; | |
import net.bytebuddy.pool.TypePool; | |
import org.objectweb.asm.*; | |
import org.objectweb.asm.commons.ClassRemapper; | |
import org.objectweb.asm.commons.SimpleRemapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy; | |
import net.bytebuddy.implementation.FixedValue; | |
import java.lang.reflect.Method; | |
import static net.bytebuddy.matcher.ElementMatchers.named; | |
public class PackageConfusion { | |
public static void main(String[] args) throws Exception { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import com.fasterxml.jackson.core.JsonGenerator; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; | |
import com.fasterxml.jackson.dataformat.xml.XmlMapper; | |
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; | |
import foo.SampleBean; | |
import foo.SampleBeans; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.nio.file.*; | |
import java.util.Comparator; | |
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.function.Consumer; | |
import java.util.function.Predicate; | |
public class FileMonitor implements Runnable { |