Skip to content

Commit 587152e

Browse files
committed
Fix typos
1 parent 57daf35 commit 587152e

23 files changed

+619
-621
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ target
33
.classpath
44
.project
55
.idea
6+
.vscode
67
*.iml
78
hs_err_*.log

src/main/assembly/README.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ usb4java-javax.jar (The usb4java extension for javax-usb)
1010
usb-api-*.jar (The javax-usb API library)
1111

1212
This is just an extension for the usb4java library so you also need the
13-
usb4java main library and the libusb4java native librarie. See
13+
usb4java main library and the libusb4java native libraries. See
1414
http://usb4java.org/ for details.
15-

src/main/java/org/usb4java/javax/AbstractDevice.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
/**
4040
* A Usb device.
41-
*
41+
*
4242
* @author Klaus Reimer (k@ailis.de)
4343
*/
4444
abstract class AbstractDevice implements UsbDevice
@@ -86,7 +86,7 @@ abstract class AbstractDevice implements UsbDevice
8686

8787
/**
8888
* Constructs a new device.
89-
*
89+
*
9090
* @param manager
9191
* The USB device manager which is responsible for this device.
9292
* @param id
@@ -128,7 +128,7 @@ abstract class AbstractDevice implements UsbDevice
128128
if (result < 0)
129129
{
130130
throw ExceptionUtils.createPlatformException(
131-
"Unable to get configuation " + i + " for device " + id,
131+
"Unable to get configuration " + i + " for device " + id,
132132
result);
133133
}
134134
try
@@ -150,11 +150,11 @@ abstract class AbstractDevice implements UsbDevice
150150
final ConfigDescriptor configDescriptor = new ConfigDescriptor();
151151
final int result =
152152
LibUsb.getActiveConfigDescriptor(device, configDescriptor);
153-
153+
154154
// ERROR_NOT_FOUND is returned when device is in unconfigured state.
155155
// On OSX it may return INVALID_PARAM in this case because of a bug
156156
// in libusb
157-
if (result == LibUsb.ERROR_NOT_FOUND ||
157+
if (result == LibUsb.ERROR_NOT_FOUND ||
158158
result == LibUsb.ERROR_INVALID_PARAM)
159159
{
160160
this.activeConfigurationNumber = 0;
@@ -167,15 +167,15 @@ else if (result < 0)
167167
}
168168
else
169169
{
170-
this.activeConfigurationNumber =
170+
this.activeConfigurationNumber =
171171
configDescriptor.bConfigurationValue();
172172
LibUsb.freeConfigDescriptor(configDescriptor);
173173
}
174174
}
175175

176176
/**
177177
* Returns the device id.
178-
*
178+
*
179179
* @return The device id.
180180
*/
181181
public final DeviceId getId()
@@ -185,7 +185,7 @@ public final DeviceId getId()
185185

186186
/**
187187
* Returns the parent device id.
188-
*
188+
*
189189
* @return The parent device id or null of there is no parent.
190190
*/
191191
public final DeviceId getParentId()
@@ -195,7 +195,7 @@ public final DeviceId getParentId()
195195

196196
/**
197197
* Ensures the device is connected.
198-
*
198+
*
199199
* @throws UsbDisconnectedException
200200
* When device is disconnected.
201201
*/
@@ -207,7 +207,7 @@ final void checkConnected()
207207
/**
208208
* Opens the USB device and returns the USB device handle. If device was
209209
* already open then the old handle is returned.
210-
*
210+
*
211211
* @return The USB device handle.
212212
* @throws UsbException
213213
* When USB device could not be opened.
@@ -258,7 +258,7 @@ public final UsbPort getParentUsbPort()
258258
/**
259259
* Sets the parent USB port. If port is unset then a usbDeviceDetached event
260260
* is send.
261-
*
261+
*
262262
* @param port
263263
* The port to set. Null to unset.
264264
*/
@@ -364,7 +364,7 @@ public final byte getActiveUsbConfigurationNumber()
364364

365365
/**
366366
* Sets the active USB configuration.
367-
*
367+
*
368368
* @param number
369369
* The number of the USB configuration to activate.
370370
* @throws UsbException
@@ -389,7 +389,7 @@ final void setActiveUsbConfigurationNumber(final byte number)
389389

390390
/**
391391
* Claims the specified interface.
392-
*
392+
*
393393
* @param number
394394
* The number of the interface to claim.
395395
* @param force
@@ -435,7 +435,7 @@ final void claimInterface(final byte number, final boolean force)
435435

436436
/**
437437
* Releases a claimed interface.
438-
*
438+
*
439439
* @param number
440440
* The number of the interface to release.
441441
* @throws UsbException
@@ -471,7 +471,7 @@ final void releaseInterface(final byte number) throws UsbException
471471

472472
/**
473473
* Checks if the specified interface is claimed.
474-
*
474+
*
475475
* @param number
476476
* The number of the interface to check.
477477
* @return True if interface is claimed, false if not.
@@ -528,7 +528,7 @@ public final String getString(final byte index) throws UsbException,
528528

529529
/**
530530
* Returns the languages the specified device supports.
531-
*
531+
*
532532
* @return Array with supported language codes. Never null. May be empty.
533533
* @throws UsbException
534534
* When string descriptor languages could not be read.
@@ -605,7 +605,7 @@ public final void asyncSubmit(final List list)
605605
}
606606

607607
@Override
608-
public final UsbControlIrp createUsbControlIrp(final byte bmRequestType,
608+
public final UsbControlIrp createUsbControlIrp(final byte bmRequestType,
609609
final byte bRequest, final short wValue, final short wIndex)
610610
{
611611
return new DefaultUsbControlIrp(bmRequestType, bRequest, wValue,
@@ -623,7 +623,7 @@ public final void removeUsbDeviceListener(final UsbDeviceListener listener)
623623
{
624624
this.listeners.remove(listener);
625625
}
626-
626+
627627
@Override
628628
public final String toString()
629629
{

src/test/java/javax/usb/tck/BulkIOTestwithSynchronizedUsbPipe.java renamed to src/test/java/javax/usb/tck/BulkIOTestWithSynchronizedUsbPipe.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
* of the Common Public License:
77
* http://oss.software.ibm.com/developerworks/opensource/license-cpl.html
88
*/
9-
9+
1010
package javax.usb.tck;
11-
11+
1212
import java.util.*;
13-
13+
1414
import javax.usb.*;
1515
import javax.usb.util.*;
1616

1717
import org.junit.runner.RunWith;
1818

1919
import org.usb4java.javax.test.TCKRunner;
20-
20+
2121
import junit.framework.*;
22-
22+
2323
/**
2424
* Bulk IO Test -- Synchronous and asynchronous byte[], IRP, and IRP List submissions
2525
* using UsbUtil.synchronizedUsbPipe
@@ -31,11 +31,11 @@
3131
*
3232
* @author Leslie Blair
3333
*/
34-
34+
3535

3636
@SuppressWarnings("all")
3737
@RunWith(TCKRunner.class)
38-
public class BulkIOTestwithSynchronizedUsbPipe extends TestCase
38+
public class BulkIOTestWithSynchronizedUsbPipe extends TestCase
3939
{
4040
public void setUp() throws Exception
4141
{
@@ -55,13 +55,13 @@ public void tearDown() throws Exception
5555
IOMethods.releaseListOfPipes(usbPipeListNotSynchronized);
5656
super.tearDown();
5757
}
58-
58+
5959
public void testByteArray_BuffersMultiplesOfMaxPacketSize_maxPacketSizeOf8bytes_buffer8bytes_passthrough()
6060
{
6161
BulkIOTests thisTest = new BulkIOTests(usbDevice, usbPipeListGlobal, endpointType);
6262
thisTest.testByteArray_BuffersMultiplesOfMaxPacketSize_maxPacketSizeOf8bytes_buffer8bytes_passthrough();
6363
};
64-
64+
6565
public void testByteArray_BuffersMultiplesOfMaxPacketSize_maxPacketSizeOf8bytes_buffer16bytes_invertBits()
6666
{
6767
BulkIOTests thisTest = new BulkIOTests(usbDevice, usbPipeListGlobal, endpointType);
@@ -104,7 +104,7 @@ public void testSingleIRP_BuffersMultiplesOfMaxPacketSize_maxPacketSizeOf8bytes_
104104
{
105105
BulkIOTests thisTest = new BulkIOTests(usbDevice, usbPipeListGlobal, endpointType);
106106
thisTest.testSingleIRP_BuffersMultiplesOfMaxPacketSize_maxPacketSizeOf8bytes_buffer64bytes_passthrough();
107-
107+
108108
};
109109
// TODO Disabled because 64 byte packet size not supported by test firmware
110110
public void disabled_testSingleIRP_BuffersNOTMultiplesOfMaxPacketSize_maxPacketSizeOf64bytes_buffer25bytes_invertBits()
@@ -117,7 +117,7 @@ public void disabled_testSingleIRP_BuffersNOTMultiplesOfMaxPacketSize_maxPacketS
117117
{
118118
BulkIOTests thisTest = new BulkIOTests(usbDevice, usbPipeListGlobal, endpointType);
119119
thisTest.disabled_testSingleIRP_BuffersNOTMultiplesOfMaxPacketSize_maxPacketSizeOf64bytes_buffer72bytes_invertAltBits();
120-
120+
121121
};
122122
// TODO Disabled because 64 byte packet size not supported by test firmware
123123
public void disabled_testSingleIRP_BuffersNOTMultiplesOfMaxPacketSize_maxPacketSizeOf64bytes_buffer130bytes_passthrough()
@@ -136,13 +136,13 @@ public void disabled_testIRPListBuffersNOTMultiplesOfMaxPacketSizeOf64bytes()
136136
BulkIOTests thisTest = new BulkIOTests(usbDevice, usbPipeListGlobal, endpointType);
137137
thisTest.disabled_testIRPListBuffersNOTMultiplesOfMaxPacketSizeOf64bytes();
138138
};
139-
140-
141-
139+
140+
141+
142142
private List usbPipeListGlobal = new ArrayList();
143143
private List usbPipeListNotSynchronized = new ArrayList();
144144
private byte endpointType;
145145
private UsbDevice usbDevice;
146-
147-
146+
147+
148148
}

src/test/java/javax/usb/tck/ConstantsTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void testUsbConstants()
147147
constCompare(UsbConst.REQUESTTYPE_DIRECTION_IN, TCK_REQTYPE_DIR_IN, "UsbConst.REQUESTTYPE_DIRECTION_IN is not equal to TCK_REQTYPE_DIR_IN");
148148
constCompare(UsbConst.REQUESTTYPE_DIRECTION_OUT, TCK_REQTYPE_DIR_OUT, "UsbConst.REQUESTTYPE_DIRECTION_OUT is not equal to TCK_REQTYPE_DIR_OUT");
149149
constCompare(UsbConst.REQUESTTYPE_TYPE_MASK, TCK_REQTYPE_TYPE_MASK, "UsbConst.REQUESTTYPE_TYPE_MASK is not equal to TCK_REQTYPE_TYPE_MASK");
150-
constCompare(UsbConst.REQUESTTYPE_TYPE_STANDARD, TCK_REQTYPE_TYPE_STD, "UsbConst.REQUESTYPE_TYPE_STANDARD is not equal to TCK_REQTYPE_TYPE_STD");
150+
constCompare(UsbConst.REQUESTTYPE_TYPE_STANDARD, TCK_REQTYPE_TYPE_STD, "UsbConst.REQUESTTYPE_TYPE_STANDARD is not equal to TCK_REQTYPE_TYPE_STD");
151151
constCompare(UsbConst.REQUESTTYPE_TYPE_CLASS, TCK_REQTYPE_TYPE_CLASS, "UsbConst.REQUESTTYPE_TYPE_CLASS is not equal to TCK_REQTYPE_TYPE_CLASS"); constCompare(UsbConst.REQUESTTYPE_TYPE_VENDOR, TCK_REQTYPE_TYPE_VENDOR, "UsbConst.REQUESTTYPE_TYPE_VENDOR is not equal to TCK_REQTYPE_TYPE_VENDOR");
152152
constCompare(UsbConst.REQUESTTYPE_TYPE_RESERVED, TCK_REQTYPE_TYPE_RESRVD, "UsbConst.REQUESTTYPE_TYPE_RESERVED is not equal to TCK_REQTYPE_TYPE_RESRVD");
153153
constCompare(UsbConst.REQUESTTYPE_RECIPIENT_MASK, TCK_REQTYPE_RECEIP_MASK, "UsbConst.REQUESTTYPE_RECIPIENT_MASK is not equal to TCK_REQTYPE_RECEIP_MASK");
@@ -200,4 +200,3 @@ private void strCompare(String first, String second, String text)
200200
}
201201

202202
}
203-

0 commit comments

Comments
 (0)