Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Commit 28c9d75

Browse files
cleanup for upcoming release
1 parent 45c3fc7 commit 28c9d75

File tree

6 files changed

+23
-32
lines changed

6 files changed

+23
-32
lines changed

kiekeradapter/src/main/java/net/explorviz/kiekeradapter/configuration/GenericExplorVizExternalLogAdapter.java

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,20 @@
1717
import explorviz.live_trace_processing.record.misc.SystemMonitoringRecord;
1818
import explorviz.live_trace_processing.record.trace.HostApplicationMetaDataRecord;
1919
import java.nio.ByteBuffer;
20-
import org.slf4j.Logger;
21-
import org.slf4j.LoggerFactory;
2220

2321
/**
2422
* Prepares the ByteBuffer and sends out the buffer to the backend.
2523
*
26-
* @author Christian Zirkelbach (czi@informatik.uni-kiel.de)
27-
*
2824
*/
2925
public final class GenericExplorVizExternalLogAdapter {
3026

31-
private static final Logger LOGGER =
32-
LoggerFactory.getLogger(GenericExplorVizExternalLogAdapter.class);
27+
// private static final Logger LOGGER =
28+
// LoggerFactory.getLogger(GenericExplorVizExternalLogAdapter.class);
3329

34-
private static final boolean REPLAY_IN_REALTIME = false;
30+
// private static final boolean REPLAY_IN_REALTIME = false;
3531
private static final ByteBuffer EXPLORVIZ_BUFFER;
3632
private static long firstTimestamp = -1;
37-
private static long firstWallclockTimestamp;
33+
// private static long firstWallclockTimestamp;
3834

3935
private GenericExplorVizExternalLogAdapter() {
4036
// private constructor
@@ -80,19 +76,19 @@ private static void sendBufferIfHasElements(final long timestamp) {
8076
if (EXPLORVIZ_BUFFER.position() > 0) {
8177
if (firstTimestamp == -1) {
8278
firstTimestamp = timestamp;
83-
firstWallclockTimestamp = System.nanoTime();
79+
// firstWallclockTimestamp = System.nanoTime();
8480
} else {
85-
final long passedTime = timestamp - firstTimestamp;
86-
87-
while (REPLAY_IN_REALTIME && System.nanoTime() - firstWallclockTimestamp < passedTime) {
88-
if (passedTime > 1000L * 1000L) {
89-
try {
90-
Thread.sleep(1000L);
91-
} catch (final InterruptedException e) {
92-
LOGGER.warn(LOGGER.getName() + ": " + e.getMessage());
93-
}
94-
}
95-
}
81+
// final long passedTime = timestamp - firstTimestamp;
82+
83+
// while (REPLAY_IN_REALTIME && System.nanoTime() - firstWallclockTimestamp < passedTime) {
84+
// if (passedTime > 1000L * 1000L) {
85+
// try {
86+
// Thread.sleep(1000L);
87+
// } catch (final InterruptedException e) {
88+
// LOGGER.warn(LOGGER.getName() + ": " + e.getMessage());
89+
// }
90+
// }
91+
// }
9692
}
9793

9894
MonitoringController.sendOutBuffer(EXPLORVIZ_BUFFER);

settings-service/src/main/java/net/explorviz/settings/server/main/SetupApplicationListener.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,14 @@
1616
import org.glassfish.jersey.server.monitoring.ApplicationEventListener;
1717
import org.glassfish.jersey.server.monitoring.RequestEvent;
1818
import org.glassfish.jersey.server.monitoring.RequestEventListener;
19-
import org.slf4j.Logger;
20-
import org.slf4j.LoggerFactory;
2119

2220
/**
2321
* Primary starting class - executed, when the servlet context is started.
2422
*/
2523
@WebListener
2624
public class SetupApplicationListener implements ApplicationEventListener {
2725

28-
private static final Logger LOGGER = LoggerFactory.getLogger(SetupApplicationListener.class);
29-
30-
private static final String ADMIN_NAME = "admin";
26+
// private static final Logger LOGGER = LoggerFactory.getLogger(SetupApplicationListener.class);
3127

3228
@Inject
3329
private SettingsRepository settingRepo;
@@ -63,7 +59,7 @@ public RequestEventListener onRequest(final RequestEvent requestEvent) {
6359

6460

6561
/**
66-
* Adds the default settings to the database
62+
* Adds the default settings to the database.
6763
*/
6864
private void addDefaultSettings() {
6965
final String origin = "backend";

settings-service/src/main/java/net/explorviz/settings/services/SettingsRepository.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public Optional<Setting> find(final String id) {
7070
return Optional.empty();
7171
}
7272

73-
final Class[] types = {RangeSetting.class, FlagSetting.class};
73+
final Class<?>[] types = {RangeSetting.class, FlagSetting.class};
7474

75-
for (final Class<? extends Setting> t : types) {
76-
final Setting setting = this.datastore.get(t, id);
75+
for (final Class<?> t : types) {
76+
final Setting setting = (Setting) this.datastore.get(t, id);
7777
final Optional<Setting> res = Optional.ofNullable(setting);
7878

7979
if (res.isPresent()) {

settings-service/src/main/java/net/explorviz/settings/services/validation/PreferenceValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class PreferenceValidator {
1717

1818
private final UserPreference up;
1919

20-
private final List<Class> settingTypes = new ArrayList<>();
20+
private final List<Class<?>> settingTypes = new ArrayList<>();
2121

2222

2323

settings-service/src/test/java/net/explorviz/settings/services/validation/PreferenceValidatorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class PreferenceValidatorTest {
2424
private static final String ERROR = "Valid preference but exception thrown";
2525

2626

27-
private static final double DEFAULT = 0.001;
27+
// private static final double DEFAULT = 0.001;
2828
private static final double MIN = -10.01;
2929
private static final double MAX = 102;
3030

user-service/src/main/java/net/explorviz/security/util/PasswordStorage.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* "https://github.com/defuse/password-hashing">https://github.com/defuse/password-hashing</a>
1616
*
1717
*/
18-
@SuppressWarnings({"PMD"})
1918
public class PasswordStorage {
2019

2120
// CHECKSTYLE.OFF: javadoc

0 commit comments

Comments
 (0)