Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public SmithyBundle bundle() {
}
}

private static String serializeModel(software.amazon.smithy.model.Model model) {
private static String serializeModel(Model model) {
return ObjectNode.printJson(ModelSerializer.builder()
.build()
.serialize(model));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import software.amazon.smithy.java.io.ByteBufferUtils;
import software.amazon.smithy.java.io.datastream.DataStream;
import software.amazon.smithy.java.protocoltests.harness.HttpClientRequestTests;
Expand Down Expand Up @@ -80,7 +81,7 @@ private static Document parseXML(String xml) throws Exception {
dbf.setIgnoringElementContentWhitespace(true);

DocumentBuilder db = dbf.newDocumentBuilder();
return db.parse(new org.xml.sax.InputSource(new StringReader(xml)));
return db.parse(new InputSource(new StringReader(xml)));
}

private static void removeWhitespaceNodes(Node node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import software.amazon.smithy.java.aws.server.restjson.router.PathPattern.Segment;

Expand Down Expand Up @@ -40,7 +41,7 @@ public int getRank() {

@Override
public Match match(String path) {
java.util.regex.Matcher m = pattern.matcher(path);
Matcher m = pattern.matcher(path);

if (!m.matches()) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package software.amazon.smithy.java.benchmarks.serde;

import com.sun.management.OperatingSystemMXBean;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.management.ManagementFactory;
Expand Down Expand Up @@ -289,7 +290,7 @@ private static String detectMachineInfo() {

// Fall back to cores + RAM summary
int cores = Runtime.getRuntime().availableProcessors();
long ramMb = ManagementFactory.getOperatingSystemMXBean() instanceof com.sun.management.OperatingSystemMXBean os
long ramMb = ManagementFactory.getOperatingSystemMXBean() instanceof OperatingSystemMXBean os
? os.getTotalMemorySize() / (1024 * 1024)
: Runtime.getRuntime().maxMemory() / (1024 * 1024);
String ramLabel = ramMb >= 1024 ? (ramMb / 1024) + "GB" : ramMb + "MB";
Expand Down
12 changes: 12 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
`kotlin-dsl`
`java-library`
}

repositories {
Expand All @@ -17,4 +18,15 @@ dependencies {

// https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))

testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.4")
}

tasks.test {
useJUnitPlatform()
}

tasks.withType<JavaCompile>().configureEach {
options.release.set(21)
}
Loading