Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004246 [Quercus] major always 10-07-10 07:40 03-29-13 00:27
Reporter andrew_miah View Status public  
Assigned To domdorn
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.7
  Product Build
Summary 0004246: Invocation of java method, differing only by parameter type: enum versus integer, cannot resolve method.
Description Quercus could not resolve two methods which differ only by parameter, e.g.:

public void get( Long l );
public void get( MyEnum e );

Steps To Reproduce
Additional Information Exception:

java.lang.UnsupportedOperationException: class com.caucho.quercus.marshal.EnumMarshal
    at com.caucho.quercus.marshal.Marshal.getMarshalingCostImpl(Marshal.java:215)
    at com.caucho.quercus.marshal.Marshal.getMarshalingCost(Marshal.java:210)
    at com.caucho.quercus.env.JavaInvoker.getMarshalingCost(JavaInvoker.java:502)
    at com.caucho.quercus.env.JavaOverloadMethod.getBestFitJavaMethod(JavaOverloadMethod.java:231)
...
Attached Files  Bugs111010.zip [^] (640 bytes) 10-11-10 03:21

- Relationships

- Notes
(0004784)
domdorn
10-08-10 07:34

Could you please provide a small testcase?
ideal would be the following files
- MyEnum.java
- the class containing your get methods
- a small php file that shows how you are using the class


Thank you.
 
(0004789)
andrew_miah
10-11-10 03:21

Please find attached a simple example case.

BR,
Andrew.
 
(0005266)
domdorn
05-20-11 00:39

fixed in current trunk, will be in 4.0.19

php/0cs1

package qa;

public enum MyEnum {
A,B,C
}

public class Foo {

        public String get(Long id){

                return "L";
        }

        public String get(MyEnum id){
                return "E";
        }
}

<?php


import qa.MyEnum;
import qa.Foo;

$enum = MyEnum::A;
$longval = (int) 5;

var_dump($enum);
var_dump($longval);


$foo = new Foo();

echo $foo->get($enum);
echo "\n";

echo $foo->get($longval);
echo "\n";

?>

would result in

resource(A)
int(5)
E
L
 

- Issue History
Date Modified Username Field Change
10-07-10 07:40 andrew_miah New Issue
10-08-10 07:34 domdorn Note Added: 0004784
10-08-10 07:34 domdorn Status new => assigned
10-08-10 07:34 domdorn Assigned To  => domdorn
10-08-10 07:35 domdorn Status assigned => feedback
10-11-10 03:21 andrew_miah Note Added: 0004789
10-11-10 03:21 andrew_miah File Added: Bugs111010.zip
05-20-11 00:39 domdorn Status feedback => resolved
05-20-11 00:39 domdorn Resolution open => fixed
05-20-11 00:39 domdorn Note Added: 0005266
03-29-13 00:27 nam Status resolved => closed


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
35 total queries executed.
29 unique queries executed.
Powered by Mantis Bugtracker