Skip to content

Commit e7c68f1

Browse files
committed
fix formatting
1 parent 31cdec5 commit e7c68f1

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

geode-web/src/main/java/org/apache/geode/management/internal/web/controllers/ShellCommandsController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ public ResponseEntity<?> queryNames(@RequestParam("objectName") final String obj
172172
QueryExp query = null;
173173
if (queryExpressionBase64 != null) {
174174
byte[] decodedBytes = Base64.getDecoder().decode(queryExpressionBase64);
175-
try (ValidatingObjectInputStream ois = new ValidatingObjectInputStream(new ByteArrayInputStream(decodedBytes))) {
175+
try (ValidatingObjectInputStream ois =
176+
new ValidatingObjectInputStream(new ByteArrayInputStream(decodedBytes))) {
176177
ois.accept("javax.management.*", "java.lang.*", "java.util.*");
177178
query = (QueryExp) ois.readObject();
178179
}

geode-web/src/test/java/org/apache/geode/management/internal/web/controllers/QueryExpDeserializationTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
import java.io.ByteArrayInputStream;
44
import java.io.ByteArrayOutputStream;
55
import java.io.ObjectOutputStream;
6+
67
import javax.management.Query;
78
import javax.management.QueryExp;
9+
810
import org.apache.commons.io.serialization.ValidatingObjectInputStream;
911
import org.junit.Test;
1012

@@ -16,11 +18,12 @@ public void testQueryExp() throws Exception {
1618
ObjectOutputStream oos = new ObjectOutputStream(baos);
1719
oos.writeObject(query);
1820
oos.close();
19-
21+
2022
byte[] decoded = baos.toByteArray();
21-
ValidatingObjectInputStream ois = new ValidatingObjectInputStream(new ByteArrayInputStream(decoded));
23+
ValidatingObjectInputStream ois =
24+
new ValidatingObjectInputStream(new ByteArrayInputStream(decoded));
2225
ois.accept("javax.management.*", "java.lang.*", "java.util.*");
23-
26+
2427
QueryExp q = (QueryExp) ois.readObject();
2528
System.out.println(q);
2629
}

0 commit comments

Comments
 (0)