Skip to content

Commit

Permalink
Issue #13345: Rename classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Prathamesh-007 committed Apr 16, 2024
1 parent 794f87a commit d3c224b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Expand Up @@ -19,19 +19,19 @@ public Example1() {
}
}

class FirstMyException extends Exception {
class FirstException extends Exception {
private int code; // violation

public FirstMyException() {
public FirstException() {
code = 2;
}
}

class FirstMyThrowable extends Throwable {
class FirstThrowable extends Throwable {
final int code; // OK
String message; // violation

public FirstMyThrowable(int code, String message) {
public FirstThrowable(int code, String message) {
this.code = code;
this.message = message;
}
Expand Down
Expand Up @@ -19,19 +19,19 @@ public Example2() {
}
}

class SecondMyException extends Exception {
class SecondException extends Exception {
private int code; // violation

public SecondMyException() {
public SecondException() {
code = 2;
}
}

class SecondMyThrowable extends Throwable {
class SecondThrowable extends Throwable {
final int code; // OK, class name doesn't match with given pattern
String message; // OK, class name doesn't match with given pattern

public SecondMyThrowable(int code, String message) {
public SecondThrowable(int code, String message) {
this.code = code;
this.message = message;
}
Expand Down
Expand Up @@ -19,19 +19,19 @@ public Example3() {
}
}

class ThirdMyException extends Exception {
class ThirdException extends Exception {
private int code; // OK, extended class name doesn't match with given pattern

public ThirdMyException() {
public ThirdException() {
code = 2;
}
}

class ThirdMyThrowable extends Throwable {
class ThirdThrowable extends Throwable {
final int code; // OK
String message; // violation

public ThirdMyThrowable(int code, String message) {
public ThirdThrowable(int code, String message) {
this.code = code;
this.message = message;
}
Expand Down
24 changes: 12 additions & 12 deletions src/xdocs/checks/design/mutableexception.xml
Expand Up @@ -82,19 +82,19 @@ class Example1 extends Exception {
}
}

class FirstMyException extends Exception {
class FirstException extends Exception {
private int code; // violation

public FirstMyException() {
public FirstException() {
code = 2;
}
}

class FirstMyThrowable extends Throwable {
class FirstThrowable extends Throwable {
final int code; // OK
String message; // violation

public FirstMyThrowable(int code, String message) {
public FirstThrowable(int code, String message) {
this.code = code;
this.message = message;
}
Expand Down Expand Up @@ -132,19 +132,19 @@ class Example2 extends Exception {
}
}

class SecondMyException extends Exception {
class SecondException extends Exception {
private int code; // violation

public SecondMyException() {
public SecondException() {
code = 2;
}
}

class SecondMyThrowable extends Throwable {
class SecondThrowable extends Throwable {
final int code; // OK, class name doesn't match with given pattern
String message; // OK, class name doesn't match with given pattern

public SecondMyThrowable(int code, String message) {
public SecondThrowable(int code, String message) {
this.code = code;
this.message = message;
}
Expand Down Expand Up @@ -182,19 +182,19 @@ class Example3 extends Exception {
}
}

class ThirdMyException extends Exception {
class ThirdException extends Exception {
private int code; // OK, extended class name doesn't match with given pattern

public ThirdMyException() {
public ThirdException() {
code = 2;
}
}

class ThirdMyThrowable extends Throwable {
class ThirdThrowable extends Throwable {
final int code; // OK
String message; // violation

public ThirdMyThrowable(int code, String message) {
public ThirdThrowable(int code, String message) {
this.code = code;
this.message = message;
}
Expand Down

0 comments on commit d3c224b

Please sign in to comment.