-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #18
- Loading branch information
Showing
11 changed files
with
187 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
common/src/main/java/org/openshift/ping/common/compatibility/CompatibilityException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.openshift.ping.common.compatibility; | ||
|
||
/** | ||
* Thrown on incompatibility errors | ||
* | ||
* @author Sebastian Łaskawiec | ||
*/ | ||
public class CompatibilityException extends RuntimeException { | ||
|
||
public CompatibilityException() { | ||
} | ||
|
||
public CompatibilityException(String message) { | ||
super(message); | ||
} | ||
|
||
public CompatibilityException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public CompatibilityException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
public CompatibilityException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
common/src/main/java/org/openshift/ping/common/compatibility/CompatibilityUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.openshift.ping.common.compatibility; | ||
|
||
import org.jgroups.Version; | ||
|
||
/** | ||
* A small set of compatibility checking utils | ||
* | ||
* @author Sebastian Łaskawiec | ||
*/ | ||
public class CompatibilityUtils { | ||
|
||
private CompatibilityUtils() { | ||
} | ||
|
||
/** | ||
* @return <code>true</code> when JGroups 4 is on the classpath. <code>false</code> otherwise. | ||
*/ | ||
public static boolean isJGroups4() { | ||
return Version.major == 4; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.