You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cr...@locus.apache.org on 2000/04/02 22:39:57 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core Context.java
craigmcc 00/04/02 13:39:57
Modified: src/share/org/apache/tomcat/core Context.java
Log:
Add a string-valued setter for debug level (although the property setting
logic in XmlMapper should really be enhanced to deal with this kind of
thing.)
PR:163
Submitted by: sim@nyx.xs4all.nl
Revision Changes Path
1.76 +8 -0 jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
Index: Context.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- Context.java 2000/03/29 23:31:04 1.75
+++ Context.java 2000/04/02 20:39:57 1.76
@@ -585,6 +585,14 @@
debug=level;
}
+ public void setDebug( String level ) {
+ try {
+ setDebug( Integer.parseInt(level) );
+ } catch (Exception e) {
+ log("Set debug to '" + level + "':", e);
+ }
+ }
+
public int getDebug( ) {
return debug;
}
Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core
Context.java
Posted by Costin Manolache <co...@eng.sun.com>.
Very strange bug....
setDebug( int ) should work, but regardless of that - it shouldn't throw InvocationException
anyway.
It tested with non-int properties, and it still work ( ignores invalid strings).
Costin
"Craig R. McClanahan" wrote:
> Bug #161 has a stack trace from this if you want to look at it.
>
> Costin Manolache wrote:
>
> > What's wrong with setDebug( int )????
> >
> > XmlMapper does deal with that ( and setting boolean too ) - and I use this every day,
> > never had a problem. Of course, adding the string method doesn't hurt, but if we have a
> > problem with XmlMapper setting int properties I would rather fix the real problem.
> >
> > Costin
> >
> > craigmcc@locus.apache.org wrote:
> >
> > > craigmcc 00/04/02 13:39:57
> > >
> > > Modified: src/share/org/apache/tomcat/core Context.java
> > > Log:
> > > Add a string-valued setter for debug level (although the property setting
> > > logic in XmlMapper should really be enhanced to deal with this kind of
> > > thing.)
> > > PR:163
> > > Submitted by: sim@nyx.xs4all.nl
> > >
> > > Revision Changes Path
> > > 1.76 +8 -0 jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
> > >
> > > Index: Context.java
> > > ===================================================================
> > > RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
> > > retrieving revision 1.75
> > > retrieving revision 1.76
> > > diff -u -r1.75 -r1.76
> > > --- Context.java 2000/03/29 23:31:04 1.75
> > > +++ Context.java 2000/04/02 20:39:57 1.76
> > > @@ -585,6 +585,14 @@
> > > debug=level;
> > > }
> > >
> > > + public void setDebug( String level ) {
> > > + try {
> > > + setDebug( Integer.parseInt(level) );
> > > + } catch (Exception e) {
> > > + log("Set debug to '" + level + "':", e);
> > > + }
> > > + }
> > > +
> > > public int getDebug( ) {
> > > return debug;
> > > }
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core
Context.java
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Bug #161 has a stack trace from this if you want to look at it.
Costin Manolache wrote:
> What's wrong with setDebug( int )????
>
> XmlMapper does deal with that ( and setting boolean too ) - and I use this every day,
> never had a problem. Of course, adding the string method doesn't hurt, but if we have a
> problem with XmlMapper setting int properties I would rather fix the real problem.
>
> Costin
>
> craigmcc@locus.apache.org wrote:
>
> > craigmcc 00/04/02 13:39:57
> >
> > Modified: src/share/org/apache/tomcat/core Context.java
> > Log:
> > Add a string-valued setter for debug level (although the property setting
> > logic in XmlMapper should really be enhanced to deal with this kind of
> > thing.)
> > PR:163
> > Submitted by: sim@nyx.xs4all.nl
> >
> > Revision Changes Path
> > 1.76 +8 -0 jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
> >
> > Index: Context.java
> > ===================================================================
> > RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
> > retrieving revision 1.75
> > retrieving revision 1.76
> > diff -u -r1.75 -r1.76
> > --- Context.java 2000/03/29 23:31:04 1.75
> > +++ Context.java 2000/04/02 20:39:57 1.76
> > @@ -585,6 +585,14 @@
> > debug=level;
> > }
> >
> > + public void setDebug( String level ) {
> > + try {
> > + setDebug( Integer.parseInt(level) );
> > + } catch (Exception e) {
> > + log("Set debug to '" + level + "':", e);
> > + }
> > + }
> > +
> > public int getDebug( ) {
> > return debug;
> > }
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core
Context.java
Posted by Costin Manolache <co...@eng.sun.com>.
What's wrong with setDebug( int )????
XmlMapper does deal with that ( and setting boolean too ) - and I use this every day,
never had a problem. Of course, adding the string method doesn't hurt, but if we have a
problem with XmlMapper setting int properties I would rather fix the real problem.
Costin
craigmcc@locus.apache.org wrote:
> craigmcc 00/04/02 13:39:57
>
> Modified: src/share/org/apache/tomcat/core Context.java
> Log:
> Add a string-valued setter for debug level (although the property setting
> logic in XmlMapper should really be enhanced to deal with this kind of
> thing.)
> PR:163
> Submitted by: sim@nyx.xs4all.nl
>
> Revision Changes Path
> 1.76 +8 -0 jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
>
> Index: Context.java
> ===================================================================
> RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
> retrieving revision 1.75
> retrieving revision 1.76
> diff -u -r1.75 -r1.76
> --- Context.java 2000/03/29 23:31:04 1.75
> +++ Context.java 2000/04/02 20:39:57 1.76
> @@ -585,6 +585,14 @@
> debug=level;
> }
>
> + public void setDebug( String level ) {
> + try {
> + setDebug( Integer.parseInt(level) );
> + } catch (Exception e) {
> + log("Set debug to '" + level + "':", e);
> + }
> + }
> +
> public int getDebug( ) {
> return debug;
> }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org