Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Deprecate supplier methods (#32)
Browse files Browse the repository at this point in the history
* deprecate supplier

* remove supplier doc
  • Loading branch information
Katsute authored Jan 16, 2022
1 parent eaa21ee commit e9cd4c9
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions src/main/java/dev/katsute/jcore/Workflow.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public static void setCommandEcho(final boolean enabled){
*
* @see #error(String)
* @see #error(Throwable)
* @see #errorSupplier(String)
* @see #throwError(Throwable)
* @since 1.0.0
*/
Expand Down Expand Up @@ -305,8 +304,6 @@ public static void debug(final String debug){
* @param notice message to print
*
* @see #notice(String)
* @see #noticeSupplier(String)
* @see #noticeSupplier(String, AnnotationProperties)
* @since 1.1.0
*/
public static void notice(final String notice){
Expand All @@ -321,8 +318,6 @@ public static void notice(final String notice){
*
* @see AnnotationProperties
* @see #notice(String)
* @see #noticeSupplier(String)
* @see #noticeSupplier(String, AnnotationProperties)
* @since 1.1.0
*/
public static void notice(final String notice, final AnnotationProperties properties){
Expand All @@ -345,31 +340,33 @@ public static void notice(final String notice, final AnnotationProperties proper
/**
* Creates a supplier that returns a notice message. Prints notice if running on CI.
*
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
* @param notice notice to print
* @return notice message
*
* @see #notice(String)
* @see #notice(String, AnnotationProperties)
* @see #noticeSupplier(String, AnnotationProperties)
* @since 1.2.0
*/
@Deprecated
public static Supplier<String> noticeSupplier(final String notice){
return noticeSupplier(notice, null);
}

/**
* Creates a supplier that returns a notice message. Prints notice if running on CI.
*
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
* @param notice notice to print
* @param properties optional {@link AnnotationProperties}
* @return notice message
*
* @see AnnotationProperties
* @see #notice(String)
* @see #notice(String, AnnotationProperties)
* @see #noticeSupplier(String)
* @since 1.2.0
*/
@Deprecated
public static Supplier<String> noticeSupplier(final String notice, AnnotationProperties properties){
return () -> {
if(CI)
Expand All @@ -385,7 +382,6 @@ public static Supplier<String> noticeSupplier(final String notice, AnnotationPro
*
* @see #warning(String, AnnotationProperties)
* @see #warning(Throwable)
* @see #warningSupplier(String)
* @see #throwWarning(Throwable)
* @since 1.0.0
*/
Expand All @@ -403,7 +399,6 @@ public static void warning(final String warning){
* @see AnnotationProperties
* @see #warning(String)
* @see #warning(Throwable)
* @see #warningSupplier(String)
* @see #throwWarning(Throwable)
* @since 1.1.0
*/
Expand Down Expand Up @@ -431,7 +426,6 @@ public static void warning(final String warning, final AnnotationProperties prop
*
* @see #warning(String)
* @see #warning(String, AnnotationProperties)
* @see #warningSupplier(String)
* @see #throwWarning(Throwable)
* @since 1.0.0
*/
Expand All @@ -449,7 +443,6 @@ public static void warning(final Throwable throwable){
* @see #warning(String)
* @see #warning(String, AnnotationProperties)
* @see #warning(Throwable)
* @see #warningSupplier(String)
* @since 1.0.0
*/
public static <T extends Throwable> void throwWarning(final T throwable) throws T{
Expand All @@ -460,6 +453,7 @@ public static <T extends Throwable> void throwWarning(final T throwable) throws
/**
* Creates a supplier that returns a warning message. Prints warning if running on CI.
*
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
* @param warning message to print
* @return warning message
*
Expand All @@ -469,6 +463,7 @@ public static <T extends Throwable> void throwWarning(final T throwable) throws
* @see #throwWarning(Throwable)
* @since 1.0.0
*/
@Deprecated
public static Supplier<String> warningSupplier(final String warning){
final Throwable throwable = new Throwable();
return () -> {
Expand All @@ -493,7 +488,6 @@ private static void warning(final StackTraceElement[] trace, final String messag
*
* @see #error(String, AnnotationProperties)
* @see #error(Throwable)
* @see #errorSupplier(String)
* @see #throwError(Throwable)
* @see #setFailed(String)
* @since 1.0.0
Expand All @@ -512,7 +506,6 @@ public static void error(final String error){
* @see AnnotationProperties
* @see #error(String)
* @see #error(Throwable)
* @see #errorSupplier(String)
* @see #throwError(Throwable)
* @see #setFailed(String)
* @since 1.1.0
Expand Down Expand Up @@ -541,7 +534,6 @@ public static void error(final String error, final AnnotationProperties properti
*
* @see #error(String, AnnotationProperties)
* @see #error(String)
* @see #errorSupplier(String)
* @see #throwError(Throwable)
* @see #setFailed(String)
* @since 1.0.0
Expand All @@ -560,7 +552,6 @@ public static void error(final Throwable throwable){
* @see #error(String)
* @see #error(String, AnnotationProperties)
* @see #error(Throwable)
* @see #errorSupplier(String)
* @see #setFailed(String)
* @since 1.0.0
*/
Expand All @@ -572,6 +563,7 @@ public static <T extends Throwable> void throwError(final T throwable) throws T{
/**
* Creates a supplier that returns an error message. Prints error if running on CI.
*
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
* @param error message to print
* @return error message
*
Expand All @@ -582,6 +574,7 @@ public static <T extends Throwable> void throwError(final T throwable) throws T{
* @see #setFailed(String)
* @since 1.0.0
*/
@Deprecated
public static Supplier<String> errorSupplier(final String error){
final Throwable throwable = new Throwable();
return () -> {
Expand Down

0 comments on commit e9cd4c9

Please sign in to comment.