Repository: assertj/assertj

Problem statement:
Java 11 EA Build: Compile Errors: ambiguous reference both <T>assertThat(T) and method assertThat(java.lang.CharSequence) match
Just for your information.

When running `mvn clean test` using:

```
java version "11-ea" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11-ea+10)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11-ea+10, mixed mode)
```

I get these compile errors:

```
[ERROR] /C:/Users/Redhawk/dev/assertj-core/src/test/java/org/assertj/core/api/AutoCloseableBDDSoftAssertionsTest.java:[62,13] reference to then is ambiguous
  both method <T>then(T) in org.assertj.core.api.Java6AbstractBDDSoftAssertions and method then(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractBDDSoftAssertions match
[ERROR] /C:/Users/Redhawk/dev/assertj-core/src/test/java/org/assertj/core/api/SoftAssertionsTest.java:[219,13] reference to assertThat is ambiguous
  both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] /C:/Users/Redhawk/dev/assertj-core/src/test/java/org/assertj/core/api/BDDSoftAssertionsTest.java:[216,13] reference to then is ambiguous
  both method <T>then(T) in org.assertj.core.api.Java6AbstractBDDSoftAssertions and method then(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractBDDSoftAssertions match
[ERROR] /C:/Users/Redhawk/dev/assertj-core/src/test/java/org/assertj/core/perf/SoftAssertionsPerfTest.java:[192,13] reference to assertThat is ambiguous
  both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] /C:/Users/Redhawk/dev/assertj-core/src/test/java/org/assertj/core/api/AutoCloseableSoftAssertionsTest.java:[71,13] reference to assertThat is ambiguous
  both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] /C:/Users/Redhawk/dev/assertj-core/src/test/java/org/assertj/core/api/Assertions_assertThat_with_CharSequence_Test.java:[35,61] reference to assertThat is ambiguous
  both method assertThat(java.lang.CharSequence) in org.assertj.core.api.Assertions and method <T>assertThat(T) in org.assertj.core.api.Assertions match
[ERROR] /C:/Users/Redhawk/dev/assertj-core/src/test/java/org/assertj/core/api/Assertions_assertThat_with_CharSequence_Test.java:[41,61] reference to assertThat is ambiguous
  both method assertThat(java.lang.CharSequence) in org.assertj.core.api.Assertions and method <T>assertThat(T) in org.assertj.core.api.Assertions match
```



Hints:
Any idea what the underlying cause is ? 
For info, same error in my environment.

**Java version**
``` 
~/prog/assertj/assertj-core-3.x ∙ java -version
openjdk version "11-ea" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11-ea+13)
OpenJDK 64-Bit Server VM 18.9 (build 11-ea+13, mixed mode)
``` 

**Maven version**
```
~/prog/assertj/assertj-core-3.x ∙ mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-25T08:49:05+13:00)
Maven home: /home/joel/prog/apache-maven-3.5.3
Java version: 11-ea, vendor: Oracle Corporation
Java home: /home/joel/prog/java/jdk-11
Default locale: en_NZ, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-124-generic", arch: "amd64", family: "unix"
``` 

