Re: [xwiki-devs] [xwiki-notifications] r26278 - platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects
On Thu, Jan 21, 2010 at 14:25, vmassol <[email protected]> wrote:
Author: vmassol Date: 2010-01-21 14:25:39 +0100 (Thu, 21 Jan 2010) New Revision: 26278
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java Log: XWIKI-4753: Refactor old model to use the new Entity Reference classes
* Removed warning since there are too many left and this causes functional test errors (false positives)
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java =================================================================== --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java 2010-01-21 11:10:10 UTC (rev 26277) +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java 2010-01-21 13:25:39 UTC (rev 26278) @@ -127,11 +127,7 @@ { // If the name is already set then reset it since we're now using a reference this.reference = reference; - if (this.name != null) { - LOG.warn("Element was stored as name [" + this.name + "]. Will now be stored as a reference [" - + reference + "]"); - this.name = null; - } + this.name = null;
You could keep a debug log. Someone could enable debug log to track wrong uses.
}
/**
_______________________________________________ notifications mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/notifications
-- Thomas Mortagne
On Jan 21, 2010, at 2:52 PM, Thomas Mortagne wrote:
On Thu, Jan 21, 2010 at 14:25, vmassol <[email protected]> wrote:
Author: vmassol Date: 2010-01-21 14:25:39 +0100 (Thu, 21 Jan 2010) New Revision: 26278
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java Log: XWIKI-4753: Refactor old model to use the new Entity Reference classes
* Removed warning since there are too many left and this causes functional test errors (false positives)
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java =================================================================== --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java 2010-01-21 11:10:10 UTC (rev 26277) +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/BaseElement.java 2010-01-21 13:25:39 UTC (rev 26278) @@ -127,11 +127,7 @@ { // If the name is already set then reset it since we're now using a reference this.reference = reference; - if (this.name != null) { - LOG.warn("Element was stored as name [" + this.name + "]. Will now be stored as a reference [" - + reference + "]"); - this.name = null; - } + this.name = null;
You could keep a debug log. Someone could enable debug log to track wrong uses.
Yes good idea but I think I still prefer not to have it at all. What I've done now is add the @deprecated usage in BaseClass and BaseObject so it's not needed anymore to see where in the code the wrong usage is done. Thanks -Vincent
participants (2)
-
Thomas Mortagne -
Vincent Massol