Skip to content

Commit

Permalink
Revert "assertj#194: Make the Generated annotation configurable. You …
Browse files Browse the repository at this point in the history
…can now choose between javax.annotation.Generated and jakarta.annotation.Generated. Or if you really do not want any no annotation (not recommended)."

This reverts commit 3d0a7eb.
  • Loading branch information
Zegveld committed Jan 20, 2022
1 parent 3d0a7eb commit e592a13
Show file tree
Hide file tree
Showing 16 changed files with 787 additions and 871 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@
<version>4.11</version><!--$NO-MVN-MAN-VER$ -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
Expand Down
1,607 changes: 774 additions & 833 deletions src/main/java/org/assertj/assertions/generator/BaseAssertionGenerator.java

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package ${package};
* }
* </pre>
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class AutoCloseableSoftAssertions extends org.assertj.core.api.SoftAssertions implements AutoCloseable {
${all_assertions_entry_points}
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ${package};
/**
* Entry point for BDD assertions of different data types.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class BddAssertions {
${all_assertions_entry_points}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ${package};
/**
* Entry point for BDD soft assertions of different data types.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class BDDSoftAssertions extends org.assertj.core.api.BDDSoftAssertions {
${all_assertions_entry_points}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ${imports}
/**
* Abstract base class for {@link ${class_to_assert}} specific assertions - Generated by CustomAssertionGenerator.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class ${custom_assertion_class}<S extends ${custom_assertion_class}<S, A>, A extends ${class_to_assert}> extends ${super_assertion_class}<S, A> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ${imports}
/**
* {@link ${class_to_assert}} specific assertions - Generated by CustomAssertionGenerator.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class ${custom_assertion_class} extends AbstractObjectAssert<${custom_assertion_class}, ${class_to_assert}> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ${imports}
* Although this class is not final to allow Soft assertions proxy, if you wish to extend it,
* extend {@link Abstract${custom_assertion_class}} instead.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class ${custom_assertion_class} extends Abstract${custom_assertion_class}<${custom_assertion_class}, ${class_to_assert}> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package ${package};
* }
* }</code></pre>
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class JUnitBDDSoftAssertions extends org.assertj.core.api.JUnitBDDSoftAssertions {
${all_assertions_entry_points}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package ${package};
* }
* }</code></pre>
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class JUnitSoftAssertions extends org.assertj.core.api.JUnitSoftAssertions {
${all_assertions_entry_points}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ${package};
/**
* Entry point for soft assertions of different data types.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class SoftAssertions extends org.assertj.core.api.SoftAssertions {
${all_assertions_entry_points}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package ${package};
* Entry point for assertions of different data types. Each method in this class is a static factory for the
* type-specific assertion objects.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class Assertions {
${all_assertions_entry_points}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void should_generate_correctly_standard_assertions_entry_point_class_for_
STANDARD, "org");
// THEN
String expectedContent = readExpectedContentFromFile("AssertionsForClassesWithSameName.expected.txt");
assertThat(assertionsEntryPointContent).isEqualToIgnoringNewLines(expectedContent);
assertThat(assertionsEntryPointContent).isEqualTo(expectedContent);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private static String getClasspathFromClassloader(ClassLoader currentClassloader
while (true) {
// We only know how to extract classpaths from URLClassloaders.
if (currentClassloader instanceof URLClassLoader) classloaders.add((URLClassLoader) currentClassloader);
// else throw new IllegalArgumentException("Classpath for compilation could not be extracted as classloader is not a URLClassloader");
else throw new IllegalArgumentException("Classpath for compilation could not be extracted as classloader is not a URLClassloader");

if (currentClassloader == systemClassLoader) break;
else currentClassloader = currentClassloader.getParent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package ${package};
* Entry point for assertions of different data types. Each method in this class is a static factory for the
* type-specific assertion objects.
*/
${generatedAnnotation}
@javax.annotation.Generated(value="assertj-assertions-generator")
public class MyAssertions {
${all_assertions_entry_points}
/**
Expand Down

0 comments on commit e592a13

Please sign in to comment.