Skip to content

Commit 1b286e3

Browse files
authored
update checkstyle and checker XML to newest release (#133)
1 parent 593bc1c commit 1b286e3

File tree

7 files changed

+142
-48
lines changed

7 files changed

+142
-48
lines changed

build-tools/src/main/resources/weblogic-image-tool/checkstyle/customized_google_checks.xml

Lines changed: 111 additions & 43 deletions
Large diffs are not rendered by default.

imagetool/src/main/java/com/oracle/weblogic/imagetool/installer/MiddlewareInstall.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ private static String getJarNameFromInstaller(Path installerFile) throws IOExcep
7474
return filename;
7575
}
7676

77+
/**
78+
* Copy all necessary installers to the build context directory.
79+
* @param cacheStore cache where the installers are defined.
80+
* @param buildContextDir the directory where the installers should be copied.
81+
* @throws IOException if any of the copy commands fails.
82+
*/
7783
public void copyFiles(CacheStore cacheStore, String buildContextDir) throws IOException {
7884
logger.entering();
7985
for (MiddlewareInstallPackage installPackage: installerFiles) {

imagetool/src/main/java/com/oracle/weblogic/imagetool/logging/LoggingFacade.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ public class LoggingFacade {
1717
private static final String CLASS = LoggingFacade.class.getName();
1818
private final Logger logger;
1919

20+
/**
21+
* Create an Image Tool facade for the java.util.logging.Logger class.
22+
* This facade is used to override the logging methods in order to infer caller details.
23+
* @param logger the named logger to wrap.
24+
*/
2025
public LoggingFacade(Logger logger) {
2126
this.logger = logger;
2227

imagetool/src/main/java/com/oracle/weblogic/imagetool/util/ARUUtil.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,11 @@ private static String getPatchInfo(String bugNumber, String userId, String passw
424424
Document allPatches = HttpUtil.getXMLContent(url, userId, password);
425425

426426
String xpath;
427-
if (optionalRelease != null)
427+
if (optionalRelease != null) {
428428
xpath = String.format("/results/patch/release[@name='%s']/@id", optionalRelease);
429-
else
429+
} else {
430430
xpath = "/results/patch/release/@id";
431+
}
431432

432433
logger.finest("applying xpath: " + xpath);
433434
String releaseNumber = XPathUtil.applyXPathReturnString(allPatches, xpath);
@@ -552,8 +553,9 @@ private static Document createResultDocument(NodeList nodeList) throws IOExcepti
552553
Node n = nodeList.item(i);
553554
Node copyNode = doc.importNode(n, true);
554555

555-
if (n instanceof Element)
556+
if (n instanceof Element) {
556557
element.appendChild(copyNode);
558+
}
557559
}
558560

559561
doc.appendChild(element);

imagetool/src/main/java/com/oracle/weblogic/imagetool/util/DockerfileOptions.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ public String wdt_home() {
279279
return wdtHome;
280280
}
281281

282+
/**
283+
* The directory for the WORKDIR in the Docker build.
284+
* @return the value for the WORKDIR
285+
*/
282286
@SuppressWarnings("unused")
283287
public String work_dir() {
284288
if ((isWdtEnabled() && !modelOnly()) || sourceImage != null) {
@@ -315,7 +319,10 @@ public void setInvLoc(String value) {
315319
}
316320
}
317321

318-
322+
/**
323+
* Set the value for the Oracle Inventory directory.
324+
* @param value the value for inventory file (directory)
325+
*/
319326
public void setOraInvDir(String value) {
320327
if (value != null) {
321328
oraInvDir = value;

imagetool/src/main/java/com/oracle/weblogic/imagetool/util/Utils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,12 @@ public static String getMessage(@PropertyKey(resourceBundle = "ImageTool") Strin
804804
return MessageFormat.format(bundle.getString(key), params);
805805
}
806806

807+
/**
808+
* Remove the intermediate images created by the multi-stage Docker build.
809+
* @param buildId the build ID used to identify the images created during this build.
810+
* @throws IOException if the external Docker command fails.
811+
* @throws InterruptedException if this program was interrupted waiting on the Docker command.
812+
*/
807813
public static void removeIntermediateDockerImages(String buildId) throws IOException, InterruptedException {
808814
logger.entering();
809815
final List<String> command = Stream.of(

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
<dependency>
224224
<groupId>com.puppycrawl.tools</groupId>
225225
<artifactId>checkstyle</artifactId>
226-
<version>8.21</version>
226+
<version>8.29</version>
227227
</dependency>
228228
</dependencies>
229229
</plugin>

0 commit comments

Comments
 (0)