diff --git a/java/src/processing/mode/java/JavaTextAreaPainter.java b/java/src/processing/mode/java/JavaTextAreaPainter.java index b9e2ad754..9a951647d 100644 --- a/java/src/processing/mode/java/JavaTextAreaPainter.java +++ b/java/src/processing/mode/java/JavaTextAreaPainter.java @@ -63,9 +63,7 @@ public class JavaTextAreaPainter extends PdeTextAreaPainter { // TWEAK MODE - protected int horizontalAdjustment = 0; - - public boolean tweakMode = false; + public boolean tweakMode; public List> handles; public List> 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); } diff --git a/java/src/processing/mode/java/RuntimePathBuilder.java b/java/src/processing/mode/java/RuntimePathBuilder.java index 2e04fd9d6..1ae5fafed 100644 --- a/java/src/processing/mode/java/RuntimePathBuilder.java +++ b/java/src/processing/mode/java/RuntimePathBuilder.java @@ -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 buildLibrarySketchPath(JavaMode mode, List imports, - Sketch sketch) { + protected List buildLibrarySketchPath(JavaMode mode, + List 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> cachedResult; - private RuntimePathFactoryStrategy innerStrategy; + final private AtomicReference> cachedResult; + final private RuntimePathFactoryStrategy innerStrategy; /** * Create a new cache around {RuntimePathFactoryStrategy}.