Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs2-19wi
project01
Commits
e087afcd
Commit
e087afcd
authored
6 years ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Updates reflection library
parent
bfdca2fe
master
No related merge requests found
Pipeline
#3884
canceled with stage
in 48 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/edu/caltech/cs2/helpers/Reflection.java
+26
-14
tests/edu/caltech/cs2/helpers/Reflection.java
with
26 additions
and
14 deletions
+26
-14
tests/edu/caltech/cs2/helpers/Reflection.java
View file @
e087afcd
...
...
@@ -61,7 +61,13 @@ public class Reflection {
try
{
result
=
(
T
)
m
.
invoke
(
args
[
0
],
Arrays
.
copyOfRange
(
args
,
1
,
args
.
length
));
}
catch
(
IllegalAccessException
|
InvocationTargetException
e
)
{
fail
(
e
.
getCause
());
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
RuntimeException
)
{
throw
(
RuntimeException
)
e
.
getCause
();
}
else
{
fail
(
cause
);
}
}
return
result
;
}
...
...
@@ -72,7 +78,13 @@ public class Reflection {
try
{
result
=
(
T
)
m
.
invoke
(
null
,
args
);
}
catch
(
IllegalAccessException
|
InvocationTargetException
e
)
{
fail
(
e
.
getCause
());
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
RuntimeException
)
{
throw
(
RuntimeException
)
e
.
getCause
();
}
else
{
fail
(
cause
);
}
}
return
result
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help