Skip to content

Commit ea38fd0

Browse files
Merge pull request #363 from michaelJustin/362-code-cleanup
362 code cleanup
2 parents fe2d79d + 391b7f6 commit ea38fd0

18 files changed

Lines changed: 45 additions & 79 deletions

source/djContextConfig.pas

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ interface
3939
(**
4040
* Context configuration.
4141
*)
42-
TdjContextConfig = class(TdjAbstractConfig, IContextConfig)
43-
end;
42+
TdjContextConfig = class(TdjAbstractConfig, IContextConfig);
4443

4544
implementation
4645

source/djContextHandlerCollection.pas

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ constructor TdjContextHandlerCollection.Create;
7575
begin
7676
inherited Create;
7777

78-
// logging -----------------------------------------------------------------
7978
{$IFDEF DARAJA_LOGGING}
8079
Logger := TdjLoggerFactory.GetLogger('dj.' + TdjContextHandlerCollection.ClassName);
8180
{$ENDIF DARAJA_LOGGING}

source/djHTTPConnector.pas

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ TdjHTTPConnector = class(TdjAbstractConnector)
6060
HostAndPort: string;
6161

6262
procedure Trace(const S: string);
63-
6463
procedure OnCommand(AContext: TIdContext;
6564
ARequestInfo: TdjRequest; AResponseInfo: TdjResponse);
66-
6765
protected
6866
// TdjLifeCycle overrides
6967
procedure DoStart; override;
@@ -78,15 +76,13 @@ TdjHTTPConnector = class(TdjAbstractConnector)
7876
* @param Handler the request handler
7977
*)
8078
constructor Create(const Handler: IHandler); virtual;
81-
8279
(**
8380
* Destructor.
8481
*)
8582
destructor Destroy; override;
8683

8784
// properties
8885
property HTTPServer: TdjHTTPServer read FHTTPServer;
89-
9086
end;
9187

9288
implementation

source/djHandlerWrapper.pas

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ TdjHandlerWrapper = class(TdjAbstractHandlerContainer)
6161
// getter / setter
6262
function GetHandler: IHandler;
6363
procedure SetHandler(const Value: IHandler);
64-
6564
procedure Trace(const S: string);
66-
6765
protected
6866
(**
6967
* Get a HTTP session.

source/djPathMap.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ TdjPathMap = class(TStringList)
117117
implementation
118118

119119
uses
120-
djInterfaces, djTypes,
120+
djTypes,
121121
SysUtils;
122122

123123
{ TdjPathMap }

source/djServer.pas

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,7 @@ TdjServer = class(TdjServerBase)
9999
procedure StopContextHandlers;
100100
protected
101101
// TdjLifeCycle overrides
102-
(**
103-
* Execute the custom start code.
104-
* @sa TdjLifeCycle
105-
*)
106102
procedure DoStart; override;
107-
(**
108-
* Execute the custom start code.
109-
* @sa TdjLifeCycle
110-
*)
111103
procedure DoStop; override;
112104
public
113105
(**

source/djServerContext.pas

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ interface
4242
* A subclass of the Indy context class is used for
4343
* future extensions.
4444
*)
45-
TdjServerContext = class(TIdServerContext)
46-
public
47-
end;
45+
TdjServerContext = class(TIdServerContext);
4846

4947
TdjServerContextClass = class of TdjServerContext;
5048

source/djWebAppContext.pas

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ interface
3939
(**
4040
* Main context handler class.
4141
*)
42-
TdjWebAppContext = class(TdjWebComponentContextHandler)
43-
public
44-
end;
42+
TdjWebAppContext = class(TdjWebComponentContextHandler);
4543

4644
implementation
4745

source/djWebComponent.pas

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ TdjWebComponent = class(TdjGenericWebComponent)
5959
{$ENDIF DARAJA_LOGGING}
6060

6161
procedure DoCachedGet(Request: TdjRequest; Response: TdjResponse); virtual;
62-
6362
protected
6463
(**
6564
* Called by the server to handle a DELETE request.
@@ -138,22 +137,10 @@ TdjWebComponent = class(TdjGenericWebComponent)
138137

139138
public
140139
constructor Create;
141-
142140
destructor Destroy; override;
143141

144-
(**
145-
* Dispatches client requests to the protected service method.
146-
*
147-
* @note a custom Web Component should not override this method.
148-
*
149-
* @param Context HTTP server context
150-
* @param Request HTTP request
151-
* @param Response HTTP response
152-
* @throws EWebComponentException if an exception occurs that interferes with the component's normal operation
153-
*)
154142
procedure Service(Context: TdjServerContext; Request: TdjRequest; Response:
155143
TdjResponse); override;
156-
157144
end;
158145

159146
(**
@@ -181,17 +168,16 @@ constructor TdjWebComponent.Create;
181168
begin
182169
inherited Create;
183170

184-
// logging -----------------------------------------------------------------
185-
{$IFDEF DARAJA_LOGGING}
171+
{$IFDEF DARAJA_LOGGING}
186172
Logger := TdjLoggerFactory.GetLogger('dj.' + TdjWebComponent.ClassName);
187-
{$ENDIF DARAJA_LOGGING}
173+
{$ENDIF DARAJA_LOGGING}
188174

189-
{$IFDEF LOG_CREATE}Trace('Created');{$ENDIF}
175+
{$IFDEF LOG_CREATE}Trace('Created');{$ENDIF}
190176
end;
191177

192178
destructor TdjWebComponent.Destroy;
193179
begin
194-
{$IFDEF LOG_DESTROY}Trace('Destroy');{$ENDIF}
180+
{$IFDEF LOG_DESTROY}Trace('Destroy');{$ENDIF}
195181

196182
inherited;
197183
end;
@@ -306,9 +292,9 @@ procedure TdjWebComponent.Service(Context: TdjServerContext;
306292
end;
307293
else
308294
begin
309-
{$IFDEF DARAJA_LOGGING}
295+
{$IFDEF DARAJA_LOGGING}
310296
Logger.Error('Unknown HTTP method');
311-
{$ENDIF DARAJA_LOGGING}
297+
{$ENDIF DARAJA_LOGGING}
312298
end;
313299
end;
314300
end;

source/djWebComponentConfig.pas

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ interface
3939
(**
4040
* Web Component configuration.
4141
*)
42-
TdjWebComponentConfig = class(TdjAbstractConfig, IWebComponentConfig)
43-
end;
42+
TdjWebComponentConfig = class(TdjAbstractConfig, IWebComponentConfig);
4443

4544
implementation
4645

0 commit comments

Comments
 (0)