Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
java-workspace
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Freifrau von Bleifrei
java-workspace
Commits
a7012bca
Commit
a7012bca
authored
6 years ago
by
Freifrau von Bleifrei
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up a bit
parent
72a222df
Branches
master
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
itestra/src/InkassoBatch.java
+18
-17
18 additions, 17 deletions
itestra/src/InkassoBatch.java
with
18 additions
and
17 deletions
itestra/src/InkassoBatch.java
+
18
−
17
View file @
a7012bca
import
datamodel.Bank
;
import
datamodel.BankAccount
;
import
datamodel.Contract
;
...
...
@@ -25,22 +23,18 @@ import utils.Utils;
// hacky reflection stuff: https://stackoverflow.com/questions/3301635/change-private-static-final-field-using-java-reflection
// or https://zarnekow.blogspot.com/2013/01/java-hacks-changing-final-fields.htmlBlockedForEachLinkedBlockingQueue
// but probably, th
is
is still inlining the Config constants
//
TODO
but probably, th
e compiler
is still inlining the Config constants
, find a way to keep it from doing that
import
java.lang.reflect.*
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
class
EverythingIsTrue
{
protected
static
void
setValue
(
Object
owner
,
Field
field
,
Object
value
)
throws
Exception
{
makeModifiable
(
field
);
field
.
set
(
owner
,
value
);
}
protected
static
void
makeModifiable
(
Field
field
)
throws
Exception
{
field
.
setAccessible
(
true
);
int
modifiers
=
field
.
getModifiers
();
Field
modifierField
=
field
.
getClass
().
getDeclaredField
(
"modifiers"
);
modifiers
=
modifiers
&
~
Modifier
.
FINAL
;
// modifierField.setAccessible(true);
// wrapping setAccessible
...
...
@@ -51,6 +45,12 @@ class EverythingIsTrue {
modifierField
.
setInt
(
field
,
modifiers
);
}
protected
static
void
setValue
(
Object
owner
,
Field
field
,
Object
value
)
throws
Exception
{
makeModifiable
(
field
);
field
.
set
(
owner
,
value
);
}
static
void
setFinalStatic
(
Field
field
,
Object
newValue
)
throws
Exception
{
setValue
(
null
,
field
,
newValue
);
}
...
...
@@ -201,6 +201,7 @@ class Print implements Runnable{
public
Print
()
{
this
.
printSystemMessageQueue
=
MessageQueue
.
getInstance
();
//java.util.concurrent.ForkJoinPool.common.parallelism=8;
//System.out.println(Config.PRINT_DURATION_MILLISECONDS);
try
{
// Systems config
...
...
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