You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2019/01/23 10:23:00 UTC
[isis] branch v2 updated: ISIS-2033: polishes javadoc for
_Probe.println
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/v2 by this push:
new e4eefce ISIS-2033: polishes javadoc for _Probe.println
e4eefce is described below
commit e4eefce2e6d468246b0c6a971f507825d681d87b
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Jan 23 11:22:53 2019 +0100
ISIS-2033: polishes javadoc for _Probe.println
---
.../org/apache/isis/commons/internal/debug/_Probe.java | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/core/commons/src/main/java/org/apache/isis/commons/internal/debug/_Probe.java b/core/commons/src/main/java/org/apache/isis/commons/internal/debug/_Probe.java
index 7b23075..ce98995 100644
--- a/core/commons/src/main/java/org/apache/isis/commons/internal/debug/_Probe.java
+++ b/core/commons/src/main/java/org/apache/isis/commons/internal/debug/_Probe.java
@@ -28,8 +28,14 @@ import org.apache.isis.commons.internal.exceptions._Exceptions;
* <h1>- internal use only -</h1>
* <p>
* Replacement for the use of System.out.println when adding temporary debug code,
- * that need to be removed later.
+ * that needs to be removed later.
* </p>
+ * <p>EXAMPLE:<br/><pre>{@code
+ * _Probe probe =
+ * _Probe.maxCallsThenExitWithStacktrace(1).label("IsisSessionFactoryDefault");
+ * probe.println("Hallo World!");
+ * }
+ * </pre></p>
* <p>
* <b>WARNING</b>: Do <b>NOT</b> use any of the classes provided by this package! <br/>
* These may be changed or removed without notice!
@@ -112,19 +118,18 @@ public class _Probe {
if(counter.longValue()<maxCalls) {
counter.increment();
print_line(indent, chars);
+ return;
}
- if(counter.longValue()<maxCalls) {
- return; // skip max-action
- }
-
switch (maxAction) {
case IGNORE:
return;
case SYSTEM_EXIT:
+ print_line(indent, chars);
System.exit(0);
return;
case SYSTEM_EXIT_WITH_STACKTRACE:
+ print_line(indent, chars);
_Exceptions.dumpStackTrace(out, 0, 1000);
System.exit(0);
return;