File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
src/main/java/me/coley/recaf Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 33 <groupId >me.coley</groupId >
44 <artifactId >recaf</artifactId >
55 <url >https://github.com/Col-E/Recaf/</url >
6- <version >2.21.2 </version >
6+ <version >2.21.3 </version >
77 <name >Recaf</name >
88 <description >A modern java bytecode editor</description >
99 <!-- Variables -->
Original file line number Diff line number Diff line change 3131 * @author Matt
3232 */
3333public class Recaf {
34- public static final String VERSION = "2.21.2 " ;
34+ public static final String VERSION = "2.21.3 " ;
3535 public static final String DOC_URL = "https://col-e.github.io/Recaf-documentation/" ;
3636 public static final int ASM_VERSION = Opcodes .ASM9 ;
3737 private static Controller currentController ;
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public void setText(String text) {
104104 public Map <String , byte []> save (String name ) {
105105 if (!canCompile ())
106106 throw new UnsupportedOperationException ("Recompilation not supported in read-only mode" );
107- List <String > path = null ;
107+ List <String > path ;
108108 try {
109109 path = getClassPath ();
110110 } catch (IOException e ) {
@@ -135,12 +135,17 @@ public Map<String, byte[]> save(String name) {
135135 @ Override
136136 public void selectMember (String name , String desc ) {
137137 // Delay until analysis has run
138- while (code == null || (code .getUnit () == null && hasNoErrors ()))
138+ if (code == null ) {
139+ // Reschedule the check
139140 try {
140141 Thread .sleep (50 );
141- } catch (InterruptedException ex ) { /* ignored */ }
142+ } catch (Exception e ) { /* ignored */ }
143+ ThreadUtil .run (() -> selectMember (name , desc ));
144+ return ;
145+ }
146+
142147 // Select member if unit analysis was a success
143- if (code != null && code .getUnit () != null ) {
148+ if (code .getUnit () != null ) {
144149 // Jump to range if found
145150 Optional <Range > range = JavaParserUtil .getMemberRange (code .getUnit (), name , desc );
146151 if (range .isPresent ()) {
You can’t perform that action at this time.
0 commit comments