Feat: add static analytic of code

This commit is contained in:
Laurent Clouet
2024-06-03 14:02:30 +00:00
parent c966a1a032
commit 4bce6409e3
52 changed files with 249 additions and 316 deletions

View File

@@ -24,7 +24,7 @@ public class SheepItException extends Exception {
super();
}
public SheepItException(String message_) {
super(message_);
public SheepItException(String message) {
super(message);
}
}

View File

@@ -26,15 +26,15 @@ public class SheepItExceptionBadResponseFromServer extends SheepItExceptionWithR
super();
}
public SheepItExceptionBadResponseFromServer(String message_) {
super(message_);
public SheepItExceptionBadResponseFromServer(String message) {
super(message);
}
public String getHumanText() {
@Override public String getHumanText() {
return "Bad answer from the server. Will try again at %tR";
}
public int getWaitDuration() {
@Override public int getWaitDuration() {
return 1000 * 60 * ThreadLocalRandom.current().nextInt(15, 30 + 1);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionNoRendererAvailable extends SheepItException {
super();
}
public SheepItExceptionNoRendererAvailable(String message_) {
super(message_);
public SheepItExceptionNoRendererAvailable(String message) {
super(message);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionNoRightToRender extends SheepItException {
super();
}
public SheepItExceptionNoRightToRender(String message_) {
super(message_);
public SheepItExceptionNoRightToRender(String message) {
super(message);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionNoSession extends SheepItException {
super();
}
public SheepItExceptionNoSession(String message_) {
super(message_);
public SheepItExceptionNoSession(String message) {
super(message);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionNoSpaceLeftOnDevice extends SheepItException {
super();
}
public SheepItExceptionNoSpaceLeftOnDevice(String message_) {
super(message_);
public SheepItExceptionNoSpaceLeftOnDevice(String message) {
super(message);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionNoWritePermission extends SheepItException {
super();
}
public SheepItExceptionNoWritePermission(String message_) {
super(message_);
public SheepItExceptionNoWritePermission(String message) {
super(message);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionPathInvalid extends SheepItException {
super();
}
public SheepItExceptionPathInvalid(String message_) {
super(message_);
public SheepItExceptionPathInvalid(String message) {
super(message);
}
}

View File

@@ -26,15 +26,15 @@ public class SheepItExceptionServerInMaintenance extends SheepItExceptionWithReq
super();
}
public SheepItExceptionServerInMaintenance(String message_) {
super(message_);
public SheepItExceptionServerInMaintenance(String message) {
super(message);
}
public String getHumanText() {
@Override public String getHumanText() {
return "The server is under maintenance and cannot allocate a job. Will try again at %tR";
}
public int getWaitDuration() {
@Override public int getWaitDuration() {
return 1000 * 60 * ThreadLocalRandom.current().nextInt(20, 30 + 1);
}
}

View File

@@ -26,15 +26,15 @@ public class SheepItExceptionServerOverloaded extends SheepItExceptionWithRequir
super();
}
public SheepItExceptionServerOverloaded(String message_) {
super(message_);
public SheepItExceptionServerOverloaded(String message) {
super(message);
}
public String getHumanText() {
@Override public String getHumanText() {
return "The server is overloaded and cannot allocate a job. Will try again at %tR";
}
public int getWaitDuration() {
@Override public int getWaitDuration() {
return 1000 * 60 * ThreadLocalRandom.current().nextInt(10, 30 + 1);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionSessionDisabled extends SheepItException {
super();
}
public SheepItExceptionSessionDisabled(String message_) {
super(message_);
public SheepItExceptionSessionDisabled(String message) {
super(message);
}
}

View File

@@ -24,7 +24,7 @@ public class SheepItExceptionSessionDisabledDenoisingNotSupported extends SheepI
super();
}
public SheepItExceptionSessionDisabledDenoisingNotSupported(String message_) {
super(message_);
public SheepItExceptionSessionDisabledDenoisingNotSupported(String message) {
super(message);
}
}

View File

@@ -28,8 +28,8 @@ public class SheepItExceptionWithRequiredWait extends SheepItException {
super();
}
public SheepItExceptionWithRequiredWait(String message_) {
super(message_);
public SheepItExceptionWithRequiredWait(String message) {
super(message);
}
public String getHumanText() {

View File

@@ -29,15 +29,15 @@ public class SheepItServerDown extends SheepItExceptionWithRequiredWait {
super();
}
public SheepItServerDown(String message_) {
super(message_);
public SheepItServerDown(String message) {
super(message);
}
public String getHumanText() {
@Override public String getHumanText() {
return "Cannot connect to the server. Please check your connectivity. Will try again at %tR";
}
public int getWaitDuration() {
@Override public int getWaitDuration() {
return 1000 * 60 * ThreadLocalRandom.current().nextInt(10, 30 + 1);
}
}