ZeroTurnaround Support Forum » JRebel Support

Reflection support fails to update method modifier flags if they are changed

(2 posts)
  • Started 2 years ago by getsharp
  • Latest reply from ekabanov

No tags yet.


  1. getsharp

    Member
    Posts: 1

    The following test code demonstrates the issue when changing the modifier of Class1.method1():

    public class Class1 {
    //	  private static int method1() {
    	  public static int method1() {
    	    return 10;
    	  }
    }
    
    import java.lang.reflect.Method;
    import java.lang.reflect.Modifier;
    
    public class Test {
    	public static void main(String[] args) throws Exception {
    		while (true) {
    			Method m = Class1.class.getDeclaredMethod("method1", new Class[] {});
    			System.out.println(Modifier.toString(m.getModifiers()));
    			Thread.sleep(500);
    		}
    	}
    }
    Posted 2 years ago #
  2. ekabanov

    LeadRebel
    Posts: 546

    Verified and due for fix by the next release.

    Posted 2 years ago #

RSS feed for this topic

Reply

(required)

(required)

(optional)

(required)

Allowed markup: a blockquote code em strong ul ol li.
Put code in between `backticks`.

Olark Livehelp