Revert to Guava 17's firstNonNull.

Deprecated but Spigot doesn't include guava18 yet.
Dieser Commit ist enthalten in:
wizjany 2015-11-13 20:17:56 -05:00
Ursprung 0e200df5be
Commit bed8a80894
6 geänderte Dateien mit 10 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -21,7 +21,7 @@ buildscript {
configurations.all {
resolutionStrategy {
force 'com.google.guava:guava:18.0'
force 'com.google.guava:guava:17.0'
}
}

Datei anzeigen

@ -5,7 +5,7 @@ dependencies {
compile 'de.schlichtherle:truezip:6.8.3'
compile 'rhino:js:1.7R2'
compile 'org.yaml:snakeyaml:1.9'
compile 'com.google.guava:guava:18.0'
compile 'com.google.guava:guava:17.0'
compile 'com.sk89q:jchronic:0.2.4a'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.thoughtworks.paranamer:paranamer:2.6'

Datei anzeigen

@ -30,7 +30,7 @@ import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.util.command.argument.CommandArgs;
import com.sk89q.worldedit.util.command.composition.SimpleCommand;
import static com.google.common.base.MoreObjects.firstNonNull;
import static com.google.common.base.Objects.firstNonNull;
public class ReplaceParser extends SimpleCommand<Contextual<? extends RegionFunction>> {

Datei anzeigen

@ -19,7 +19,6 @@
package com.sk89q.worldedit.function.factory;
import com.google.common.base.MoreObjects;
import com.sk89q.worldedit.function.Contextual;
import com.sk89q.worldedit.function.EditContext;
import com.sk89q.worldedit.function.RegionFunction;
@ -28,6 +27,7 @@ import com.sk89q.worldedit.function.visitor.RegionVisitor;
import com.sk89q.worldedit.regions.NullRegion;
import com.sk89q.worldedit.regions.Region;
import static com.google.common.base.Objects.firstNonNull;
import static com.google.common.base.Preconditions.checkNotNull;
public class Apply implements Contextual<Operation> {
@ -48,7 +48,7 @@ public class Apply implements Contextual<Operation> {
@Override
public Operation createFromContext(EditContext context) {
return new RegionVisitor(MoreObjects.firstNonNull(context.getRegion(), region), function.createFromContext(context));
return new RegionVisitor(firstNonNull(context.getRegion(), region), function.createFromContext(context));
}
@Override

Datei anzeigen

@ -19,7 +19,7 @@
package com.sk89q.worldedit.function.factory;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
@ -123,7 +123,7 @@ public class Deform implements Contextual<Operation> {
final Vector zero;
Vector unit;
Region region = MoreObjects.firstNonNull(context.getRegion(), this.region);
Region region = Objects.firstNonNull(context.getRegion(), this.region);
switch (mode) {
case UNIT_CUBE:

Datei anzeigen

@ -19,7 +19,6 @@
package com.sk89q.worldedit.function.factory;
import com.google.common.base.MoreObjects;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.extent.NullExtent;
import com.sk89q.worldedit.function.Contextual;
@ -34,6 +33,7 @@ import com.sk89q.worldedit.math.noise.RandomNoise;
import com.sk89q.worldedit.regions.NullRegion;
import com.sk89q.worldedit.regions.Region;
import static com.google.common.base.Objects.firstNonNull;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.regions.Regions.*;
@ -63,8 +63,8 @@ public class Paint implements Contextual<Operation> {
@Override
public Operation createFromContext(EditContext context) {
Extent destination = MoreObjects.firstNonNull(context.getDestination(), this.destination);
Region region = MoreObjects.firstNonNull(context.getRegion(), this.region);
Extent destination = firstNonNull(context.getDestination(), this.destination);
Region region = firstNonNull(context.getRegion(), this.region);
GroundFunction ground = new GroundFunction(new ExistingBlockMask(destination), function.createFromContext(context));
LayerVisitor visitor = new LayerVisitor(asFlatRegion(region), minimumBlockY(region), maximumBlockY(region), ground);
visitor.setMask(new NoiseFilter2D(new RandomNoise(), density));