Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kayahr committed Oct 8, 2018
1 parent a68a6f3 commit b0ef2ea
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ target
.classpath
.project
.idea
.vscode
*.iml
hs_err_*.log
2 changes: 1 addition & 1 deletion src/main/assembly/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ libusb4java-*.jar (The native libraries for the various platforms)
commons-lang3-*.jar (Apache Commons Lang library needed by usb4java)

If you don't want usb4java to extract the native libraries into a temporary
directoy on each program start then you might want to distribute them in
directory on each program start then you might want to distribute them in
extracted form with your application. Just make sure your classpath points
to the directory where you extracted the JARs.
9 changes: 4 additions & 5 deletions src/main/java/org/usb4java/DescriptorUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public final class DescriptorUtils
{
/** Mapping from USB class id to USB class name. */
private static final Map<Byte, String> CLASS_NAMES =
private static final Map<Byte, String> CLASS_NAMES =
new HashMap<Byte, String>();

static
Expand All @@ -35,8 +35,7 @@ public final class DescriptorUtils
CLASS_NAMES.put(LibUsb.CLASS_SMART_CARD, "Smart Card");
CLASS_NAMES.put(LibUsb.CLASS_CONTENT_SECURITY, "Content Security");
CLASS_NAMES.put(LibUsb.CLASS_VIDEO, "Video");
CLASS_NAMES.put(LibUsb.CLASS_PERSONAL_HEALTHCARE,
"Personal Healthcare");
CLASS_NAMES.put(LibUsb.CLASS_PERSONAL_HEALTHCARE, "Personal Healthcare");
CLASS_NAMES.put(LibUsb.CLASS_DIAGNOSTIC_DEVICE, "Diagnostic Device");
CLASS_NAMES.put(LibUsb.CLASS_WIRELESS, "Wireless");
CLASS_NAMES.put(LibUsb.CLASS_APPLICATION, "Application");
Expand Down Expand Up @@ -137,7 +136,7 @@ public static String dump(final DeviceDescriptor descriptor)
* @param product
* The product string or null if unknown.
* @param serial
* The serial number strsing or null if unknown.
* The serial number string or null if unknown.
* @return The descriptor dump.
*/
public static String dump(final DeviceDescriptor descriptor,
Expand Down Expand Up @@ -348,7 +347,7 @@ public static String getUsageTypeName(final byte bmAttributes)
return "Feedback";
case LibUsb.ISO_USAGE_TYPE_IMPLICIT:
return "Implicit Feedback Data";
case 3:
case 3:
// b11 is considered "Reserved" according to USB 3.0 spec.
return "Reserved";
default:
Expand Down
46 changes: 23 additions & 23 deletions src/main/java/org/usb4java/DeviceDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public long getPointer()
{
return this.deviceDescriptorPointer;
}

/**
* Returns the Java byte buffer which contains the descriptor structure.
*
* @return The descriptor structur buffer.
* @return The descriptor structure buffer.
*/
public ByteBuffer getBuffer()
{
Expand All @@ -72,104 +72,104 @@ public ByteBuffer getBuffer()

/**
* Returns the size of this descriptor (in bytes).
*
* @return The size of this descriptor (in bytes).
*
* @return The size of this descriptor (in bytes).
*/
public native byte bLength();

/**
* Returns the descriptor type. Will have value {@link LibUsb#DT_DEVICE}
* in this context.
*
* in this context.
*
* @return The descriptor type.
*/
public native byte bDescriptorType();

/**
* Returns the USB specification release number in binary-coded decimal.
* A value of 0x0200 indicates USB 2.0, 0x0110 indicates USB 1.1, etc.
*
*
* @return The USB specification release number.
*/
*/
public native short bcdUSB();

/**
* Returns the USB-IF class code for the device. See LibUSB.CLASS_*
* constants.
*
*
* @return The USB-IF class code.
*/
public native byte bDeviceClass();

/**
* Returns the USB-IF subclass code for the device, qualified by the
* Returns the USB-IF subclass code for the device, qualified by the
* bDeviceClass value.
*
*
* @return The USB-IF subclass code.
*/
*/
public native byte bDeviceSubClass();

/**
* Returns the USB-IF protocol code for the device, qualified by the
* Returns the USB-IF protocol code for the device, qualified by the
* bDeviceClass and bDeviceSubClass values.
*
*
* @return The USB-IF protocol code.
*/
public native byte bDeviceProtocol();

/**
* Returns the maximum packet size for endpoint 0.
*
*
* @return The maximum packet site for endpoint 0.
*/
public native byte bMaxPacketSize0();

/**
* Returns the USB-IF vendor ID.
*
*
* @return The vendor ID
*/
public native short idVendor();

/**
* Returns the USB-IF product ID.
*
*
* @return The product ID.
*/
public native short idProduct();

/**
* Returns the device release number in binary-coded decimal.
*
*
* @return The device release number.
*/
public native short bcdDevice();

/**
* Returns the index of the string descriptor describing manufacturer.
*
*
* @return The manufacturer string descriptor index.
*/
public native byte iManufacturer();

/**
* Returns the index of the string descriptor describing product.
*
*
* @return The product string descriptor index.
*/
public native byte iProduct();

/**
* Returns the index of the string descriptor containing device serial
* Returns the index of the string descriptor containing device serial
* number.
*
*
* @return The serial number string descriptor index.
*/
public native byte iSerialNumber();

/**
* Returns the number of possible configurations.
*
*
* @return The number of possible configurations.
*/
public native byte bNumConfigurations();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/usb4java/SsEndpointCompanionDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class SsEndpointCompanionDescriptor

/**
* Constructs a new descriptor which can be passed to the
* {@link LibUsb#getSsEndpointCompanionDescriptor(Context,
* {@link LibUsb#getSsEndpointCompanionDescriptor(Context,
* EndpointDescriptor, SsEndpointCompanionDescriptor)}
* method.
*/
Expand Down Expand Up @@ -144,7 +144,7 @@ public boolean equals(final Object obj)
return false;
}

final SsEndpointCompanionDescriptor other =
final SsEndpointCompanionDescriptor other =
(SsEndpointCompanionDescriptor) obj;

return new EqualsBuilder()
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/usb4java/DeviceListIteratorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void testNext()
* a {@link NoSuchElementException} when accessing elements after the end
*/
@Test(expected = NoSuchElementException.class)
public void testNextAfterend()
public void testNextAfterEnd()
{
assumeUsbTestsEnabled();
while (this.iterator.hasNext()) {
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/usb4java/DeviceListTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void testEquals()
LibUsb.freeDeviceList(b, true);
}
}

/**
* Tests the {@link DeviceList#hashCode()} method.
*/
Expand All @@ -95,7 +95,7 @@ public void testHashCode()
LibUsb.freeDeviceList(list, true);
}
}

