Skip to content

Commit b424c45

Browse files
committed
pinpoint-apm#2415 Downgrade the JDK version of commons-server
- Downgrade language level : 1.7->1.6
1 parent bee8747 commit b424c45

File tree

47 files changed

+196
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+196
-126
lines changed

‎commons-server/pom.xml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
<jdk.version>1.7</jdk.version>
1616
<jdk.home>${env.JAVA_7_HOME}</jdk.home>
1717
<sniffer.artifactid>java17</sniffer.artifactid>
18+
19+
<!-- jdk.version 1.6 : for profiler-test compatibility -->
20+
<!-- jdk.home 1.7 : for hbase compatibility -->
21+
<!--
22+
<jdk.version>1.6</jdk.version>
23+
<jdk.home>${env.JAVA_7_HOME}</jdk.home>
24+
<sniffer.artifactid>java16</sniffer.artifactid>
25+
-->
1826
</properties>
1927

2028
<dependencies>

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/AnnotationComparator.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.navercorp.pinpoint.common.server.bo;
22

3+
import com.navercorp.pinpoint.common.server.util.IntegerUtils;
4+
35
import java.util.Comparator;
46

57
/**
@@ -11,6 +13,7 @@ public class AnnotationComparator implements Comparator<AnnotationBo> {
1113

1214
@Override
1315
public int compare(AnnotationBo o1, AnnotationBo o2) {
14-
return Integer.compare(o1.getKey(), o2.getKey());
16+
return IntegerUtils.compare(o1.getKey(), o2.getKey());
1517
}
18+
1619
}

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/SpanBo.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ public class SpanBo implements Event, BasicSpan {
5050
private String endPoint;
5151
private int apiId;
5252

53-
private List<AnnotationBo> annotationBoList = new ArrayList<>();
53+
private List<AnnotationBo> annotationBoList = new ArrayList<AnnotationBo>();
5454
private short flag; // optional
5555
private int errCode;
5656

57-
private List<SpanEventBo> spanEventBoList = new ArrayList<>();
57+
private List<SpanEventBo> spanEventBoList = new ArrayList<SpanEventBo>();
5858

5959
private long collectorAcceptTime;
6060

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/SpanChunkBo.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class SpanChunkBo implements BasicSpan {
2424
private short serviceType;
2525
private Short applicationServiceType;
2626

27-
private List<SpanEventBo> spanEventBoList = new ArrayList<>();
27+
private List<SpanEventBo> spanEventBoList = new ArrayList<SpanEventBo>();
2828

2929
private long collectorAcceptTime;
3030

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/SpanEventComparator.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.navercorp.pinpoint.common.server.bo;
22

3+
import com.navercorp.pinpoint.common.server.util.IntegerUtils;
4+
import com.navercorp.pinpoint.common.server.util.ShortUtils;
5+
36
import java.util.Comparator;
47

58
/**
@@ -11,13 +14,13 @@ public class SpanEventComparator implements Comparator<SpanEventBo> {
1114

1215
@Override
1316
public int compare(SpanEventBo o1, SpanEventBo o2) {
14-
final int sequenceCompare = Short.compare(o1.getSequence(), o2.getSequence());
17+
final int sequenceCompare = ShortUtils.compare(o1.getSequence(), o2.getSequence());
1518
if (sequenceCompare != 0) {
1619
return sequenceCompare;
1720
}
1821
final int asyncId1 = o1.getAsyncId();
1922
final int asyncId2 = o2.getAsyncId();
20-
final int asyncIdCompare = Integer.compare(asyncId1, asyncId2);
23+
final int asyncIdCompare = IntegerUtils.compare(asyncId1, asyncId2);
2124
if (asyncIdCompare != 0) {
2225
// bug Comparison method violates its general contract!
2326
// TODO temporary fix
@@ -29,6 +32,6 @@ public int compare(SpanEventBo o1, SpanEventBo o2) {
2932
// }
3033
return asyncIdCompare;
3134
}
32-
return Integer.compare(o1.getAsyncSequence(), o2.getAsyncSequence());
35+
return IntegerUtils.compare(o1.getAsyncSequence(), o2.getAsyncSequence());
3336
}
3437
}

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/SpanFactory.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ private TransactionId newTransactionId(byte[] transactionIdBytes, BasicSpan basi
213213

214214
private List<SpanEventBo> buildSpanEventBoList(List<TSpanEvent> spanEventList) {
215215
if (CollectionUtils.isEmpty(spanEventList)) {
216-
return new ArrayList<>();
216+
return new ArrayList<SpanEventBo>();
217217
}
218-
List<SpanEventBo> spanEventBoList = new ArrayList<>(spanEventList.size());
218+
List<SpanEventBo> spanEventBoList = new ArrayList<SpanEventBo>(spanEventList.size());
219219
for (TSpanEvent tSpanEvent : spanEventList) {
220220
final SpanEventBo spanEventBo = buildSpanEventBo(tSpanEvent);
221221
if (!spanEventFilter.filter(spanEventBo)) {
@@ -230,9 +230,9 @@ private List<SpanEventBo> buildSpanEventBoList(List<TSpanEvent> spanEventList) {
230230

231231
private List<AnnotationBo> buildAnnotationList(List<TAnnotation> tAnnotationList) {
232232
if (tAnnotationList == null) {
233-
return new ArrayList<>();
233+
return new ArrayList<AnnotationBo>();
234234
}
235-
List<AnnotationBo> boList = new ArrayList<>(tAnnotationList.size());
235+
List<AnnotationBo> boList = new ArrayList<AnnotationBo>(tAnnotationList.size());
236236
for (TAnnotation tAnnotation : tAnnotationList) {
237237
final AnnotationBo annotationBo = newAnnotationBo(tAnnotation);
238238
boList.add(annotationBo);

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/codec/stat/AgentStatDataPointCodec.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void encodeTimestamps(Buffer buffer, List<Long> timestamps) {
4343
}
4444

4545
public List<Long> decodeTimestamps(long initialTimestamp, Buffer buffer, int numValues) {
46-
List<Long> timestamps = new ArrayList<>(numValues);
46+
List<Long> timestamps = new ArrayList<Long>(numValues);
4747
timestamps.add(initialTimestamp);
4848
long prevTimestamp = initialTimestamp;
4949
long prevDelta = 0;

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/codec/stat/strategy/UnsignedIntegerEncodingStrategy.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
* @author HyunGil Jeong
3636
*/
3737
public enum UnsignedIntegerEncodingStrategy implements EncodingStrategy<Integer> {
38-
NONE(new ValueEncodingStrategy.Unsigned<>(TypedBufferHandler.INTEGER_BUFFER_HANDLER)),
39-
REPEAT_COUNT(new RepeatCountEncodingStrategy.Unsigned<>(TypedBufferHandler.INTEGER_BUFFER_HANDLER)),
40-
DELTA(new DeltaEncodingStrategy.Unsigned<>(TypedBufferHandler.INTEGER_BUFFER_HANDLER, ArithmeticOperation.INTEGER_OPERATIONS)),
41-
DELTA_OF_DELTA(new DeltaOfDeltaEncodingStrategy.Unsigned<>(TypedBufferHandler.INTEGER_BUFFER_HANDLER, ArithmeticOperation.INTEGER_OPERATIONS)), ;
38+
NONE(new ValueEncodingStrategy.Unsigned<Integer>(TypedBufferHandler.INTEGER_BUFFER_HANDLER)),
39+
REPEAT_COUNT(new RepeatCountEncodingStrategy.Unsigned<Integer>(TypedBufferHandler.INTEGER_BUFFER_HANDLER)),
40+
DELTA(new DeltaEncodingStrategy.Unsigned<Integer>(TypedBufferHandler.INTEGER_BUFFER_HANDLER, ArithmeticOperation.INTEGER_OPERATIONS)),
41+
DELTA_OF_DELTA(new DeltaOfDeltaEncodingStrategy.Unsigned<Integer>(TypedBufferHandler.INTEGER_BUFFER_HANDLER, ArithmeticOperation.INTEGER_OPERATIONS)), ;
4242

4343
private final EncodingStrategy<Integer> delegate;
4444

@@ -92,7 +92,7 @@ public List<Integer> getValues() {
9292

9393
public static class Builder implements StrategyAnalyzerBuilder<Integer> {
9494

95-
private final List<Integer> values = new ArrayList<>();
95+
private final List<Integer> values = new ArrayList<Integer>();
9696
private int previousValue = 0;
9797
private int previousDelta = 0;
9898

@@ -138,7 +138,7 @@ public StrategyAnalyzer<Integer> build() {
138138
} else {
139139
bestStrategy = REPEAT_COUNT;
140140
}
141-
List<Integer> values = new ArrayList<>(this.values);
141+
List<Integer> values = new ArrayList<Integer>(this.values);
142142
this.values.clear();
143143
return new Analyzer(bestStrategy, values);
144144
}

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/codec/stat/strategy/UnsignedLongEncodingStrategy.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
* @author HyunGil Jeong
3636
*/
3737
public enum UnsignedLongEncodingStrategy implements EncodingStrategy<Long> {
38-
NONE(new ValueEncodingStrategy.Unsigned<>(TypedBufferHandler.LONG_BUFFER_HANDLER)),
39-
REPEAT_COUNT(new RepeatCountEncodingStrategy.Unsigned<>(TypedBufferHandler.LONG_BUFFER_HANDLER)),
40-
DELTA(new DeltaEncodingStrategy.Unsigned<>(TypedBufferHandler.LONG_BUFFER_HANDLER, ArithmeticOperation.LONG_OPERATIONS)),
41-
DELTA_OF_DELTA(new DeltaOfDeltaEncodingStrategy.Unsigned<>(TypedBufferHandler.LONG_BUFFER_HANDLER, ArithmeticOperation.LONG_OPERATIONS));
38+
NONE(new ValueEncodingStrategy.Unsigned<Long>(TypedBufferHandler.LONG_BUFFER_HANDLER)),
39+
REPEAT_COUNT(new RepeatCountEncodingStrategy.Unsigned<Long>(TypedBufferHandler.LONG_BUFFER_HANDLER)),
40+
DELTA(new DeltaEncodingStrategy.Unsigned<Long>(TypedBufferHandler.LONG_BUFFER_HANDLER, ArithmeticOperation.LONG_OPERATIONS)),
41+
DELTA_OF_DELTA(new DeltaOfDeltaEncodingStrategy.Unsigned<Long>(TypedBufferHandler.LONG_BUFFER_HANDLER, ArithmeticOperation.LONG_OPERATIONS));
4242

4343
private final EncodingStrategy<Long> delegate;
4444

@@ -92,7 +92,7 @@ public List<Long> getValues() {
9292

9393
public static class Builder implements StrategyAnalyzerBuilder<Long> {
9494

95-
private final List<Long> values = new ArrayList<>();
95+
private final List<Long> values = new ArrayList<Long>();
9696
private long previousValue = 0L;
9797
private long previousDelta = 0L;
9898

@@ -138,7 +138,7 @@ public StrategyAnalyzer<Long> build() {
138138
} else {
139139
bestStrategy = REPEAT_COUNT;
140140
}
141-
List<Long> values = new ArrayList<>(this.values);
141+
List<Long> values = new ArrayList<Long>(this.values);
142142
this.values.clear();
143143
return new Analyzer(bestStrategy, values);
144144
}

‎commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/codec/stat/strategy/UnsignedShortEncodingStrategy.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* @author HyunGil Jeong
3333
*/
3434
public enum UnsignedShortEncodingStrategy implements EncodingStrategy<Short> {
35-
NONE(new ValueEncodingStrategy.Unsigned<>(TypedBufferHandler.SHORT_BUFFER_HANDLER)),
36-
REPEAT_COUNT(new RepeatCountEncodingStrategy.Unsigned<>(TypedBufferHandler.SHORT_BUFFER_HANDLER));
35+
NONE(new ValueEncodingStrategy.Unsigned<Short>(TypedBufferHandler.SHORT_BUFFER_HANDLER)),
36+
REPEAT_COUNT(new RepeatCountEncodingStrategy.Unsigned<Short>(TypedBufferHandler.SHORT_BUFFER_HANDLER));
3737

3838
private final EncodingStrategy<Short> delegate;
3939

@@ -89,7 +89,7 @@ public static class Builder implements StrategyAnalyzerBuilder<Short> {
8989

9090
private static final int SHORT_BYTE_SIZE = 2;
9191

92-
private final List<Short> values = new ArrayList<>();
92+
private final List<Short> values = new ArrayList<Short>();
9393
private short previousValue = 0;
9494

9595
private int byteSizeValue = 0;
@@ -124,7 +124,7 @@ public StrategyAnalyzer<Short> build() {
124124
} else {
125125
bestStrategy = REPEAT_COUNT;
126126
}
127-
List<Short> values = new ArrayList<>(this.values);
127+
List<Short> values = new ArrayList<Short>(this.values);
128128
this.values.clear();
129129
return new Analyzer(bestStrategy, values);
130130
}

0 commit comments

Comments
 (0)