Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
1e40c340
Commit
1e40c340
authored
16 years ago
by
ribeaudc
Browse files
Options
Downloads
Patches
Plain Diff
minor: - Add final keyword when possible.
SVN: 6527
parent
4d185978
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/source/java/ch/systemsx/cisd/common/logging/LogInvocationHandler.java
+10
-9
10 additions, 9 deletions
...ch/systemsx/cisd/common/logging/LogInvocationHandler.java
with
10 additions
and
9 deletions
common/source/java/ch/systemsx/cisd/common/logging/LogInvocationHandler.java
+
10
−
9
View file @
1e40c340
...
@@ -47,8 +47,8 @@ public final class LogInvocationHandler implements InvocationHandler
...
@@ -47,8 +47,8 @@ public final class LogInvocationHandler implements InvocationHandler
* @param logLevel The log level to use for normal (successful) events.
* @param logLevel The log level to use for normal (successful) events.
* @param classUsedToNameLogger Class used to specify the name of the logger.
* @param classUsedToNameLogger Class used to specify the name of the logger.
*/
*/
public
LogInvocationHandler
(
Object
object
,
String
name
,
Level
logLevel
,
public
LogInvocationHandler
(
final
Object
object
,
final
String
name
,
final
Level
logLevel
,
Class
<?>
classUsedToNameLogger
)
final
Class
<?>
classUsedToNameLogger
)
{
{
this
.
object
=
object
;
this
.
object
=
object
;
this
.
name
=
name
;
this
.
name
=
name
;
...
@@ -56,22 +56,23 @@ public final class LogInvocationHandler implements InvocationHandler
...
@@ -56,22 +56,23 @@ public final class LogInvocationHandler implements InvocationHandler
this
.
classUsedToNameLogger
=
classUsedToNameLogger
;
this
.
classUsedToNameLogger
=
classUsedToNameLogger
;
}
}
public
Object
invoke
(
Object
proxy
,
Method
method
,
Object
[]
args
)
throws
Throwable
public
Object
invoke
(
final
Object
proxy
,
final
Method
method
,
final
Object
[]
args
)
throws
Throwable
{
{
long
time
=
System
.
currentTimeMillis
();
final
long
time
=
System
.
currentTimeMillis
();
Throwable
throwable
=
null
;
Throwable
throwable
=
null
;
try
try
{
{
return
method
.
invoke
(
object
,
args
);
return
method
.
invoke
(
object
,
args
);
}
catch
(
InvocationTargetException
e
)
}
catch
(
final
InvocationTargetException
e
)
{
{
throwable
=
e
.
getCause
();
throwable
=
e
.
getCause
();
throw
throwable
;
throw
throwable
;
}
catch
(
UndeclaredThrowableException
e
)
}
catch
(
final
UndeclaredThrowableException
e
)
{
{
throwable
=
e
.
getCause
();
throwable
=
e
.
getCause
();
throw
throwable
;
throw
throwable
;
}
catch
(
Throwable
t
)
}
catch
(
final
Throwable
t
)
{
{
throwable
=
t
;
throwable
=
t
;
throw
t
;
throw
t
;
...
@@ -108,7 +109,7 @@ public final class LogInvocationHandler implements InvocationHandler
...
@@ -108,7 +109,7 @@ public final class LogInvocationHandler implements InvocationHandler
}
}
}
}
private
Level
getLogLevel
(
Method
method
)
private
final
Level
getLogLevel
(
final
Method
method
)
{
{
final
LogAnnotation
annotation
=
method
.
getAnnotation
(
LogAnnotation
.
class
);
final
LogAnnotation
annotation
=
method
.
getAnnotation
(
LogAnnotation
.
class
);
if
(
annotation
==
null
)
if
(
annotation
==
null
)
...
@@ -123,7 +124,7 @@ public final class LogInvocationHandler implements InvocationHandler
...
@@ -123,7 +124,7 @@ public final class LogInvocationHandler implements InvocationHandler
}
}
}
}
private
Logger
createLogger
(
Method
method
)
private
final
Logger
createLogger
(
final
Method
method
)
{
{
final
LogAnnotation
annotation
=
method
.
getAnnotation
(
LogAnnotation
.
class
);
final
LogAnnotation
annotation
=
method
.
getAnnotation
(
LogAnnotation
.
class
);
final
LogCategory
logCategory
=
final
LogCategory
logCategory
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment