Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Engineering Digital Service
Metabase
Commits
20762f77
Commit
20762f77
authored
7 years ago
by
Ryan Senior
Browse files
Options
Downloads
Patches
Plain Diff
Add a deprecation warning for JDK 7
parent
04a0b4a8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/core.clj
+22
-0
22 additions, 0 deletions
src/metabase/core.clj
with
22 additions
and
0 deletions
src/metabase/core.clj
+
22
−
0
View file @
20762f77
...
...
@@ -182,12 +182,34 @@
(
.stop
^
Server
@
jetty-instance
)
(
reset!
jetty-instance
nil
)))
(
defn-
wrap-with-asterisk
[
strings-to-wrap
]
;; Adding 4 extra asterisks so that we account for the leading asterisk and space, and add two more after the end of the sentence
(
let
[
string-length
(
+
4
(
apply
max
(
map
count
strings-to-wrap
)))]
(
str
(
apply
str
(
repeat
string-length
\*
))
"\n"
"*\n"
(
apply
str
(
map
#
(
str
"* "
%
"\n"
)
strings-to-wrap
))
"*\n"
(
apply
str
(
repeat
string-length
\*
)))))
(
defn-
check-jdk-version
[]
(
let
[
java-spec-version
(
System/getProperty
"java.specification.version"
)]
;; Note for java 7, this is 1.7, but newer versions drop the 1. Java 9 just returns "9" here.
(
when
(
=
"1.7"
java-spec-version
)
(
let
[
java-version
(
System/getProperty
"java.version"
)
deprecation-messages
[(
str
"DEPRECATION WARNING: You are currently running JDK '"
java-version
"'. "
"Support for Java 7 has been deprecated and will be dropped from a future release."
)
(
str
"See the operation guide for more information: https://metabase.com/docs/latest/operations-guide/start.html."
)]]
(
binding
[
*out*
*err*
]
(
println
(
wrap-with-asterisk
deprecation-messages
))
(
log/warn
deprecation-messages
))))))
;;; ## ---------------------------------------- Normal Start ----------------------------------------
(
defn-
start-normally
[]
(
log/info
"Starting Metabase in STANDALONE mode"
)
(
try
(
check-jdk-version
)
;; launch embedded webserver async
(
start-jetty!
)
;; run our initialization process
...
...
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