Skip to content

Commit

Permalink
java: standardize the explanations of explicit no-arg constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Mar 9, 2024
1 parent 9f3e508 commit 93b19bb
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 12 deletions.
7 changes: 5 additions & 2 deletions src/main/java/com/jme3/bullet/NativePhysicsObject.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023 jMonkeyEngine
* Copyright (c) 2020-2024 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -76,8 +76,11 @@ abstract public class NativePhysicsObject

/**
* Instantiate with no tracker and no assigned native object.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
protected NativePhysicsObject() { // to avoid a warning from JDK 18 javadoc
protected NativePhysicsObject() {
}
// *************************************************************************
// new methods exposed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ abstract public class PhysicsCollisionObject extends NativePhysicsObject {
/**
* Instantiate a collision object with no tracker and no assigned native
* object.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
protected PhysicsCollisionObject() { // avoid a warning from JDK 18 javadoc
protected PhysicsCollisionObject() {
}
// *************************************************************************
// new methods exposed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ abstract public class CollisionShape extends NativePhysicsObject {
/**
* Instantiate a collision shape with no tracker and no assigned native
* object.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
protected CollisionShape() { // to avoid a warning from JDK 18 javadoc
protected CollisionShape() {
}
// *************************************************************************
// new methods exposed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ abstract public class ConvexShape extends CollisionShape {
/**
* Instantiate a collision shape with no tracker and no assigned native
* object.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
protected ConvexShape() { // explicit to avoid a warning from JDK 18 javadoc
protected ConvexShape() {
}
// *************************************************************************
// new methods exposed
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/jme3/bullet/joints/PhysicsJoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ abstract public class PhysicsJoint extends NativePhysicsObject {

/**
* Instantiate a PhysicsJoint.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
protected PhysicsJoint() { // to avoid a warning from JDK 18 javadoc
protected PhysicsJoint() {
}
// *************************************************************************
// new methods exposed
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/jme3/bullet/objects/PhysicsBody.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023 jMonkeyEngine
* Copyright (c) 2019-2024 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -62,8 +62,11 @@ abstract public class PhysicsBody extends PhysicsCollisionObject {

/**
* Instantiate a PhysicsBody.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
protected PhysicsBody() { // explicit to avoid a warning from JDK 18 javadoc
protected PhysicsBody() {
}
// *************************************************************************
// new methods exposed
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/jme3/util/PrimitiveAllocator.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@
public final class PrimitiveAllocator implements BufferAllocator {
/**
* Instantiate an allocator.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
public PrimitiveAllocator() { // to avoid a warning from JDK 18 javadoc
public PrimitiveAllocator() {
}

/**
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/jme3utilities/debug/Describer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2013-2023, Stephen Gold
Copyright (c) 2013-2024 Stephen Gold
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -54,7 +54,10 @@ public class Describer implements Cloneable {
// constructors

/**
* A no-arg constructor to avoid javadoc warnings from JDK 18.
* Instantiate a Describer with the default separator.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
public Describer() {
// do nothing
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/jme3utilities/minie/PhysicsDescriber.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ public class PhysicsDescriber extends Describer {

/**
* Instantiate a describer with the default separator.
* <p>
* This no-arg constructor was made explicit to avoid javadoc warnings from
* JDK 18+.
*/
public PhysicsDescriber() { // to avoid a warning from JDK 18 javadoc
public PhysicsDescriber() {
}
// *************************************************************************
// new methods exposed
Expand Down

0 comments on commit 93b19bb

Please sign in to comment.