Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BraillePlot
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
Georg Graßnick
BraillePlot
Commits
2da4bb97
Commit
2da4bb97
authored
5 years ago
by
Leonard Kupper
Browse files
Options
Downloads
Patches
Plain Diff
Capitalize logging messages.
parent
9a7eb362
No related branches found
No related tags found
1 merge request
!28
Bug/jar resource handling 49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/tudresden/inf/mci/brailleplot/GeneralResource.java
+10
-10
10 additions, 10 deletions
...ava/de/tudresden/inf/mci/brailleplot/GeneralResource.java
with
10 additions
and
10 deletions
src/main/java/de/tudresden/inf/mci/brailleplot/GeneralResource.java
+
10
−
10
View file @
2da4bb97
...
...
@@ -48,33 +48,33 @@ public final class GeneralResource {
*/
public
GeneralResource
(
final
String
resourcePath
,
final
String
searchPath
)
throws
IOException
{
File
checkFile
=
new
File
(
resourcePath
);
mLogger
.
trace
(
"
c
hecking referenced path: "
+
checkFile
);
mLogger
.
trace
(
"
C
hecking referenced path: "
+
checkFile
);
if
(
checkFile
.
isFile
())
{
mLogger
.
trace
(
"
i
nterpreting path as file: "
+
checkFile
.
getCanonicalPath
());
mLogger
.
trace
(
"
I
nterpreting path as file: "
+
checkFile
.
getCanonicalPath
());
mResourcePath
=
checkFile
.
getCanonicalPath
();
validExternalFile
=
true
;
}
checkFile
=
checkFile
.
getAbsoluteFile
();
mLogger
.
trace
(
"
c
hecking referenced path as absolute path: "
+
checkFile
);
mLogger
.
trace
(
"
C
hecking referenced path as absolute path: "
+
checkFile
);
if
(
checkFile
.
isFile
())
{
mLogger
.
trace
(
"
i
nterpreting path as absolute file: "
+
checkFile
.
getCanonicalPath
());
mLogger
.
trace
(
"
I
nterpreting path as absolute file: "
+
checkFile
.
getCanonicalPath
());
mResourcePath
=
checkFile
.
getCanonicalPath
();
validExternalFile
=
true
;
}
if
(
Objects
.
nonNull
(
searchPath
))
{
checkFile
=
new
File
(
searchPath
+
File
.
separator
+
resourcePath
);
mLogger
.
trace
(
"
l
ooking for referenced path in search path: "
+
checkFile
);
mLogger
.
trace
(
"
L
ooking for referenced path in search path: "
+
checkFile
);
if
(
checkFile
.
isFile
())
{
mLogger
.
trace
(
"
i
nterpreting path as search path relative file: "
+
checkFile
.
getCanonicalPath
());
mLogger
.
trace
(
"
I
nterpreting path as search path relative file: "
+
checkFile
.
getCanonicalPath
());
mResourcePath
=
checkFile
.
getCanonicalPath
();
validExternalFile
=
true
;
}
}
String
resourceClassPath
=
resourcePath
.
replace
(
"\\"
,
"/"
);
// classpaths are always separated by forward slash
InputStream
checkStream
=
getClass
().
getResourceAsStream
(
resourceClassPath
);
mLogger
.
trace
(
"
c
hecking referenced path as resource: "
+
resourceClassPath
);
mLogger
.
trace
(
"
C
hecking referenced path as resource: "
+
resourceClassPath
);
if
(
Objects
.
nonNull
(
checkStream
))
{
mLogger
.
trace
(
"
i
nterpreting path as resource stream: "
+
resourceClassPath
);
mLogger
.
trace
(
"
I
nterpreting path as resource stream: "
+
resourceClassPath
);
mResourcePath
=
resourceClassPath
;
validPackedResource
=
true
;
}
...
...
@@ -82,9 +82,9 @@ public final class GeneralResource {
String
relativeResourcePath
=
new
File
(
searchPath
+
File
.
separator
+
resourceClassPath
).
toPath
().
normalize
().
toString
();
relativeResourcePath
=
relativeResourcePath
.
replace
(
"\\"
,
"/"
);
checkStream
=
getClass
().
getResourceAsStream
(
relativeResourcePath
);
mLogger
.
trace
(
"
c
hecking referenced path as search path relative resource: "
+
relativeResourcePath
);
mLogger
.
trace
(
"
C
hecking referenced path as search path relative resource: "
+
relativeResourcePath
);
if
(
Objects
.
nonNull
(
checkStream
))
{
mLogger
.
trace
(
"
i
nterpreting path as resource stream: "
+
relativeResourcePath
);
mLogger
.
trace
(
"
I
nterpreting path as resource stream: "
+
relativeResourcePath
);
mResourcePath
=
relativeResourcePath
;
validPackedResource
=
true
;
}
...
...
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