Typos in Spatial.java comments

Requesting permission to commit the following patch to jme3-core\src\main\java\com\jme3\scene\Spatial.java in ‘master’ …

--- HEAD
+++ Modified In Working Tree
@@ -345,7 +345,7 @@
      * <code>getWorldTranslation</code> retrieves the absolute translation of
      * the spatial.
      *
-     * @return the Spatial's world tranlsation vector.
+     * @return the Spatial's world translation vector.
      */
     public Vector3f getWorldTranslation() {
         checkDoTransformUpdate();
@@ -620,9 +620,9 @@
      * Removes the given control from this spatial's controls.
      * 
      * @param control The control to remove
-     * @return True if the control was successfuly removed. False if 
-     * the control is not assigned to this spatial.
-     * 
+     * @return True if the control was successfully removed. False if the
+     * control is not assigned to this spatial.
+     *
      * @see Spatial#addControl(com.jme3.scene.control.Control) 
      */
     public boolean removeControl(Control control) {
@@ -720,7 +720,7 @@
     }
 
     /**
-     * Convert a vector (in) from this spatials' local coordinate space to world
+     * Convert a vector (in) from this spatial's local coordinate space to world
      * coordinate space.
      *
      * @param in
@@ -736,7 +736,7 @@
     }
 
     /**
-     * Convert a vector (in) from world coordinate space to this spatials' local
+     * Convert a vector (in) from world coordinate space to this spatial's local
      * coordinate space.
      *
      * @param in
@@ -935,7 +935,8 @@
 
     /**
      * <code>addLight</code> adds the given light to the Spatial; causing
-     * all child Spatials to be effected by it.
+ all
+     * child Spatials to be affected by it.
      *
      * @param light The light to add.
      */
@@ -1044,8 +1045,8 @@
 
     /**
      * @see #setCullHint(CullHint)
-     * @return the cull mode of this spatial, or if set to CullHint.Inherit,
-     * the cullmode of it's parent.
+     * @return the cull mode of this spatial, or if set to CullHint.Inherit, the
+     * cull mode of its parent.
      */
     public CullHint getCullHint() {
         if (cullHint != CullHint.Inherit) {
@@ -1124,7 +1125,7 @@
     public abstract void setModelBound(BoundingVolume modelBound);
 
     /**
-     * @return The sum of all verticies under this Spatial.
+     * @return The sum of all vertices under this Spatial.
      */
     public abstract int getVertexCount();
 
@@ -1215,9 +1216,9 @@
     }
 
     /**
-     * @return Similar to Spatial.clone() except will create a deep clone
-     * of all geometry's meshes, normally this method shouldn't be used
-     * instead use Spatial.clone()
+     * @return Similar to Spatial.clone() except will create a deep clone of all
+     * geometries' meshes, normally this method shouldn't be used instead use
+     * Spatial.clone()
      *
      * @see Spatial#clone()
      */
1 Like

Yes, please. :slight_smile:

1 Like

For once those are not my typos :smiley:
Go ahead! thanks Stephen.

1 Like

nice catches. I also think there should also be a comma or semi-colon in the last changed sentence, after “used”

1 Like

I committed the change:

but all 1500+ lines were changed. Apparently I changed the line endings without meaning to.

Since I’m on a Windows PC, it’s difficult for me to see line endings. Can anyone tell what the line endings were before and after my commit?

On my development system,

$ git config core.autocrlf

returns ‘true’

I notice that my working copy of the project doesn’t seem to have a .gitattributes file. (I see a .gitignore file, so I believe I’m looking in the right place.)

Isn’t it possible to tell on windows
git to not change anything
netbeans ,whatever you use, to use utf8+linux file endings?

I’m using the JME3 IDE, which is based on NetBeans.

I just now discovered a “Show and change line endings” plugin for NetBeans and installed it:

http://plugins.netbeans.org/plugin/36810/show-and-change-line-endings

So what’s the standard for the jMonkeyEngine project? CRLF, CR, or LF?

@Empire Phoenix said: Isn't it possible to tell on windows git to not change anything netbeans ,whatever you use, to use utf8+linux file endings?

The correct approach is to always have unix style line endings in the repo and let the client convert to the local operating system. The issue is that we apparently have a lot of files in the repo that already have the wrong line endings (maybe because of poorly configured svn clients).

I mean, we could just “let anything go” but then unix people will constantly be dealing with random CRLF files, Windows will see some LF only files, etc. and it’s usually more painful than just doing it right in the first place.

2 Likes

I’ve re-pushed my change with Unix (LF-only) line endings, and I’ll be on the lookout for this issue going forward.

@sgold said: I've re-pushed my change with Unix (LF-only) line endings, and I'll be on the lookout for this issue going forward.

Do you have a link? I don’t see that commit… though admittedly I have no idea how anyone finds anything in the github web pages.

So I guess this was it:

…and seems to have had no changes which indicates that the previous commit was just correcting the normalization problem of our repo (for this file).

1 Like

That’s surprising. Could someone confirm this please?

Yes I can confirm.
Anyway don’t bother @sgold. The CRLF were wrong anyway before the typo fix change. You double fixed it.

1 Like

Thanks, @nehon!