You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dg...@apache.org on 2003/02/04 03:31:39 UTC
cvs commit: jakarta-struts/src/share/org/apache/struts/config ModuleConfigFactory.java
dgraham 2003/02/03 18:31:39
Modified: src/share/org/apache/struts/config ModuleConfigFactory.java
Log:
Made log instance transient and cleaned up if statement.
Revision Changes Path
1.2 +10 -6 jakarta-struts/src/share/org/apache/struts/config/ModuleConfigFactory.java
Index: ModuleConfigFactory.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/config/ModuleConfigFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ModuleConfigFactory.java 22 Dec 2002 05:31:14 -0000 1.1
+++ ModuleConfigFactory.java 4 Feb 2003 02:31:39 -0000 1.2
@@ -118,11 +118,15 @@
// Construct a new instance of the specified factory class
try {
- if (clazz == null)
+ if (clazz == null) {
clazz = RequestUtils.applicationClass(factoryClass);
+ }
+
ModuleConfigFactory factory =
(ModuleConfigFactory) clazz.newInstance();
+
return (factory);
+
} catch (Throwable t) {
LOG.error("ModuleConfigFactory.createFactory", t);
return (null);
@@ -140,7 +144,7 @@
/**
* Commons Logging instance.
*/
- private static Log LOG = LogFactory.getLog(ModuleConfigFactory.class);
+ private static transient Log LOG = LogFactory.getLog(ModuleConfigFactory.class);
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-struts/src/share/org/apache/struts/config
ModuleConfigFactory.java
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 4 Feb 2003 dgraham@apache.org wrote:
> Made log instance transient
Is this actually required to achieve serializability? It was my
understanding that static variables were not part of the serialized state
of an object, so it shouldn't make any difference -- and it is guaranteed
to cause problems if the class were to be serialized and deserialized, and
then tried to log something.
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org