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

Commit e9cd4c9

Browse files
authored
Deprecate supplier methods (#32)
* deprecate supplier * remove supplier doc
1 parent eaa21ee commit e9cd4c9

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

src/main/java/dev/katsute/jcore/Workflow.java

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ public static void setCommandEcho(final boolean enabled){
254254
*
255255
* @see #error(String)
256256
* @see #error(Throwable)
257-
* @see #errorSupplier(String)
258257
* @see #throwError(Throwable)
259258
* @since 1.0.0
260259
*/
@@ -305,8 +304,6 @@ public static void debug(final String debug){
305304
* @param notice message to print
306305
*
307306
* @see #notice(String)
308-
* @see #noticeSupplier(String)
309-
* @see #noticeSupplier(String, AnnotationProperties)
310307
* @since 1.1.0
311308
*/
312309
public static void notice(final String notice){
@@ -321,8 +318,6 @@ public static void notice(final String notice){
321318
*
322319
* @see AnnotationProperties
323320
* @see #notice(String)
324-
* @see #noticeSupplier(String)
325-
* @see #noticeSupplier(String, AnnotationProperties)
326321
* @since 1.1.0
327322
*/
328323
public static void notice(final String notice, final AnnotationProperties properties){
@@ -345,31 +340,33 @@ public static void notice(final String notice, final AnnotationProperties proper
345340
/**
346341
* Creates a supplier that returns a notice message. Prints notice if running on CI.
347342
*
343+
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
348344
* @param notice notice to print
349345
* @return notice message
350346
*
351347
* @see #notice(String)
352348
* @see #notice(String, AnnotationProperties)
353-
* @see #noticeSupplier(String, AnnotationProperties)
354349
* @since 1.2.0
355350
*/
351+
@Deprecated
356352
public static Supplier<String> noticeSupplier(final String notice){
357353
return noticeSupplier(notice, null);
358354
}
359355

360356
/**
361357
* Creates a supplier that returns a notice message. Prints notice if running on CI.
362358
*
359+
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
363360
* @param notice notice to print
364361
* @param properties optional {@link AnnotationProperties}
365362
* @return notice message
366363
*
367364
* @see AnnotationProperties
368365
* @see #notice(String)
369366
* @see #notice(String, AnnotationProperties)
370-
* @see #noticeSupplier(String)
371367
* @since 1.2.0
372368
*/
369+
@Deprecated
373370
public static Supplier<String> noticeSupplier(final String notice, AnnotationProperties properties){
374371
return () -> {
375372
if(CI)
@@ -385,7 +382,6 @@ public static Supplier<String> noticeSupplier(final String notice, AnnotationPro
385382
*
386383
* @see #warning(String, AnnotationProperties)
387384
* @see #warning(Throwable)
388-
* @see #warningSupplier(String)
389385
* @see #throwWarning(Throwable)
390386
* @since 1.0.0
391387
*/
@@ -403,7 +399,6 @@ public static void warning(final String warning){
403399
* @see AnnotationProperties
404400
* @see #warning(String)
405401
* @see #warning(Throwable)
406-
* @see #warningSupplier(String)
407402
* @see #throwWarning(Throwable)
408403
* @since 1.1.0
409404
*/
@@ -431,7 +426,6 @@ public static void warning(final String warning, final AnnotationProperties prop
431426
*
432427
* @see #warning(String)
433428
* @see #warning(String, AnnotationProperties)
434-
* @see #warningSupplier(String)
435429
* @see #throwWarning(Throwable)
436430
* @since 1.0.0
437431
*/
@@ -449,7 +443,6 @@ public static void warning(final Throwable throwable){
449443
* @see #warning(String)
450444
* @see #warning(String, AnnotationProperties)
451445
* @see #warning(Throwable)
452-
* @see #warningSupplier(String)
453446
* @since 1.0.0
454447
*/
455448
public static <T extends Throwable> void throwWarning(final T throwable) throws T{
@@ -460,6 +453,7 @@ public static <T extends Throwable> void throwWarning(final T throwable) throws
460453
/**
461454
* Creates a supplier that returns a warning message. Prints warning if running on CI.
462455
*
456+
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
463457
* @param warning message to print
464458
* @return warning message
465459
*
@@ -469,6 +463,7 @@ public static <T extends Throwable> void throwWarning(final T throwable) throws
469463
* @see #throwWarning(Throwable)
470464
* @since 1.0.0
471465
*/
466+
@Deprecated
472467
public static Supplier<String> warningSupplier(final String warning){
473468
final Throwable throwable = new Throwable();
474469
return () -> {
@@ -493,7 +488,6 @@ private static void warning(final StackTraceElement[] trace, final String messag
493488
*
494489
* @see #error(String, AnnotationProperties)
495490
* @see #error(Throwable)
496-
* @see #errorSupplier(String)
497491
* @see #throwError(Throwable)
498492
* @see #setFailed(String)
499493
* @since 1.0.0
@@ -512,7 +506,6 @@ public static void error(final String error){
512506
* @see AnnotationProperties
513507
* @see #error(String)
514508
* @see #error(Throwable)
515-
* @see #errorSupplier(String)
516509
* @see #throwError(Throwable)
517510
* @see #setFailed(String)
518511
* @since 1.1.0
@@ -541,7 +534,6 @@ public static void error(final String error, final AnnotationProperties properti
541534
*
542535
* @see #error(String, AnnotationProperties)
543536
* @see #error(String)
544-
* @see #errorSupplier(String)
545537
* @see #throwError(Throwable)
546538
* @see #setFailed(String)
547539
* @since 1.0.0
@@ -560,7 +552,6 @@ public static void error(final Throwable throwable){
560552
* @see #error(String)
561553
* @see #error(String, AnnotationProperties)
562554
* @see #error(Throwable)
563-
* @see #errorSupplier(String)
564555
* @see #setFailed(String)
565556
* @since 1.0.0
566557
*/
@@ -572,6 +563,7 @@ public static <T extends Throwable> void throwError(final T throwable) throws T{
572563
/**
573564
* Creates a supplier that returns an error message. Prints error if running on CI.
574565
*
566+
* @deprecated use {@link #annotateTest(ThrowingRunnable)}
575567
* @param error message to print
576568
* @return error message
577569
*
@@ -582,6 +574,7 @@ public static <T extends Throwable> void throwError(final T throwable) throws T{
582574
* @see #setFailed(String)
583575
* @since 1.0.0
584576
*/
577+
@Deprecated
585578
public static Supplier<String> errorSupplier(final String error){
586579
final Throwable throwable = new Throwable();
587580
return () -> {

0 commit comments

Comments
 (0)