@@ -514,7 +514,7 @@ public void setAlwaysOnTop(final boolean always) {
514514 *
515515 */
516516 protected void initIcons () {
517- IOUtil .ClassResources res = null ;
517+ IOUtil .ClassResources res ;
518518 if (PJOGL .icons == null || PJOGL .icons .length == 0 ) {
519519 // Default Processing icons
520520 final int [] sizes = {16 , 32 , 48 , 64 , 128 , 256 , 512 };
@@ -542,7 +542,7 @@ protected void initIcons() {
542542 @ SuppressWarnings ("resource" )
543543 private String resourceFilename (String filename ) {
544544 // The code below comes from PApplet.createInputRaw() with a few adaptations
545- InputStream stream = null ;
545+ InputStream stream ;
546546 try {
547547 // First see if it's in a data folder. This may fail by throwing
548548 // a SecurityException. If so, this whole block will be skipped.
@@ -1371,16 +1371,15 @@ void set() {
13711371 }
13721372
13731373 static Map <Integer , CursorInfo > cursors = new HashMap <>();
1374- static Map <Integer , String > cursorNames = new HashMap <>();
1375-
1376- static {
1377- cursorNames .put (PConstants .ARROW , "arrow" );
1378- cursorNames .put (PConstants .CROSS , "cross" );
1379- cursorNames .put (PConstants .WAIT , "wait" );
1380- cursorNames .put (PConstants .MOVE , "move" );
1381- cursorNames .put (PConstants .HAND , "hand" );
1382- cursorNames .put (PConstants .TEXT , "text" );
1383- }
1374+ static Map <Integer , String > cursorNames = Map .of (
1375+ PConstants .ARROW , "arrow" ,
1376+ PConstants .CROSS , "cross" ,
1377+ PConstants .WAIT , "wait" ,
1378+ PConstants .MOVE , "move" ,
1379+ PConstants .HAND , "hand" ,
1380+ PConstants .TEXT , "text"
1381+ );
1382+
13841383
13851384 @ Override
13861385 public void setCursor (int kind ) {
0 commit comments