浏览代码

correct typos logger/exception messages (#1584)

Stephen Gold 4 年之前
父节点
当前提交
13baa3d3f6
共有 27 个文件被更改,包括 38 次插入38 次删除
  1. 1 1
      jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java
  2. 1 1
      jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java
  3. 2 2
      jme3-core/src/main/java/com/jme3/animation/AnimControl.java
  4. 2 2
      jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java
  5. 1 1
      jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java
  6. 3 3
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java
  7. 1 1
      jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java
  8. 1 1
      jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java
  9. 2 2
      jme3-core/src/main/java/com/jme3/shader/Uniform.java
  10. 2 2
      jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java
  11. 3 3
      jme3-core/src/main/java/com/jme3/util/TangentBinormalGenerator.java
  12. 2 2
      jme3-desktop/src/main/java/com/jme3/input/AWTInput.java
  13. 1 1
      jme3-examples/src/main/java/jme3test/opencl/TestContextSwitching.java
  14. 1 1
      jme3-networking/src/main/java/com/jme3/network/base/DefaultClient.java
  15. 1 1
      jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java
  16. 1 1
      jme3-networking/src/main/java/com/jme3/network/base/KernelAdapter.java
  17. 1 1
      jme3-networking/src/main/java/com/jme3/network/kernel/AbstractKernel.java
  18. 1 1
      jme3-networking/src/main/java/com/jme3/network/service/rpc/RpcConnection.java
  19. 1 1
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/RotationOrder.java
  20. 1 1
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/file/FbxReader.java
  21. 1 1
      jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java
  22. 1 1
      jme3-plugins/src/main/java/com/jme3/scene/plugins/IrUtils.java
  23. 2 2
      jme3-terrain/src/main/java/com/jme3/terrain/heightmap/HillHeightMap.java
  24. 2 2
      jme3-vr/src/main/java/com/jme3/app/VREnvironment.java
  25. 1 1
      jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRInput.java
  26. 1 1
      jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusVR.java
  27. 1 1
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java

+ 1 - 1
jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java

@@ -163,7 +163,7 @@ public class AndroidSensorJoyInput implements SensorEventListener {
             if (sensorData.sensor != null) {
                 if (sensorManager.registerListener(this, sensorData.sensor, sensorData.androidSensorSpeed)) {
                     sensorData.enabled = true;
-                    logger.log(Level.FINE, "SensorType: {0}, actived: {1}",
+                    logger.log(Level.FINE, "SensorType: {0}, enabled: {1}",
                             new Object[]{sensorType, sensorData.enabled});
                     return true;
                 } else {

+ 1 - 1
jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java

@@ -567,7 +567,7 @@ public class Tweens {
                 Class[] paramTypes = m.getParameterTypes();
                 if (paramTypes.length != args.length + 1) {
                     if (log.isLoggable(Level.FINE)) {
-                        log.log(Level.FINE, "Param lengths of [" + m + "] differ.  method arg count:" + paramTypes.length + "  lookging for:" + (args.length + 1));
+                        log.log(Level.FINE, "Param lengths of [" + m + "] differ.  method arg count:" + paramTypes.length + "  looking for:" + (args.length + 1));
                     }
                     continue;
                 }

+ 2 - 2
jme3-core/src/main/java/com/jme3/animation/AnimControl.java

@@ -242,7 +242,7 @@ public final class AnimControl extends AbstractControl implements Cloneable, Jme
     public void addListener(AnimEventListener listener) {
         if (listeners.contains(listener)) {
             throw new IllegalArgumentException("The given listener is already "
-                    + "registed at this AnimControl");
+                    + "registered at this AnimControl");
         }
 
         listeners.add(listener);
@@ -257,7 +257,7 @@ public final class AnimControl extends AbstractControl implements Cloneable, Jme
     public void removeListener(AnimEventListener listener) {
         if (!listeners.remove(listener)) {
             throw new IllegalArgumentException("The given listener is not "
-                    + "registed at this AnimControl");
+                    + "registered at this AnimControl");
         }
     }
 

+ 2 - 2
jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java

@@ -737,7 +737,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
                 active = fillBuffer(stream, buffer);
                 if (!active) {
                     throw new IllegalStateException("Looping streaming source " +
-                            "was rewinded but could not be filled");
+                            "was rewound but could not be filled");
                 }
             }
             
@@ -779,7 +779,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
                 active = fillBuffer(stream, id);
                 if (!active) {
                     throw new IllegalStateException("Looping streaming source " +
-                            "was rewinded but could not be filled");
+                            "was rewound but could not be filled");
                 }
             }
             if (active) {

+ 1 - 1
jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java

@@ -570,7 +570,7 @@ public class Cinematic extends AbstractCinematicEvent implements AppState {
      */
     public CameraNode bindCamera(String cameraName, Camera cam) {
         if (cameras.containsKey(cameraName)) {
-            throw new IllegalArgumentException("Camera " + cameraName + " is already binded to this cinematic");
+            throw new IllegalArgumentException("Camera " + cameraName + " is already bound to this cinematic");
         }
         CameraNode node = new CameraNode(cameraName, cam);
         node.setControlDir(ControlDirection.SpatialToCamera);

+ 3 - 3
jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

@@ -653,7 +653,7 @@ public final class GLRenderer implements Renderer {
 
     @Override
     public void resetGLObjects() {
-        logger.log(Level.FINE, "Reseting objects and invalidating state");
+        logger.log(Level.FINE, "Resetting objects and invalidating state");
         objManager.resetObjects();
         statistics.clearMemory();
         invalidateState();
@@ -1755,7 +1755,7 @@ public final class GLRenderer implements Renderer {
                 throw new IllegalStateException("Framebuffer object format is "
                         + "unsupported by the video hardware.");
             case GLFbo.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
-                throw new IllegalStateException("Framebuffer has erronous attachment.");
+                throw new IllegalStateException("Framebuffer has erroneous attachment.");
             case GLFbo.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
                 throw new IllegalStateException("Framebuffer doesn't have any renderbuffers attached.");
             case GLFbo.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
@@ -2401,7 +2401,7 @@ public final class GLRenderer implements Renderer {
                 }
                 break;
             default:
-                throw new UnsupportedOperationException("unrecongized texture type");
+                throw new UnsupportedOperationException("unrecognized texture type");
         }
     }
 

+ 1 - 1
jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java

@@ -351,7 +351,7 @@ final class TextureUtil {
         }
 
         if (src.getMipMapSizes() != null) {
-            throw new UnsupportedOperationException("Updating mip-mappped images is not supported");
+            throw new UnsupportedOperationException("Updating mip-mapped images is not supported");
         }
 
         if (src.getMultiSamples() > 1) {

+ 1 - 1
jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java

@@ -1021,7 +1021,7 @@ public class VertexBuffer extends NativeObject implements Savable, Cloneable {
             case Double:
                 return BufferUtils.createDoubleBuffer(total);
             default:
-                throw new UnsupportedOperationException("Unrecoginized buffer format: " + format);
+                throw new UnsupportedOperationException("Unrecognized buffer format: " + format);
         }
     }
 

+ 2 - 2
jme3-core/src/main/java/com/jme3/shader/Uniform.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2017 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -357,7 +357,7 @@ public class Uniform extends ShaderVariable {
                     try {
                         this.value = value.getClass().newInstance();
                     } catch (InstantiationException | IllegalAccessException e) {
-                        throw new IllegalArgumentException("Cannot instanciate param of class " + value.getClass().getCanonicalName());
+                        throw new IllegalArgumentException("Cannot instantiate param of class " + value.getClass().getCanonicalName());
                     }
                 }
                 //feed the pivot vec 4 with the correct value

+ 2 - 2
jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java

@@ -225,8 +225,8 @@ public class MaterialDebugAppState extends AbstractAppState {
             return null;
         }
 
-        Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.INFO, "Material succesfully reloaded");
-        //System.out.println("Material succesfully reloaded");
+        Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.INFO, "Material successfully reloaded");
+        //System.out.println("Material successfully reloaded");
         return dummy;
     }
    

+ 3 - 3
jme3-core/src/main/java/com/jme3/util/TangentBinormalGenerator.java

@@ -408,7 +408,7 @@ public class TangentBinormalGenerator {
                 break;
 
             default:
-                throw new UnsupportedOperationException("Unrecoginized buffer format: " + format);
+                throw new UnsupportedOperationException("Unrecognized buffer format: " + format);
         }
     }
     
@@ -440,7 +440,7 @@ public class TangentBinormalGenerator {
                 ((DoubleBuffer) buf1).put(d);              
                 break;                 
             default:
-                throw new UnsupportedOperationException("Unrecoginized buffer format: " + format);
+                throw new UnsupportedOperationException("Unrecognized buffer format: " + format);
         }
     }
     
