From e6ca7579e184fb2296e8126a21b6d71b1408f08e Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 23 Jul 2022 11:34:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/dev/struchkov/example/debugger/box/SurpriseBox.java | 2 +- .../java/dev/struchkov/example/debugger/one/ExampleOne.java | 2 ++ .../java/dev/struchkov/example/debugger/two/FooService.java | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java b/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java index b69660e..b711d9f 100644 --- a/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java +++ b/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java @@ -1,6 +1,6 @@ package dev.struchkov.example.debugger.box; -public class SurpriseBox { +public final class SurpriseBox { public static void surpriseOne(int i) { if (i == 896) { diff --git a/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java b/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java index 01b1edc..73caf3e 100644 --- a/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java +++ b/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java @@ -6,7 +6,9 @@ public class ExampleOne { public static void main(String[] args) { final ExampleOne exampleOne = new ExampleOne(); + System.out.println("\n\nПрограмма запущена"); exampleOne.demo(); + System.out.println("Программа выполнена"); } private void demo() { diff --git a/src/main/java/dev/struchkov/example/debugger/two/FooService.java b/src/main/java/dev/struchkov/example/debugger/two/FooService.java index 905d939..f1462af 100644 --- a/src/main/java/dev/struchkov/example/debugger/two/FooService.java +++ b/src/main/java/dev/struchkov/example/debugger/two/FooService.java @@ -7,12 +7,12 @@ public class FooService { public void example() { for (int i = 0; i < 1000; i++) { - testMethod(i); + noSurpriseMethod(i); SurpriseBox.surpriseOne(i); } } - private void testMethod(int i) { + private void noSurpriseMethod(int i) { if (i == 100) { try { throw new SurpriseException("Упс");