/**
* Tests the {@link DeviceList#toString()} method
*/
Expand All @@ -115,7 +115,7 @@ public void testToString()
LibUsb.freeDeviceList(list, true);
}
}

/**
* Tests the {@link DeviceList#getPointer()} method
*/
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/usb4java/LibUsbDeviceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/
public class LibUsbDeviceTest
{
/** The libusb contxet. */
/** The libusb context. */
private Context context;

/** The device to run the tests on. */
Expand Down Expand Up @@ -785,7 +785,7 @@ private void validateInterfaceDescriptor(final InterfaceDescriptor desc)
}

/**
* Validates the specified endpoint desriptor.
* Validates the specified endpoint descriptor.
*
* @param desc
* The endpoint descriptor to validate.
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/usb4java/LibUsbGlobalTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
public class LibUsbGlobalTest
{
/** The libusb contxet. */
/** The libusb context. */
private Context context;

/**
Expand Down Expand Up @@ -63,6 +63,7 @@ public void tearDown()
* Tests the {@link LibUsb#setDebug(Context, int)} method.
*/
@Test
@Deprecated
public void testSetDebug()
{
assumeUsbTestsEnabled();
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/usb4java/LibUsbHotplugTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/**
* Tests the hotplug part of the {@link LibUsb} class.
*
*
* @author Klaus Reimer ([email protected])
*/
public class LibUsbHotplugTest
{
/** The libusb contxet. */
/** The libusb context. */
private Context context;

/**
Expand Down Expand Up @@ -95,7 +95,7 @@ public int processEvent(Context context, Device device,
}

/**
* Ensures that no hotplug event is fired when enumeration is deactived.
* Ensures that no hotplug event is fired when enumeration is deactivated.
* When no devices are connected then this test is pretty much useless but
* won't fail because of that.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/usb4java/TransferTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
public class TransferTest
{
/** The libusb contxet. */
/** The libusb context. */
private Context context;

/**
Expand Down
12 changes: 6 additions & 6 deletions src/test/java/org/usb4java/test/UsbAssume.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* USB-related assumptions.
*
*
* @author Klaus Reimer ([email protected])
*/
public class UsbAssume
Expand All @@ -25,16 +25,16 @@ public class UsbAssume

/** If TCK tests are to be executed. */
private static Boolean tckTests;

/**
* Check if USB tests are enabled.
*
*
* USB tests can be controlled with the system property USB_TESTS. When
* set to true then USB tests are always run, if set to false then they
* are never run. If this property is not set then the command-line tool
* lsusb is called. If this tool returned at least two lines of text then
* USB tests are enabled. In all other cases they are disabled.
*
*
* @return True if USB tests are enabled, false if not.
*/
public static boolean isUsbTestsEnabled()
Expand Down Expand Up @@ -86,7 +86,7 @@ public static boolean isUsbTestsEnabled()
* Assume that USB tests are enabled. Call this in the first line of
* tests method or preparation methods when you want to ignore the
* tests when the system is not able to run the tests anyway.
*
*
* USB tests can be controlled with the system property USB_TESTS. When
* set to true then USB tests are always run, if set to false then they
* are never run. If this property is not set then the command-line tool
Expand Down Expand Up @@ -117,7 +117,7 @@ public static void assumeHotplugAvailable()
* Assume that TCK tests are enabled. Call this in the first line of
* tests method or preparation methods when you want to ignore the
* tests when the system is not able to run the TCK tests anyway.
*
*
* TCK tests can be controlled with the system property TCK_TESTS. When
* set to true then TCK tests are always run, if set to false then they
* are never run. If this property is not set then the command-line tool
Expand Down

0 comments on commit b0ef2ea

Please sign in to comment.