Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tester
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
insert epic projlab name here
tester
Commits
c53fd859
Verified
Commit
c53fd859
authored
Apr 11, 2021
by
Tóth Miklós Tibor
Browse files
Options
Downloads
Patches
Plain Diff
java 10-ify
parent
24334334
No related branches found
No related tags found
No related merge requests found
Pipeline
#7472
passed
Apr 18, 2021
Stage: build
Changes
2
Pipelines
4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.idea/misc.xml
+1
-1
1 addition, 1 deletion
.idea/misc.xml
src/main/java/tester/Main.java
+11
-5
11 additions, 5 deletions
src/main/java/tester/Main.java
with
12 additions
and
6 deletions
.idea/misc.xml
+
1
−
1
View file @
c53fd859
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<component
name=
"FrameworkDetectionExcludesConfiguration"
>
<component
name=
"FrameworkDetectionExcludesConfiguration"
>
<file
type=
"web"
url=
"file://$PROJECT_DIR$"
/>
<file
type=
"web"
url=
"file://$PROJECT_DIR$"
/>
</component>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1
1
"
default=
"
tru
e"
project-jdk-name=
"10"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1
0
"
default=
"
fals
e"
project-jdk-name=
"10"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/out"
/>
<output
url=
"file://$PROJECT_DIR$/out"
/>
</component>
</component>
</project>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/tester/Main.java
+
11
−
5
View file @
c53fd859
...
@@ -2,14 +2,13 @@ package tester;
...
@@ -2,14 +2,13 @@ package tester;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
java.io.FileNotFoundException
;
import
java.io.*
;
import
java.io.FileReader
;
import
java.io.OutputStream
;
import
java.io.PrintStream
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.stream.Stream
;
public
class
Main
{
public
class
Main
{
public
static
void
main
(
String
[]
args
)
throws
FileNotFoundException
{
public
static
void
main
(
String
[]
args
)
throws
FileNotFoundException
{
...
@@ -92,7 +91,7 @@ public class Main {
...
@@ -92,7 +91,7 @@ public class Main {
System
.
out
.
printf
(
"File: %s\n"
,
f
);
System
.
out
.
printf
(
"File: %s\n"
,
f
);
System
.
out
.
println
();
System
.
out
.
println
();
try
{
try
{
String
got
=
F
ile
s
.
read
String
(
Path
.
of
(
f
)
);
String
got
=
f
ile
To
String
(
f
);
boolean
er
=
compareStrings
(
got
,
e
);
boolean
er
=
compareStrings
(
got
,
e
);
if
(
er
)
{
if
(
er
)
{
error
.
set
(
true
);
error
.
set
(
true
);
...
@@ -166,4 +165,11 @@ public class Main {
...
@@ -166,4 +165,11 @@ public class Main {
}
}
return
error
;
return
error
;
}
}
private
static
String
fileToString
(
String
path
)
throws
IOException
{
StringBuilder
build
=
new
StringBuilder
();
Stream
<
String
>
stream
=
Files
.
lines
(
Paths
.
get
(
path
),
StandardCharsets
.
UTF_8
);
stream
.
forEach
(
s
->
build
.
append
(
s
).
append
(
"\n"
));
return
build
.
toString
();
}
}
}
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