axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: checking params
Date Fri, 07 Nov 2003 14:51:11 GMT

Matthew,

This sounds like a good change, could you submit a bug report with a patch?
http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/SubmitPatches

--
Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: Matthew Pocock [mailto:matthew_pocock@yahoo.co.uk] 
Sent: Friday, November 07, 2003 7:00 AM
To: axis-dev@ws.apache.org
Subject: checking params

Hi,

BaseSerializerFactory has a constructor that takes a class that will be 
used as the serializer class. It doesn't currently check that this class 
implements Serializer, which leads to the program falling over much 
later when the class is used. Could we add a check to the constructor to 
validate the argument? Does this need adding to BaseDeserializerFactory 
as well?

Matthew

public BaseSerializerFactory(Class serClass) {
    if(!Serializer.class.isAssignableFrom(serClass)) {
        throw new ClassCastException(serClass.getName() +
                " must implement " +
                Serializer.class.getName());
    }

    this.serClass = serClass;
}

Mime
View raw message