Output of `mvn clean test`:
```
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] 
[INFO] ----------------------< org.assertj:assertj-core >----------------------
[INFO] Building AssertJ fluent assertions 3.11.0-SNAPSHOT
[INFO] -------------------------------[ bundle ]-------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ assertj-core ---
[INFO] Deleting /home/joel/prog/assertj/assertj-core-3.x/target
[INFO] 
[INFO] --- license-maven-plugin:3.0:format (default) @ assertj-core ---
[INFO] Updating license headers...
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.1:prepare-agent (prepare-agent) @ assertj-core ---
[INFO] argLine set to -javaagent:/home/joel/.m2/repository/org/jacoco/org.jacoco.agent/0.8.1/org.jacoco.agent-0.8.1-runtime.jar=destfile=/home/joel/prog/assertj/assertj-core-3.x/target/jacoco.exec,excludes=**/*hamcrest*/** --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED
 --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ assertj-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/joel/prog/assertj/assertj-core-3.x/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ assertj-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 579 source files to /home/joel/prog/assertj/assertj-core-3.x/target/classes
[INFO] /home/joel/prog/assertj/assertj-core-3.x/src/main/java/org/assertj/core/api/AbstractDoubleAssert.java: Some input files use or override a deprecated API.
[INFO] /home/joel/prog/assertj/assertj-core-3.x/src/main/java/org/assertj/core/api/AbstractDoubleAssert.java: Recompile with -Xlint:deprecation for details.
[INFO] /home/joel/prog/assertj/assertj-core-3.x/src/main/java/org/assertj/core/api/AbstractIterableAssert.java: Some input files use unchecked or unsafe operations.
[INFO] /home/joel/prog/assertj/assertj-core-3.x/src/main/java/org/assertj/core/api/AbstractIterableAssert.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ assertj-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 17 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ assertj-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2730 source files to /home/joel/prog/assertj/assertj-core-3.x/target/test-classes
[INFO] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/FloatAssertBaseTest.java: Some input files use or override a deprecated API.
[INFO] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/FloatAssertBaseTest.java: Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/AutoCloseableBDDSoftAssertionsTest.java:[62,13] reference to then is ambiguous
  both method <T>then(T) in org.assertj.core.api.Java6AbstractBDDSoftAssertions and method then(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractBDDSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/perf/SoftAssertionsPerfTest.java:[214,13] reference to assertThat is ambiguous
  both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/SoftAssertionsTest.java:[219,13] reference to assertThat is ambiguous
  both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/Assertions_assertThat_with_CharSequence_Test.java:[35,61] reference to assertThat is ambiguous
  both method assertThat(java.lang.CharSequence) in org.assertj.core.api.Assertions and method <T>assertThat(T) in org.assertj.core.api.Assertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/Assertions_assertThat_with_CharSequence_Test.java:[41,61] reference to assertThat is ambiguous
  both method assertThat(java.lang.CharSequence) in org.assertj.core.api.Assertions and method <T>assertThat(T) in org.assertj.core.api.Assertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/BDDSoftAssertionsTest.java:[216,13] reference to then is ambiguous
  both method <T>then(T) in org.assertj.core.api.Java6AbstractBDDSoftAssertions and method then(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractBDDSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/AutoCloseableSoftAssertionsTest.java:[71,13] reference to assertThat is ambiguous
  both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[INFO] 7 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.899 s
[INFO] Finished at: 2018-05-19T11:24:59+12:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile (default-testCompile) on project assertj-core: Compilation failure: Compilation failure: 
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/AutoCloseableBDDSoftAssertionsTest.java:[62,13] reference to then is ambiguous
[ERROR]   both method <T>then(T) in org.assertj.core.api.Java6AbstractBDDSoftAssertions and method then(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractBDDSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/perf/SoftAssertionsPerfTest.java:[214,13] reference to assertThat is ambiguous
[ERROR]   both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/SoftAssertionsTest.java:[219,13] reference to assertThat is ambiguous
[ERROR]   both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/Assertions_assertThat_with_CharSequence_Test.java:[35,61] reference to assertThat is ambiguous
[ERROR]   both method assertThat(java.lang.CharSequence) in org.assertj.core.api.Assertions and method <T>assertThat(T) in org.assertj.core.api.Assertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/Assertions_assertThat_with_CharSequence_Test.java:[41,61] reference to assertThat is ambiguous
[ERROR]   both method assertThat(java.lang.CharSequence) in org.assertj.core.api.Assertions and method <T>assertThat(T) in org.assertj.core.api.Assertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/BDDSoftAssertionsTest.java:[216,13] reference to then is ambiguous
[ERROR]   both method <T>then(T) in org.assertj.core.api.Java6AbstractBDDSoftAssertions and method then(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractBDDSoftAssertions match
[ERROR] /home/joel/prog/assertj/assertj-core-3.x/src/test/java/org/assertj/core/api/AutoCloseableSoftAssertionsTest.java:[71,13] reference to assertThat is ambiguous
[ERROR]   both method <T>assertThat(T) in org.assertj.core.api.Java6AbstractStandardSoftAssertions and method assertThat(java.lang.CharSequence) in org.assertj.core.api.Java6AbstractStandardSoftAssertions match
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
```


It looks like the cause for this problem is that `StringBuilder` is implementing `Comparable` now in Java 11 (see [StringBuilder doc Java 11](https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/lang/StringBuilder.html) and [StringBuilder doc Java 10](https://docs.oracle.com/javase/10/docs/api/java/lang/StringBuilder.html)). The same also applies for `StringBuffer`.

We have two options to fix this:
 - add a cast to `CharSequence` in the usage (e.g. in our tests)
 - add `assertThat(StringBuilder)` and `assertThat(StringBuffer)` 

The first solution would also force assertj users to do the cast once they migrate to Java 11.
The 2nd one would be more smooth for the user but of course means some extra code on our side.

I'd go for the 2nd solution.
@joel-costigliola, @PascalSchumacher what do you think?
@epeee thanks for the investigation, the second option is definitely better (user experience first!).
thanks, I will provide a PR later on today.

Patch:
diff --git a/src/main/java/org/assertj/core/api/Assertions.java b/src/main/java/org/assertj/core/api/Assertions.java
--- a/src/main/java/org/assertj/core/api/Assertions.java
+++ b/src/main/java/org/assertj/core/api/Assertions.java
@@ -2565,6 +2565,29 @@ public static <T> T assertThat(final AssertProvider<T> component) {
     return AssertionsForInterfaceTypes.assertThat(actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) {
+    return AssertionsForClassTypes.assertThat(actual);
+  }
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuffer actual) {
+    return AssertionsForClassTypes.assertThat(actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link CharSequenceAssert}from a {@link String}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java b/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java
--- a/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java
+++ b/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java
@@ -487,6 +487,30 @@ public static AbstractShortArrayAssert<?> assertThat(short[] actual) {
     return new ShortArrayAssert(actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) {
+    return new CharSequenceAssert(actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuffer actual) {
+    return new CharSequenceAssert(actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link StringAssert}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/Assumptions.java b/src/main/java/org/assertj/core/api/Assumptions.java
--- a/src/main/java/org/assertj/core/api/Assumptions.java
+++ b/src/main/java/org/assertj/core/api/Assumptions.java
@@ -308,6 +308,31 @@ public static AbstractCharArrayAssert<?> assumeThat(char[] actual) {
     return asAssumption(CharSequenceAssert.class, CharSequence.class, actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assumption for assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(StringBuilder actual) {
+    return asAssumption(CharSequenceAssert.class, CharSequence.class, actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assumption for assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(StringBuffer actual) {
+    return asAssumption(CharSequenceAssert.class, CharSequence.class, actual);
+  }
+
+
   /**
    * Creates a new instance of <code>{@link ShortAssert}</code> assumption.
    *
diff --git a/src/main/java/org/assertj/core/api/BDDAssertions.java b/src/main/java/org/assertj/core/api/BDDAssertions.java
--- a/src/main/java/org/assertj/core/api/BDDAssertions.java
+++ b/src/main/java/org/assertj/core/api/BDDAssertions.java
@@ -800,6 +800,30 @@ public static AbstractShortArrayAssert<?> then(short[] actual) {
     return assertThat(actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuilder actual) {
+    return assertThat(actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuffer actual) {
+    return assertThat(actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link org.assertj.core.api.StringAssert}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java b/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java
--- a/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java
+++ b/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java
@@ -487,6 +487,30 @@ public CharSequenceAssert then(CharSequence actual) {
     return proxy(CharSequenceAssert.class, CharSequence.class, actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public CharSequenceAssert then(StringBuilder actual) {
+    return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public CharSequenceAssert then(StringBuffer actual) {
+    return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link StringAssert}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java b/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java
--- a/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java
+++ b/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java
@@ -489,6 +489,30 @@ public CharSequenceAssert assertThat(CharSequence actual) {
     return proxy(CharSequenceAssert.class, CharSequence.class, actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public CharSequenceAssert assertThat(StringBuilder actual) {
+    return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public CharSequenceAssert assertThat(StringBuffer actual) {
+    return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link StringAssert}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/Java6Assertions.java b/src/main/java/org/assertj/core/api/Java6Assertions.java
--- a/src/main/java/org/assertj/core/api/Java6Assertions.java
+++ b/src/main/java/org/assertj/core/api/Java6Assertions.java
@@ -924,6 +924,30 @@ public static AbstractShortArrayAssert<?> assertThat(short[] actual) {
     return new CharSequenceAssert(actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) {
+    return new CharSequenceAssert(actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuffer actual) {
+    return new CharSequenceAssert(actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link StringAssert}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/Java6BDDAssertions.java b/src/main/java/org/assertj/core/api/Java6BDDAssertions.java
--- a/src/main/java/org/assertj/core/api/Java6BDDAssertions.java
+++ b/src/main/java/org/assertj/core/api/Java6BDDAssertions.java
@@ -795,6 +795,30 @@ public static AbstractShortArrayAssert<?> then(short[] actual) {
     return assertThat(actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuilder actual) {
+    return assertThat(actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuffer actual) {
+    return assertThat(actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link org.assertj.core.api.StringAssert}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/WithAssertions.java b/src/main/java/org/assertj/core/api/WithAssertions.java
--- a/src/main/java/org/assertj/core/api/WithAssertions.java
+++ b/src/main/java/org/assertj/core/api/WithAssertions.java
@@ -564,6 +564,30 @@ default <VALUE> AtomicStampedReferenceAssert<VALUE> assertThat(AtomicStampedRefe
     return Assertions.assertThat(actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  default AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(final StringBuilder actual) {
+    return Assertions.assertThat(actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  default AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(final StringBuffer actual) {
+    return Assertions.assertThat(actual);
+  }
+
   /**
    * Creates a new instance of <code>{@link ShortArrayAssert}</code>.
    *
diff --git a/src/main/java/org/assertj/core/api/WithAssumptions.java b/src/main/java/org/assertj/core/api/WithAssumptions.java
--- a/src/main/java/org/assertj/core/api/WithAssumptions.java
+++ b/src/main/java/org/assertj/core/api/WithAssumptions.java
@@ -371,6 +371,29 @@ default <VALUE> AtomicStampedReferenceAssert<VALUE> assumeThat(AtomicStampedRefe
     return Assumptions.assumeThat(actual);
   }
 
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuilder}.
+   *
+   * @param actual the actual value.
+   * @return the created assumption for assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  default AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(final StringBuilder actual) {
+    return Assumptions.assumeThat(actual);
+  }
+
+  /**
+   * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuffer}.
+   *
+   * @param actual the actual value.
+   * @return the created assumption for assertion object.
+   * @since 3.11.0
+   */
+  @CheckReturnValue
+  default AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(final StringBuffer actual) {
+    return Assumptions.assumeThat(actual);
+  }
   /**
    * Creates a new instance of <code>{@link ShortArrayAssert}</code> assumption.
    *


Test patch:
diff --git a/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuffer_Test.java b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuffer_Test.java
new file mode 100644
--- /dev/null
+++ b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuffer_Test.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed 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.
+ *
+ * Copyright 2012-2018 the original author or authors.
+ */
+package org.assertj.core.api;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests for <code>{@link Assertions#assertThat(StringBuffer)}</code>.
+ */
+public class Assertions_assertThat_with_StringBuffer_Test {
+
+  @Test
+  public void should_create_Assert() {
+    AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(new StringBuffer("Yoda"));
+    assertThat(assertions).isNotNull();
+  }
+
+  @Test
+  public void should_pass_actual() {
+    StringBuffer actual = new StringBuffer("Yoda");
+    AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(actual);
+    assertThat(assertions.actual).isSameAs(actual);
+  }
+}
diff --git a/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuilder_Test.java b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuilder_Test.java
new file mode 100644
--- /dev/null
+++ b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuilder_Test.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed 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.
+ *
+ * Copyright 2012-2018 the original author or authors.
+ */
+package org.assertj.core.api;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests for <code>{@link Assertions#assertThat(StringBuilder)}</code>.
+ */
+public class Assertions_assertThat_with_StringBuilder_Test {
+
+  @Test
+  public void should_create_Assert() {
+    AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(new StringBuilder("Yoda"));
+    assertThat(assertions).isNotNull();
+  }
+
+  @Test
+  public void should_pass_actual() {
+    StringBuilder actual = new StringBuilder("Yoda");
+    AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(actual);
+    assertThat(assertions.actual).isSameAs(actual);
+  }
+}