File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
buildSrc/src/main/java/org/springframework/boot/build/architecture Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2022-2022 the original author or authors.
2
+ * Copyright 2022-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
19
19
import java .io .File ;
20
20
import java .io .FileWriter ;
21
21
import java .io .IOException ;
22
- import java .nio .charset .StandardCharsets ;
23
22
import java .nio .file .Files ;
24
23
import java .nio .file .StandardOpenOption ;
25
24
import java .util .stream .Collectors ;
@@ -68,8 +67,7 @@ void checkForPackageTangles() throws IOException {
68
67
File outputFile = getOutputDirectory ().file ("failure-report.txt" ).get ().getAsFile ();
69
68
outputFile .getParentFile ().mkdirs ();
70
69
if (result .hasViolation ()) {
71
- Files .write (outputFile .toPath (), result .getFailureReport ().toString ().getBytes (StandardCharsets .UTF_8 ),
72
- StandardOpenOption .CREATE );
70
+ Files .writeString (outputFile .toPath (), result .getFailureReport ().toString (), StandardOpenOption .CREATE );
73
71
FileWriter writer = new FileWriter (outputFile );
74
72
FileCopyUtils .copy (result .getFailureReport ().toString (), writer );
75
73
throw new GradleException ("Package tangle check failed. See '" + outputFile + "' for details." );
You can’t perform that action at this time.
0 commit comments