more code tidying

This commit is contained in:
Ben Fry
2021-06-28 07:18:19 -04:00
parent e2fdd1b6dd
commit 3f630c077a
2 changed files with 12 additions and 12 deletions

View File

@@ -63,9 +63,7 @@ public class JavaTextAreaPainter extends PdeTextAreaPainter {
// TWEAK MODE
protected int horizontalAdjustment = 0;
public boolean tweakMode = false;
public boolean tweakMode;
public List<List<Handle>> handles;
public List<List<ColorControlBox>> colorBoxes;
@@ -310,7 +308,7 @@ public class JavaTextAreaPainter extends PdeTextAreaPainter {
static private String replaceString(String str, int start, int end, String put) {
return str.substring(0, start) + put + str.substring(end, str.length());
return str.substring(0, start) + put + str.substring(end);
}

View File

@@ -69,6 +69,7 @@ public class RuntimePathBuilder {
/**
* The modules comprising the Java standard modules.
*/
@SuppressWarnings("SpellCheckingInspection")
protected static final String[] STANDARD_MODULES = {
"java.base.jmod",
"java.compiler.jmod",
@@ -445,17 +446,18 @@ public class RuntimePathBuilder {
* @param sketch The sketch provided by the user.
* @return List of classpath and/or module path entries.
*/
protected List<String> buildLibrarySketchPath(JavaMode mode, List<ImportStatement> imports,
Sketch sketch) {
protected List<String> buildLibrarySketchPath(JavaMode mode,
List<ImportStatement> imports,
Sketch sketch) {
StringJoiner classPathBuilder = new StringJoiner(File.pathSeparator);
imports.stream()
.map(ImportStatement::getPackageName)
.filter(pckg -> !isIgnorableForSketchPath(pckg))
.map(pckg -> {
.filter(pkg -> !isIgnorableForSketchPath(pkg))
.map(pkg -> {
try {
return mode.getLibrary(pckg);
return mode.getLibrary(pkg);
} catch (SketchException e) {
return null;
}
@@ -604,7 +606,7 @@ public class RuntimePathBuilder {
*
* Note that these are protected so that they can be tested. The interface below defines a
* strategy for determining path elements. An optional caching object which allows for path
* invalidatino is also defined below.
* invalidation is also defined below.
*/
/**
@@ -641,8 +643,8 @@ public class RuntimePathBuilder {
*/
protected static class CachedRuntimePathFactory implements RuntimePathFactoryStrategy {
private AtomicReference<List<String>> cachedResult;
private RuntimePathFactoryStrategy innerStrategy;
final private AtomicReference<List<String>> cachedResult;
final private RuntimePathFactoryStrategy innerStrategy;
/**
* Create a new cache around {RuntimePathFactoryStrategy}.