Created
July 3, 2015 13:09
-
-
Save jqno/1739d120887c785f3832 to your computer and use it in GitHub Desktop.
CGLib IntelliJ NonNull issue
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.sf.cglib.proxy.Enhancer; | |
import net.sf.cglib.proxy.NoOp; | |
import org.jetbrains.annotations.NotNull; | |
import org.junit.Test; | |
public class MyObjectTest { | |
@Test | |
public void shouldVerifyHashCodeEquals() { | |
Enhancer e = new Enhancer(); | |
e.setSuperclass(MyObject.class); | |
e.setCallbackType(NoOp.class); | |
e.createClass(); | |
} | |
public static class MyObject { | |
@Override | |
@NotNull | |
public MyObject clone() { | |
return null; | |
} | |
} | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example</groupId> | |
<artifactId>cglib-intellij-problem</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<java.version>1.8</java.version> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.torstling.intellij</groupId> | |
<artifactId>notnull-instrumenter-maven-plugin</artifactId> | |
<version>0.1.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>instrument</goal> | |
<goal>tests-instrument</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
<dependencies> | |
<dependency> | |
<groupId>com.intellij</groupId> | |
<artifactId>annotations</artifactId> | |
<version>12.0</version> | |
</dependency> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.12</version> | |
</dependency> | |
<dependency> | |
<groupId>cglib</groupId> | |
<artifactId>cglib</artifactId> | |
<version>3.1</version> | |
</dependency> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment