Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4c901a3

Browse files
committedFeb 19, 2023
clean up a few warnings
1 parent 4cf2348 commit 4c901a3

File tree

1 file changed

+6
-67
lines changed

1 file changed

+6
-67
lines changed
 

‎core/src/processing/core/PApplet.java

Lines changed: 6 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ void handleSettings() {
894894
// For Monterey, it appears to not be set until the user
895895
// has visited the Mission Control preference pane once.
896896
if (resultCode == 1 || "0".equals(processOutput)) {
897-
System.err.println("To use fullScreen(SPAN), visit System Preferences \u2192 Mission Control");
897+
System.err.println("To use fullScreen(SPAN), visit System Preferences Mission Control");
898898
System.err.println("and make sure that “Displays have separate spaces” is turned off.");
899899
System.err.println("Then log out and log back in.");
900900
}
@@ -1935,7 +1935,7 @@ protected PGraphics makeGraphics(int w, int h,
19351935
renderer = "JavaFX";
19361936
}
19371937
if (external) {
1938-
throw new RuntimeException("Please use Sketch \u2192 Import Library " +
1938+
throw new RuntimeException("Please use Sketch Import Library " +
19391939
"to add " + renderer + " to your sketch.");
19401940
} else {
19411941
throw new RuntimeException("The " + renderer +
@@ -3246,41 +3246,6 @@ static public int exec(StringList stdout, StringList stderr, String... args) {
32463246

32473247
Thread outThread = new LineThread(p.getInputStream(), stdout);
32483248
Thread errThread = new LineThread(p.getErrorStream(), stderr);
3249-
/*
3250-
final InputStream err = p.getErrorStream();
3251-
final InputStream out = p.getInputStream();
3252-
Thread outThread = new Thread(() -> {
3253-
ByteArrayOutputStream baos = new ByteArrayOutputStream();
3254-
String line;
3255-
try {
3256-
saveStream(baos, out);
3257-
BufferedReader err2 = createReader(new ByteArrayInputStream(baos.toByteArray()));
3258-
while ((line = err2.readLine()) != null) {
3259-
stdout.append(line);
3260-
}
3261-
} catch (IOException e) {
3262-
e.printStackTrace();
3263-
throw new RuntimeException(e);
3264-
}
3265-
});
3266-
outThread.start();
3267-
3268-
Thread errThread = new Thread(() -> {
3269-
ByteArrayOutputStream baos = new ByteArrayOutputStream();
3270-
String line;
3271-
try {
3272-
saveStream(baos, err);
3273-
BufferedReader err2 = createReader(new ByteArrayInputStream(baos.toByteArray()));
3274-
while ((line = err2.readLine()) != null) {
3275-
stderr.append(line);
3276-
}
3277-
} catch (IOException e) {
3278-
e.printStackTrace();
3279-
throw new RuntimeException(e);
3280-
}
3281-
});
3282-
errThread.start();
3283-
*/
32843249

32853250
try {
32863251
int result = p.waitFor();
@@ -3964,7 +3929,7 @@ static public void printArray(Object what) {
39643929
if (name.charAt(0) == '[') {
39653930
switch (name.charAt(1)) {
39663931
case '[' ->
3967-
// don't even mess with multi-dimensional arrays (case '[')
3932+
// don't even mess with multidimensional arrays (case '[')
39683933
// or anything else that's not int, float, boolean, char
39693934
System.out.println(what);
39703935
case 'L' -> {
@@ -6288,7 +6253,6 @@ static public PrintWriter createWriter(OutputStream output) {
62886253

62896254

62906255
/**
6291-
*
62926256
* This is a function for advanced programmers to open a Java InputStream.
62936257
* It's useful if you want to use the facilities provided by PApplet to
62946258
* easily open files from the data folder or from a URL, but want an
@@ -6356,6 +6320,7 @@ static public PrintWriter createWriter(OutputStream output) {
63566320
* @see PApplet#selectInput(String,String)
63576321
*
63586322
*/
6323+
@SuppressWarnings("JavadocLinkAsPlainText")
63596324
public InputStream createInput(String filename) {
63606325
InputStream input = createInputRaw(filename);
63616326
if (input != null) {
@@ -9984,6 +9949,7 @@ static public void runSketch(final String[] args,
99849949
param = args[argIndex].substring(0, equals);
99859950
value = args[argIndex].substring(equals + 1);
99869951

9952+
//noinspection EnhancedSwitchMigration
99879953
switch (param) {
99889954
case ARGS_EDITOR_LOCATION:
99899955
external = true;
@@ -10257,33 +10223,6 @@ private void deprecationWarning(String method) {
1025710223
}
1025810224

1025910225

10260-
// protected void createSurface() {
10261-
// surface = g.createSurface();
10262-
// if (surface == null) {
10263-
// System.err.println("This renderer needs to be updated for Processing 3");
10264-
// System.err.println("The createSurface() method returned null.");
10265-
// System.exit(1);
10266-
// }
10267-
// }
10268-
10269-
10270-
// /**
10271-
// * Return a Canvas object that can be embedded into other Java GUIs.
10272-
// * This is necessary because PApplet no longer subclasses Component.
10273-
// *
10274-
// * <pre>
10275-
// * PApplet sketch = new EmbedSketch();
10276-
// * Canvas canvas = sketch.getCanvas();
10277-
// * // add the canvas object to your project and validate() it
10278-
// * sketch.init() // start the animation thread
10279-
// */
10280-
// public Component getComponent() {
10281-
// g = createPrimaryGraphics();
10282-
// surface = g.createSurface();
10283-
// return surface.initComponent(this);
10284-
// }
10285-
10286-
1028710226
/** Convenience method, should only be called by PSurface subclasses. */
1028810227
static public void hideMenuBar() {
1028910228
if (platform == MACOS) {
@@ -10324,7 +10263,7 @@ static private String findFenster() {
1032410263

1032510264
/**
1032610265
* Get the display scaling for Windows by calling out to a helper app.
10327-
* https://github.com/processing/processing4/tree/master/build/windows/fenster
10266+
* More <a href="https://github.com/processing/processing4/tree/master/build/windows/fenster">here</a>.
1032810267
*/
1032910268
static private int getWindowsDPI() {
1033010269
String fensterPath = findFenster();

0 commit comments

Comments
 (0)
Please sign in to comment.