Skip to content

Commit

Permalink
Specify local for lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
lessthanoptimal committed Feb 5, 2024
1 parent bc8155b commit a7572bd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
5 changes: 3 additions & 2 deletions applications/src/main/java/boofcv/app/BaseFiducialSquare.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -28,6 +28,7 @@
import org.kohsuke.args4j.Option;

import java.io.IOException;
import java.util.Locale;

/**
* <p>
Expand Down Expand Up @@ -163,7 +164,7 @@ private void getFileTypeFromFileName() {
fileType = "pdf";
fileName += ".pdf";
}
fileType = fileType.toLowerCase();
fileType = fileType.toLowerCase(Locale.ENGLISH);
}

private static void failExit( String message ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -35,6 +35,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Objects;

/**
Expand Down Expand Up @@ -210,7 +211,7 @@ private void getFileTypeFromFileName() {
fileType = "pdf";
fileName += ".pdf";
}
fileType = fileType.toLowerCase();
fileType = fileType.toLowerCase(Locale.ENGLISH);
}

public static void main( String[] args ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -37,6 +37,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Objects;

/**
Expand Down Expand Up @@ -225,7 +226,7 @@ private void getFileTypeFromFileName() {
fileType = "pdf";
fileName += ".pdf";
}
fileType = fileType.toLowerCase();
fileType = fileType.toLowerCase(Locale.ENGLISH);
}

public static void main( String[] args ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -36,6 +36,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Objects;

/**
Expand Down Expand Up @@ -201,7 +202,7 @@ private void getFileTypeFromFileName() {
fileType = "pdf";
fileName += ".pdf";
}
fileType = fileType.toLowerCase();
fileType = fileType.toLowerCase(Locale.ENGLISH);
}

public static void main( String[] args ) {
Expand Down
5 changes: 3 additions & 2 deletions applications/src/main/java/boofcv/app/MeshViewerApp.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Peter Abeles. All Rights Reserved.
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -31,6 +31,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Locale;

/**
* Very simple app for opening and viewing a 3D mesh
Expand All @@ -46,7 +47,7 @@ private static void loadFile( File file ) {
// Load the mesh
var mesh = new VertexMesh();
var colors = new DogArray_I32();
String extension = FilenameUtils.getExtension(file.getName()).toLowerCase();
String extension = FilenameUtils.getExtension(file.getName()).toLowerCase(Locale.ENGLISH);
var type = switch (extension) {
case "ply" -> PointCloudIO.Format.PLY;
case "stl" -> PointCloudIO.Format.STL;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -39,6 +39,7 @@
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.List;
import java.util.Locale;

/**
* Generates the fiducial PDF Document
Expand Down Expand Up @@ -272,7 +273,7 @@ public void sendToPrinter() {

public void saveToDisk( String documentName ) throws IOException {
// ensure that it has the correct suffix
if (!documentName.toLowerCase().endsWith(".pdf")) {
if (!documentName.toLowerCase(Locale.ENGLISH).endsWith(".pdf")) {
documentName += ".pdf";
}

Expand Down

0 comments on commit a7572bd

Please sign in to comment.