@@ -557,7 +557,7 @@ public class TangentBinormalGenerator {
             
             boolean normalize = false;
             if (Math.abs(det) < ZERO_TOLERANCE) {
-                log.log(Level.WARNING, "Colinear uv coordinates for triangle "
+                log.log(Level.WARNING, "Collinear uv coordinates for triangle "
                         + "[{0}, {1}, {2}]; tex0 = [{3}, {4}], "
                         + "tex1 = [{5}, {6}], tex2 = [{7}, {8}]",
                         new Object[]{index[0], index[1], index[2],

+ 2 - 2
jme3-desktop/src/main/java/com/jme3/input/AWTInput.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ public class AWTInput implements Input {
 
     public void bind(final Component component) {
         this.component = component;
-        Objects.requireNonNull(this.component, "binded Component cannot be null");
+        Objects.requireNonNull(this.component, "bound Component cannot be null");
     }
 
     public void unbind() {

+ 1 - 1
jme3-examples/src/main/java/jme3test/opencl/TestContextSwitching.java

@@ -158,7 +158,7 @@ public class TestContextSwitching extends SimpleApplication implements ScreenCon
 
     @NiftyEventSubscriber(id="ApplyButton")
     public void onButton(String id, ButtonClickedEvent event) {
-        LOG.log(Level.INFO, "Change context: platorm={0}, device={1}", new Object[]{selectedPlatform, selectedDevice});
+        LOG.log(Level.INFO, "Change context: platform={0}, device={1}", new Object[]{selectedPlatform, selectedDevice});
         restart();
     }
     

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/base/DefaultClient.java

@@ -416,7 +416,7 @@ public class DefaultClient implements Client
         // If there are no listeners then close the connection with
         // a reason
         if( errorListeners.isEmpty() ) {
-            log.log( Level.SEVERE, "Termining connection due to unhandled error", t );
+            log.log( Level.SEVERE, "Terminating connection due to unhandled error", t );
             DisconnectInfo info = new DisconnectInfo();
             info.reason = "Connection Error";
             info.error = t;

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java

@@ -94,7 +94,7 @@ public class DefaultServer implements Server
     public DefaultServer( String gameName, int version, Kernel reliable, Kernel fast )
     {
         if( reliable == null )
-            throw new IllegalArgumentException( "Default server reqiures a reliable kernel instance." );
+            throw new IllegalArgumentException( "Default server requires a reliable kernel instance." );
             
         this.gameName = gameName;
         this.version = version;

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/base/KernelAdapter.java

@@ -231,7 +231,7 @@ public class KernelAdapter extends Thread
                 for( int i = 0; i < len; i++ ) {
                     sb.append( "[" + Integer.toHexString(data[i]) + "]" ); 
                 }
-                log.log( Level.FINE, "First 10 bytes of incomplete nessage:" + sb );         
+                log.log( Level.FINE, "First 10 bytes of incomplete message:" + sb );
                 throw new RuntimeException( "Envelope contained incomplete data:" + env );
             }                
         }            

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/kernel/AbstractKernel.java

@@ -73,7 +73,7 @@ public abstract class AbstractKernel implements Kernel
     {
         // Should really be queued up so the outer thread can
         // retrieve them.  For now we'll just log it.  FIXME
-        log.log( Level.SEVERE, "Unhanddled kernel error", e );
+        log.log( Level.SEVERE, "Unhandled kernel error", e );
     }
 
     protected void wakeupReader() {

+ 1 - 1
jme3-networking/src/main/java/com/jme3/network/service/rpc/RpcConnection.java

@@ -247,7 +247,7 @@ public class RpcConnection {
                     wait();                
                 }
             } catch( InterruptedException e ) {
-                throw new RuntimeException("Interrupted waiting for respone to:" + msg, e);
+                throw new RuntimeException("Interrupted waiting for response to:" + msg, e);
             }
             if( error != null ) {
                 throw new RuntimeException("Error calling remote procedure:" + msg + "\n" + error);

+ 1 - 1
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/RotationOrder.java

@@ -38,7 +38,7 @@ public enum RotationOrder {
 			return toQuat(x, Vector3f.UNIT_X, z, Vector3f.UNIT_Z, y, Vector3f.UNIT_Y);
 		case SPHERIC_XYZ:
 		default:
-			throw new IllegalArgumentException("Spheric rotation is unsupported in this importer");
+			throw new IllegalArgumentException("Spherical rotation is unsupported in this importer");
 		}
 	}
 	

+ 1 - 1
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/file/FbxReader.java

@@ -152,7 +152,7 @@ public class FbxReader {
 		if(encoding == 1)
 			data = inflate(data);
 		if(data.length != count * bytes)
-			throw new IOException("Wrong data lenght. Expected: " + count * bytes + ", got: " + data.length);
+			throw new IOException("Wrong data length. Expected: " + count * bytes + ", got: " + data.length);
 		ByteBuffer dis = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN);
 		switch(type) {
 		case 'f':

+ 1 - 1
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java

@@ -685,7 +685,7 @@ public class GltfLoader implements AssetLoader {
                 Float yfov = getAsFloat(camData, "yfov");
                 assertNotNull(yfov, "No yfov for perspective camera");
                 Float znear = getAsFloat(camData, "znear");
-                assertNotNull(znear, "No znear for perspective camere");
+                assertNotNull(znear, "No znear for perspective camera");
                 Float zfar = getAsFloat(camData, "zfar", znear * 1000f);
 
                 cam.setFrustumPerspective(yfov * FastMath.RAD_TO_DEG, aspectRatio, znear, zfar);

+ 1 - 1
jme3-plugins/src/main/java/com/jme3/scene/plugins/IrUtils.java

@@ -381,7 +381,7 @@ public final class IrUtils {
                 if (vertex.boneWeightsIndices != null) {
                     if (vertex.boneWeightsIndices.length > 4) {
                         throw new UnsupportedOperationException("Mesh uses more than 4 weights per bone. " +
-                                                                "Call trimBoneWeights() to allieviate this");
+                                                                "Call trimBoneWeights() to alleviate this");
                     }
                     for (int i = 0; i < vertex.boneWeightsIndices.length; i++) {
                         boneIndices.put((byte) (vertex.boneWeightsIndices[i].boneIndex & 0xFF));

+ 2 - 2
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/HillHeightMap.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ public class HillHeightMap extends AbstractHeightMap {
                     + "or minimum radius is greater than maximum radius, "
                     + "or power of flattening is below one");
         }
-        logger.fine("Contructing hill heightmap using seed: " + seed);
+        logger.fine("Constructing hill heightmap using seed: " + seed);
         this.size = size;
         this.seed = seed;
         this.iterations = iterations;

+ 2 - 2
jme3-vr/src/main/java/com/jme3/app/VREnvironment.java

@@ -415,7 +415,7 @@ public class VREnvironment {
     	} else if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE) {
     		viewmanager = new LWJGLOpenVRViewManager(this);
     	} else {
-    		logger.severe("Cannot instanciate view manager, unknown VRAPI type: "+vrBinding);
+    		logger.severe("Cannot instantiate view manager, unknown VRAPI type: "+vrBinding);
     	}
     }
     
@@ -465,7 +465,7 @@ public class VREnvironment {
             	
                 hardware = new OculusVR(this);
             	initialized = true;
-            	logger.config("Creating Occulus Rift wrapper [SUCCESS]");
+            	logger.config("Creating Oculus Rift wrapper [SUCCESS]");
             } else if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE) {
             	
             	guiManager   = new VRGuiManager(this);

+ 1 - 1
jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRInput.java

@@ -264,7 +264,7 @@ public class LWJGLOpenVRInput implements VRInputAPI {
             posStore[i] = new Vector3f();
             cStates[i] = VRControllerState.create();
             lastCallAxis[i] = new Vector2f();
-            logger.config("  Input " + (i + 1) + "/" + VR.k_unMaxTrackedDeviceCount + " binded.");
+            logger.config("  Input " + (i + 1) + "/" + VR.k_unMaxTrackedDeviceCount + " bound.");
         }
 
         return true;

+ 1 - 1
jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusVR.java

@@ -215,7 +215,7 @@ public class OculusVR implements VRAPI {
                 + "\t Resolution (total): " + resolutionW + "," + resolutionH);
 
         if (resolutionW == 0) {
-            LOGGER.severe("HMD witdth=0 : aborting");
+            LOGGER.severe("HMD width=0 : aborting");
             return false; // TODO fix memory leak - destroy() is not called
         }
 

+ 1 - 1
jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java

@@ -280,7 +280,7 @@ public class OpenVRInput implements VRInputAPI {
             lastCallAxis[i] = new Vector2f();
             needsNewVelocity[i] = true;
             needsNewAngVelocity[i] = true;
-            logger.config("  Input "+(i+1)+"/"+JOpenVRLibrary.k_unMaxTrackedDeviceCount+" binded.");
+            logger.config("  Input "+(i+1)+"/"+JOpenVRLibrary.k_unMaxTrackedDeviceCount+" bound.");
         }        
         
         return true;