Skip to content

Conversation

@TomaszGaweda
Copy link
Contributor

  • Made all projects be a child of main project, so eg. failsafe and surefire configurations are shared
  • Modernized code
  • Fixed known flakiness
  • Modernized dependencies

@TomaszGaweda TomaszGaweda changed the title Spring code samples refresh Spring code samples refresh + overall refresh of deps Feb 10, 2025
.setProperty("keyStorePassword", "123456") //
.setProperty("trustStore", "src/ca.p12") //
.setProperty("trustStorePassword", "123456");
SSLConfig sslConf = config.getNetworkConfig().setSSLConfig(new SSLConfig()).getSSLConfig();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason: my local JDK got confused with types there, it's safer to extract a variable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JDK or IDE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JDK (built via maven)

.setProperty("keyStorePassword", "123456") //
.setProperty("trustStore", "src/ca.p12") //
.setProperty("trustStorePassword", "123456");
SSLConfig sslConf = config.getNetworkConfig().setSSLConfig(new SSLConfig()).getSSLConfig();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JDK or IDE?

Comment on lines 94 to 107
private String toHtmlTable(Map<String, Object> attributes) {
StringBuilder html = new StringBuilder("<html>");
html.append("<table border=\"1\" cellpadding=\"5\" cellspacing=\"5\">");
StringBuilder html = new StringBuilder("<html><body>");
html.append("<table style=\"border-spacing: 5px; border: 1px solid black;\">");
attributes.forEach((k, v) -> addHtmlTableRow(html, k, v));
html.append("</table></html>");
html.append("</table></body></html>");
return html.toString();
}

private void addHtmlTableRow(StringBuilder content, String key, Object value) {
content.append("<tr>")
.append("<th>").append(key).append("</th>")
.append("<td>").append(value).append("</td>")
.append("</tr>");
.append("<th style=\"padding: 5px;\">").append(key).append("</th>")
.append("<td style=\"padding: 5px;\">").append(value).append("</td>")
.append("</tr>");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like whole thing could be implemented better (no reflection on your changes) - maybe a text-block template with a .formatted call consuming a stream-mapping of attributes?

LOGGER.info("Caches from hazelcast:");
for (DistributedObject distributedObject : hazelcastInstance.getDistributedObjects()) {
LOGGER.info(" - " + distributedObject.getName());
LOGGER.info(" - {}", distributedObject.getName());
Copy link
Contributor

@JackPGreen JackPGreen Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

…t/src/main/java/com/hazelcast/guide/controller/SessionController.java

Co-authored-by: Jack Green <[email protected]>
Copy link
Contributor

@ldziedziul ldziedziul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you test it?

@TomaszGaweda
Copy link
Contributor Author

Ran mvn verify + few Spring examples

@TomaszGaweda TomaszGaweda merged commit 314530c into hazelcast:master Feb 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants