You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/08/23 16:00:33 UTC
[jira] Resolved: (WICKET-873) Constructor of Component not DRY?
[ https://issues.apache.org/jira/browse/WICKET-873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alastair Maw resolved WICKET-873.
---------------------------------
Resolution: Invalid
Please don't ask questions like this in the bug tracker. Post to the mailing list instead.
> Constructor of Component not DRY?
> ---------------------------------
>
> Key: WICKET-873
> URL: https://issues.apache.org/jira/browse/WICKET-873
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Reporter: Martin Funk
>
> Probably I'm missing something, but what's the reason for the two constructors of org/apache/wicket/Component.java
> not to follow the DRY principle.
> In my schoolbook driven aproach I'd do constructor chaining like this:
> Index: jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
> ===================================================================
> --- jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java (Revision 568743)
> +++ jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java (Arbeitskopie)
> @@ -724,15 +724,7 @@
> */
> public Component(final String id)
> {
> - setId(id);
> - getApplication().notifyComponentInstantiationListeners(this);
> -
> - final IDebugSettings debugSettings = Application.get().getDebugSettings();
> - if (debugSettings.isLinePreciseReportingOnNewComponentEnabled())
> - {
> - setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new MarkupException(
> - "constructed")));
> - }
> + this(id, null);
> }
>
> /**
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.