mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
refactor: Satisfy Semgrep
This commit is contained in:
parent
3da1e9255a
commit
af2613202d
@ -75,7 +75,7 @@ public class EntitySpawnListener implements Listener {
|
||||
|
||||
public static void testCreate(final Entity entity) {
|
||||
@NonNull World world = entity.getWorld();
|
||||
if (areaName == world.getName()) {
|
||||
if (areaName.equals(world.getName())) {
|
||||
} else {
|
||||
areaName = world.getName();
|
||||
hasPlotArea = PlotSquared.get().getPlotAreaManager().hasPlotArea(areaName);
|
||||
|
@ -286,15 +286,13 @@ public class StringMan {
|
||||
}
|
||||
|
||||
public static boolean isEqualIgnoreCase(String a, String b) {
|
||||
return (a == b) || ((a != null) && (b != null) && (a.length() == b.length()) && a
|
||||
return (a.equals(b)) || ((a != null) && (b != null) && (a.length() == b.length()) && a
|
||||
.equalsIgnoreCase(b));
|
||||
}
|
||||
|
||||
public static String repeat(String s, int n) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < n; i++) {
|
||||
sb.append(s);
|
||||
}
|
||||
sb.append(String.valueOf(s).repeat(Math.max(0, n)));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user