Skip to content

Commit

Permalink
kernel: Fix redundant nullness annotation warnings
Browse files Browse the repository at this point in the history
Fix these warnings [1] below in SchedWS and IoByProcessView.

Fix the default Eclipse formatting where lightly applicable while there.

[1] "The nullness annotation is redundant with a default that applies to
this location".

Change-Id: I1ccf2698836fac12f2f989bb1942c614a7658ede
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/201545
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
  • Loading branch information
marco-miller committed Apr 27, 2023
1 parent c02286b commit 994c9e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

package org.eclipse.tracecompass.incubator.internal.kernel.core.swslatency;

import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.tracecompass.analysis.os.linux.core.model.OsStrings;
import org.eclipse.tracecompass.datastore.core.interval.IHTIntervalReader;
import org.eclipse.tracecompass.datastore.core.serialization.ISafeByteBufferWriter;
Expand All @@ -35,7 +34,7 @@ public final class SchedWS implements INamedSegment, IElementResolver {
/**
* The reader for this segment class
*/
public static final IHTIntervalReader<@NonNull ISegment> READER = buffer -> new SchedWS(buffer.getLong(), buffer.getLong(), buffer.getString(), buffer.getInt(), buffer.getInt());
public static final IHTIntervalReader<ISegment> READER = buffer -> new SchedWS(buffer.getLong(), buffer.getLong(), buffer.getString(), buffer.getInt(), buffer.getInt());

/**
* The subset of information that is available from the sched wakeup/switch
Expand Down Expand Up @@ -141,7 +140,7 @@ public int getSizeOnDisk() {
}

@Override
public void writeSegment(@NonNull ISafeByteBufferWriter buffer) {
public void writeSegment(ISafeByteBufferWriter buffer) {
buffer.putLong(fStartTime);
buffer.putLong(fEndTime);
buffer.putString(fName);
Expand All @@ -150,7 +149,7 @@ public void writeSegment(@NonNull ISafeByteBufferWriter buffer) {
}

@Override
public int compareTo(@NonNull ISegment o) {
public int compareTo(ISegment o) {
int ret = INamedSegment.super.compareTo(o);
if (ret != 0) {
return ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class IoByProcessView extends AbstractMultiView {
*/
public static final String VIEW_ID = "org.eclipse.tracecompass.kernel.ui.view.iobyprocess"; //$NON-NLS-1$


private @Nullable Integer fSelectedTid = null;
private Set<Integer> fCheckedTids = new HashSet<>();

Expand Down Expand Up @@ -116,7 +115,7 @@ public void dispose() {
}

@Override
protected @NonNull Map<@NonNull String, @NonNull Object> getFetchTreeParameters() {
protected @NonNull Map<String, Object> getFetchTreeParameters() {
Integer tid = fSelectedTid;
Set<Integer> tids = new HashSet<>(fCheckedTids);
if (tid != null) {
Expand Down Expand Up @@ -172,7 +171,7 @@ protected void partControlCreated(Composite mainComposite, SashForm sashForm) {

tgViewer.init();
addLane(tgViewer);
fTgViewer = tgViewer;
fTgViewer = tgViewer;
}

}

0 comments on commit 994c9e7

Please sign in to comment.