JavaScript2Java Bridge picks a random method when ambiguous call happens in JS

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • fx2.1, 7-pool
    • Affects Version/s: fx2.1
    • Component/s: javafx
    • None
    • web

      JavaScript2Java Bridge picks a random method when ambiguous call happens on JavaScript side.

      I've experimented with the following class:
      public class MyClass {
        public int do(float a) {
         return 1;
        }
        public int do(double a) {
         return 2;
        }
      }

      When calling myClassObject.do(1.0) from JavaScript, a random "do" method is picked.
      This means that either "1.0" value is cast randomly to float or double, or a method is picked totally random disregarding parameter type.

            Assignee:
            Per Bothner (Inactive)
            Reporter:
            Irina Grineva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: