Fixed a java backward compatibility issue, to use jenkins maven build
This commit is contained in:
parent
a53962804f
commit
7a471ea05e
1 changed files with 9 additions and 8 deletions
|
@ -65,33 +65,34 @@ public class ApplicableRegions {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private <T extends Flag<V>, V> void extendRegionFlags() {
|
private void extendRegionFlags() {
|
||||||
for (ProtectedRegion pr : regions) {
|
for (ProtectedRegion pr : regions) {
|
||||||
for (FlagValue data : mgr.region(pr).getFlags()) {
|
for (FlagValue data : mgr.region(pr).getFlags()) {
|
||||||
T flag = (T) data.getFlag();
|
Flag<Object> flag = (Flag<Object>) data.getFlag();
|
||||||
V value = (V) data.getValue();
|
Object value = data.getValue();
|
||||||
pr.setFlag(flag, value);
|
pr.setFlag(flag, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mgr.getGlobalRegion() != null) {
|
if (mgr.getGlobalRegion() != null) {
|
||||||
for (FlagValue data : mgr.region(mgr.getGlobalRegion()).getFlags()) {
|
for (FlagValue data : mgr.region(mgr.getGlobalRegion()).getFlags()) {
|
||||||
T flag = (T) data.getFlag();
|
Flag<Object> flag = (Flag<Object>) data.getFlag();
|
||||||
V value = (V) data.getValue();
|
Object value = data.getValue();
|
||||||
mgr.getGlobalRegion().setFlag(flag, value);
|
mgr.getGlobalRegion().setFlag(flag, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private <T extends Flag<V>, V> void contractRegionFlags() {
|
private void contractRegionFlags() {
|
||||||
for (ProtectedRegion pr : regions) {
|
for (ProtectedRegion pr : regions) {
|
||||||
for (FlagValue data : mgr.region(pr).getFlags()) {
|
for (FlagValue data : mgr.region(pr).getFlags()) {
|
||||||
T flag = (T) data.getFlag();
|
Flag<Object> flag = (Flag<Object>) data.getFlag();
|
||||||
pr.setFlag(flag, null);
|
pr.setFlag(flag, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mgr.getGlobalRegion() != null) {
|
if (mgr.getGlobalRegion() != null) {
|
||||||
for (FlagValue data : mgr.region(mgr.getGlobalRegion()).getFlags()) {
|
for (FlagValue data : mgr.region(mgr.getGlobalRegion()).getFlags()) {
|
||||||
T flag = (T) data.getFlag();
|
Flag<Object> flag = (Flag<Object>) data.getFlag();
|
||||||
mgr.getGlobalRegion().setFlag(flag, null);
|
mgr.getGlobalRegion().setFlag(flag, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue