Skip to content

Commit

Permalink
Revert "Serial: Force Locale.ENGLISH for certain locales"
Browse files Browse the repository at this point in the history
Patch removed with updated jssc library ed78c4e
  • Loading branch information
tresf committed Aug 7, 2021
1 parent c8ef423 commit 8af0219
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/qz/utils/SerialUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.eclipse.jetty.websocket.api.Session;
import org.scijava.nativelib.NativeLibraryUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import qz.communication.SerialIO;
Expand All @@ -24,21 +23,8 @@
* @author Tres
*/
public class SerialUtilities {
private static final Logger log = LoggerFactory.getLogger(SerialUtilities.class);

// Detect possible bug with jssc
// TODO: Remove when https://github.com/java-native/jssc/issues/80 is fixed
static {
for(NativeLibraryUtil.Architecture arch : NativeLibraryUtil.Architecture.values()) {
String test = arch.name().toLowerCase();
String control = arch.name().toLowerCase(Locale.ENGLISH);
if(!test.equals(control)) {
log.warn("NativeLibraryUtil.Architecture value \"{}\" != \"{}\", setting Locale to Locale.ENGLISH per scijava/native-lib-loader#39", test, control);
Locale.setDefault(Locale.ENGLISH);
break;
}
}
}
private static final Logger log = LoggerFactory.getLogger(SerialUtilities.class);

private static final List<Integer> VALID_BAUD = Arrays.asList(SerialPort.BAUDRATE_110, SerialPort.BAUDRATE_300,
SerialPort.BAUDRATE_600, SerialPort.BAUDRATE_1200,
Expand Down

0 comments on commit 8af0219

Please sign in to comment.