Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properly deprecated everything #353

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public void reset()
* @deprecated Use {@link #compute(ControllerCoreCommandInterface)} instead, note that it also makes
* {@link #compute()} obsolete.
*/
@Deprecated
public void submitControllerCoreCommand(ControllerCoreCommandInterface controllerCoreCommand)
{
reset();
Expand Down Expand Up @@ -213,6 +214,7 @@ private void checkControlModeHandled()
* @deprecated Use {@link #compute(ControllerCoreCommandInterface)} instead, note that it also makes
* {@link #submitControllerCoreCommand(ControllerCoreCommandInterface)} obsolete.
*/
@Deprecated
public void compute()
{
controllerCoreComputeTimer.startMeasurement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public void removeCommand(int commandIndex)
* @return the last command.
* @deprecated this method should be removed and it is not really useful anyway.
*/
@Deprecated
public FeedbackControlCommand<?> pollCommand()
{
if (commandList.isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public InverseDynamicsCommand<?> getCommand(int commandIndex)
* @return the last command.
* @deprecated this method should be removed and it is not really useful anyway.
*/
@Deprecated
public InverseDynamicsCommand<?> pollCommand()
{
if (commandList.isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public InverseKinematicsCommand<?> getCommand(int commandIndex)
* @return the last command.
* @deprecated this method should be removed and it is not really useful anyway.
*/
@Deprecated
public InverseKinematicsCommand<?> pollCommand()
{
if (commandList.isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public VirtualModelControlCommand<?> getCommand(int commandIndex)
* @return the last command.
* @deprecated this method should be removed and it is not really useful anyway.
*/
@Deprecated
public VirtualModelControlCommand<?> pollCommand()
{
if (commandList.isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public void testComputeSideLengthFromSideSideAngle()
sideBLength = 1.0;
angleB = 0.8;
isAngleAObtuse = false;
assertTrue("Case 3 failed.", new Double(TriangleTools.computeSideLengthFromSideSideAngle(sideALength, sideBLength, angleB, isAngleAObtuse)).isNaN());
assertTrue("Case 3 failed.", Double.valueOf(TriangleTools.computeSideLengthFromSideSideAngle(sideALength, sideBLength, angleB, isAngleAObtuse)).isNaN());

// Case 4: Known angle < Pi/2 and adjacent side > opposite side and opposite side > height and angleA is acute
sideALength = 1.5;
Expand Down Expand Up @@ -496,14 +496,14 @@ public void testComputeSideLengthFromSideSideAngle()
sideBLength = 1.0;
angleB = 1.75;
isAngleAObtuse = false;
assertTrue("Case 7 failed.", new Double(TriangleTools.computeSideLengthFromSideSideAngle(sideALength, sideBLength, angleB, isAngleAObtuse)).isNaN());
assertTrue("Case 7 failed.", Double.valueOf(TriangleTools.computeSideLengthFromSideSideAngle(sideALength, sideBLength, angleB, isAngleAObtuse)).isNaN());

// Case 8: Known angle > Pi/2 and adjacent side > opposite side
sideALength = 1.5;
sideBLength = 1.0;
angleB = 1.75;
isAngleAObtuse = false;
assertTrue("Case 8 failed.", new Double(TriangleTools.computeSideLengthFromSideSideAngle(sideALength, sideBLength, angleB, isAngleAObtuse)).isNaN());
assertTrue("Case 8 failed.", Double.valueOf(TriangleTools.computeSideLengthFromSideSideAngle(sideALength, sideBLength, angleB, isAngleAObtuse)).isNaN());

// Random Testing
Random random = new Random(34534L);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void testDoubleBidirectionalCommunication() throws InterruptedException
@Test
public void testSerializabilityOfInteger() throws IOException
{
Integer integer = new Integer(2);
Integer integer = Integer.valueOf(2);
Assertions.assertSerializable(integer);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*
* @deprecated Replaced by ROS2BehaviorTreeExecutor
*/
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be covered by the Javadoc, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the warnings shown by the CI runner, it generates a warning for everywhere where deprecated is declared in the javadoc but not provided as an annotation.

public class BehaviorModule
{
private final BehaviorTreeMessage behaviorTreeMessage = new BehaviorTreeMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* This was intended to be an upgrade for the 2019 Atlas building exploration demo but never got used.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class BuildingExplorationBehavior extends ResettingNode implements Destroyable
{
private final BehaviorHelper helper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* an upgrade was planned but never finished.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class BuildingExplorationBehaviorOld extends ResettingNode implements Destroyable
{
private static final int UPDATE_RATE_MILLIS = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* A behavior tree layer on top of the door behavior that John wrote for Atlas.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class DoorBehavior extends ResettingNode implements Destroyable
{
private BehaviorHelper helper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* An attempt mostly in simulation to explore a building.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class ExploreAreaBehavior extends FallbackNode implements Destroyable
{
public static final double TICK_PERIOD = UnitConversions.hertzToSeconds(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
/**
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class FancyPosesBehavior extends LocalOnlyBehaviorTreeNodeExecutor implements Destroyable
{
private final BehaviorHelper helper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
/**
* @deprecated This class isn't currently used.
*/
@Deprecated
public class LookAndStepSupportRegionsPublisher
{
private ResettableExceptionHandlingExecutorService executor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* Used visibility graphs to walk through a maze.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class NavigationBehavior extends LocalOnlyBehaviorTreeNodeExecutor implements Destroyable
{
private static final Point3D goal = new Point3D(MAZE_CORRIDOR_SQUARE_SIZE * 4.0, MAZE_CORRIDOR_SQUARE_SIZE, 0.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* This also was used to walk to high and low big planar regions autonomously.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class PatrolBehavior extends LocalOnlyBehaviorTreeNodeExecutor
{
public enum PatrolBehaviorState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* stairs autonomously, I think we might be able to simplify it on Nadia.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class TraverseStairsBehavior extends ResettingNode
{
private static final int UPDATE_RATE_MILLIS = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* are good videos of it following Bhavyansh.
* @deprecated Not supported right now. Being kept for reference or revival.
*/
@Deprecated
public class TargetFollowingBehavior extends ResettingNode implements Destroyable
{
private final BehaviorHelper helper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @deprecated This class is kept only so that other code can stay compiling as
* we use it for reference in rewriting the behavior tree implementation.
*/
@Deprecated
public class BehaviorMessageTools
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*
* @deprecated Needs work
*/
@Deprecated
public class AlternateHeightMapUpdater
{
private final HeightMapParameters parameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/**
* @deprecated The lidar stuff is broken. What about implement a centralized LidarBufferBehavior that records lidar in an internal buffer.
*/
@Deprecated
public class ClearLidarBehavior extends AbstractBehavior
{
private final YoBoolean packetHasBeenSent = new YoBoolean("packetHasBeenSent" + behaviorName, registry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/**
* @deprecated Broken. See {@link ClearLidarBehavior}.
*/
@Deprecated
public class EnableLidarBehavior extends AbstractBehavior
{
private final YoBoolean packetHasBeenSent = new YoBoolean("packetHasBeenSent" + behaviorName, registry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @deprecated This is not working anymore. See {@link ClearLidarBehavior}.
*
*/
@Deprecated
public class SetLidarParametersBehavior extends AbstractBehavior
{
private final YoBoolean packetHasBeenSent = new YoBoolean("packetHasBeenSent" + behaviorName, registry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public ScriptFileSaver(File file, boolean overwriteExistingScript) throws IOExce
* @deprecated This method is highly inefficient. The whole scripting needs to be redone to better
* implement the transform.
*/
@Deprecated
public void recordObject(long timestamp, Object object, RigidBodyTransform objectTransform) throws IOException
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @author twan
* Date: 6/8/13
*/
@Deprecated
public enum HandConfiguration
{
@RosEnumValueDocumentation(documentation = "stops the fingers at their current position")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static RobotSide getFrontFootRobotSideFromFootsteps(SideDependentList<Foo
FramePoint3D footstepPosition = new FramePoint3D();
footSteps.get(side).getPosition(footstepPosition);
footstepPosition.changeFrame(worldFrame);
distances.set(side, new Double(footstepPosition.distanceSquared(destinationInWorld)));
distances.set(side, Double.valueOf(footstepPosition.distanceSquared(destinationInWorld)));
}

RobotSide frontSide = (distances.get(RobotSide.LEFT) <= distances.get(RobotSide.RIGHT)) ? RobotSide.LEFT : RobotSide.RIGHT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Use this message to request new planar regions
* @deprecated REA always publishes planar regions when running. To request REA to clear its internal state, see REAStateRequestMessage.
*/
@Deprecated
public class RequestPlanarRegionsListMessage extends Packet<RequestPlanarRegionsListMessage> implements Settable<RequestPlanarRegionsListMessage>, EpsilonComparable<RequestPlanarRegionsListMessage>
{
public static final byte SINGLE_UPDATE = (byte) 0;
Expand Down
6 changes: 3 additions & 3 deletions ihmc-java-toolkit/src/main/java/us/ihmc/tools/ArrayTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static double[] parseDoubleArray(String stringSource) throws IOException
StringTokenizer tokenizer = new StringTokenizer(line.replace("{", "").replace("}", "").replace(" ", "").replace(";", ""), ",");
while (tokenizer.hasMoreElements())
{
retArray.add(new Double(Double.parseDouble((String) tokenizer.nextElement())));
retArray.add(Double.valueOf(Double.parseDouble((String) tokenizer.nextElement())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would imagine this would be sufficient?

Suggested change
retArray.add(Double.valueOf(Double.parseDouble((String) tokenizer.nextElement())));
retArray.add(Double.parseDouble((String) tokenizer.nextElement()));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll probably shelve this PR and do anotehr pass on cleaning up deprecations. They make the build log a pain.


// retArray.add(new
// Double(Double.parseDouble(tokenizer.nextToken())));
Expand Down Expand Up @@ -79,7 +79,7 @@ public static double[] parseDoubleArrayFromMATLAB(String stringSource) throws IO
StringTokenizer tokenizer = new StringTokenizer(line.replace("[", "").replace("]", "").replace(" ", ""), ",");
while (tokenizer.hasMoreElements())
{
retArray.add(new Double(Double.parseDouble((String) tokenizer.nextElement())));
retArray.add(Double.valueOf(Double.parseDouble((String) tokenizer.nextElement())));

// retArray.add(new
// Double(Double.parseDouble(tokenizer.nextToken())));
Expand Down Expand Up @@ -135,7 +135,7 @@ public static int[] parseIntegerArray(String stringSource) throws IOException
",");
while (tokenizer.hasMoreElements())
{
retArray.add(new Integer(Integer.parseInt((String) tokenizer.nextElement())));
retArray.add(Integer.valueOf(Integer.parseInt((String) tokenizer.nextElement())));
}

int[] ret = new int[retArray.size()];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ public enum MadCatzFLY5StickMapping implements JoystickMapping
THROTTLE_LEFT,
THROTTLE_RIGHT,
/** @deprecated Not supported on Windows */
@Deprecated
THROTTLE_LOCK,
HAT,
THUMB_SCOLL_UP,
/** @deprecated Not identified on Linux */
@Deprecated
THUMB_SCOLL_DOWN,
STICK_ROLL,
STICK_PITCH,
Expand All @@ -38,6 +40,7 @@ public enum MadCatzFLY5StickMapping implements JoystickMapping
BUTTON_10,
BUTTON_11,
/** @deprecated Not identified on Linux */
@Deprecated
BASE_MODE_BUTTON;

public static final MadCatzFLY5StickMapping[] values = values();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public enum SaitekX52Mapping implements JoystickMapping
/** Mappings for Windows, Mac, Linux */
TRIGGER_PARITIAL,
/** @deprecated Only works on Windows and Mac */
@Deprecated
TRIGGER_FULL,
PINKY_TRIGGER,
SAFE_FIRE,
Expand All @@ -42,8 +43,10 @@ public enum SaitekX52Mapping implements JoystickMapping
BASE_SWITCH_CENTER_UP,
BASE_SWITCH_CENTER_DOWN,
/** @deprecated Only works on Windows and Mac */
@Deprecated
BASE_SWITCH_RIGHT_UP,
/** @deprecated Only works on Windows and Mac */
@Deprecated
BASE_SWITCH_RIGHT_DOWN,
STICK_PITCH,
STICK_ROLL,
Expand All @@ -53,18 +56,25 @@ public enum SaitekX52Mapping implements JoystickMapping
BIG_ROTARY_KNOB,
LITTLE_ROTARY_KNOB,
/** @deprecated Only works on Windows and Mac */
@Deprecated
FUNCTION,
/** @deprecated Only works on Linux */
@Deprecated
START_STOP,
/** @deprecated Only works on Linux */
@Deprecated
RESET,
/** @deprecated Only works on Linux */
@Deprecated
INFO,
/** @deprecated Only works on Linux */
@Deprecated
MOUSE_TOGGLE,
/** @deprecated Only works on Windows and Linux */
@Deprecated
NIPPLE_LEFT_RIGHT,
/** @deprecated Only works on Windows and Linux */
@Deprecated
NIPPLE_UP_DOWN,
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ public enum Thrustmaster16000M implements JoystickMapping
BASE_BUTTON_LEFT_SIDE_LOWER_CENTER,
BASE_BUTTON_LEFT_SIDE_LOWER_RIGHT,
/** @deprecated Only works on Windows and Mac */
@Deprecated
BASE_BUTTON_RIGHT_SIDE_UPPER_LEFT,
BASE_BUTTON_RIGHT_SIDE_UPPER_CENTER,
BASE_BUTTON_RIGHT_SIDE_UPPER_RIGHT,
/** @deprecated Only works on Windows and Mac */
@Deprecated
BASE_BUTTON_RIGHT_SIDE_LOWER_LEFT,
/** @deprecated Only works on Windows and Mac */
@Deprecated
BASE_BUTTON_RIGHT_SIDE_LOWER_CENTER,
BASE_BUTTON_RIGHT_SIDE_LOWER_RIGHT,
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ public enum XBoxOneMapping implements JoystickMapping
LEFT_STICK_BUTTON,
RIGHT_STICK_BUTTON,
/** @deprecated Only works on Windows and Linux */
@Deprecated
DPAD,
/** @deprecated Only works on Mac */
@Deprecated
DPAD_UP,
/** @deprecated Only works on Mac */
@Deprecated
DPAD_DOWN,
/** @deprecated Only works on Mac */
@Deprecated
DPAD_LEFT,
/** @deprecated Only works on Mac */
@Deprecated
DPAD_RIGHT,
SLIDER;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class StoredPropertySet implements StoredPropertySetBasics
private final String capitalizedClassName;
private WorkspaceResourceFile workspaceJSONFile;

private final Map<StoredPropertyKey, List<Runnable>> propertyChangedListeners = new HashMap<>();
private final Map<StoredPropertyKey<?>, List<Runnable>> propertyChangedListeners = new HashMap<>();
private final List<Notification> anyPropertyChangedListeners = new ArrayList<>();

public StoredPropertySet(StoredPropertyKeyList keys, Class<?> classForLoading)
Expand Down
Loading
Loading