You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/10/09 01:38:04 UTC

DO NOT REPLY [Bug 31608] New: - Registry.convertValue doesn't support longs

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31608>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31608

Registry.convertValue doesn't support longs

           Summary: Registry.convertValue doesn't support longs
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Modeler
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: rainer.jung@kippdata.de


Hi,

please consider adding 3 lines to Registry.convertValue to support longs. The
method is used in Tomcats manager webapp (manager/jmxproxy) and many of tomcats
internal JMX parameters are longs and can therefore not yet been set via the
manager webapp.

The fix should be very simple, just change

        } else if( "java.lang.Integer".equals( type ) ||
                "int".equals( type )) {
            objValue=new Integer( value );
        } else if( "java.lang.Boolean".equals( type ) ||
                "boolean".equals( type )) {
            objValue=new Boolean( value );
        }

to

        } else if( "java.lang.Integer".equals( type ) ||
                "int".equals( type )) {
            objValue=new Integer( value );
        } else if( "java.lang.Long".equals( type ) ||
                "long".equals( type )) {
            objValue=new Long( value );
        } else if( "java.lang.Boolean".equals( type ) ||
                "boolean".equals( type )) {
            objValue=new Boolean( value );
        }

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org