From 054e4dc00fc985390487f433fa6308d3c967b6cf Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Sat, 9 Sep 2017 13:59:09 -0400 Subject: [PATCH] JMException does not exist on Android --- .../terrain/heightmap/MidpointDisplacementHeightMap.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java index 9998d64a2..34b20a398 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java +++ b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java @@ -35,7 +35,6 @@ import com.jme3.math.FastMath; import java.util.Random; import java.util.logging.Level; import java.util.logging.Logger; -import javax.management.JMException; /** * MidpointDisplacementHeightMap generates an heightmap based on @@ -72,11 +71,11 @@ public class MidpointDisplacementHeightMap extends AbstractHeightMap { * typically a good choice * @param seed * A seed to feed the random number generator. - * @throw JMException if size is not a power of two plus one. + * @throw IllegalArgumentException if size is not a power of two plus one. */ - public MidpointDisplacementHeightMap(int size, float range, float persistence, long seed) throws Exception { + public MidpointDisplacementHeightMap(int size, float range, float persistence, long seed) { if (size < 0 || !FastMath.isPowerOfTwo(size - 1)) { - throw new JMException("The size is negative or not of the form 2^N +1" + throw new IllegalArgumentException("The size is negative or not of the form 2^N +1" + " (a power of two plus one)"); } this.size = size;