test vari

This commit is contained in:
Fabio Scotto di Santolo
2018-09-29 18:35:36 +02:00
parent d382fdb383
commit 7a84556838
19 changed files with 228 additions and 256 deletions

View File

@@ -1,2 +0,0 @@
@ squid:S1068"")Remove this unused "breed" private field.(<28><>ϱ

View File

@@ -1,7 +0,0 @@
O squid:S1612",Replace this lambda with a method reference.(<28>ҁ<EFBFBD><D281><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
O squid:S1612 ",Replace this lambda with a method reference.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
[
squid:S106 "9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
V
squid:S106"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>8<>֊<EFBFBD><D68A>,

View File

@@ -1,10 +0,0 @@
[
squid:S106"9Replace this use of System.out or System.err by a logger.(<28><EFBFBD><E6B6B6><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
[
squid:S106"9Replace this use of System.out or System.err by a logger.(酪<><EFA499><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><EFBFBD>,
X squid:S1161)":Add the "@Override" annotation above this method signature(<28><><EFBFBD><EFBFBD>8򺑗<38>,
[
squid:S106*"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8򺑗<38>,
V
squid:S106#"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,

View File

@@ -1,30 +0,0 @@
bsquid:UselessImportCheck"7Remove this unused import 'java.text.SimpleDateFormat'.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
U
squid:S106O"9Replace this use of System.out or System.err by a logger.(έ<>a8<61><38><EFBFBD><EFBFBD><EFBFBD>,
U
squid:S106M"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD>28<32><38><EFBFBD><EFBFBD><EFBFBD>,
V
squid:S106Y"9Replace this use of System.out or System.err by a logger.(֗ǹ8<><38><EFBFBD><EFBFBD><EFBFBD>,
bsquid:CommentedOutCodeLine9"<This block of commented-out lines of code should be removed.(<28>ԟ<EFBFBD>
[
squid:S106V"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
V
squid:S106W"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
esquid:UselessImportCheck ":Remove this unused import 'java.time.temporal.ChronoUnit'.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
F squid:S1481H"(Remove this unused "zdt" local variable.(<28>8<><38>ؿ<EFBFBD>,
U squid:S1854H"7Remove this useless assignment to local variable "zdt".(<28>8<><38>ؿ<EFBFBD>,
jsquid:UselessImportCheck"?Remove this unused import 'java.time.format.DateTimeFormatter'.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
nsquid:UselessImportCheck"">Remove this unused import 'java.time.temporal.TemporalAmount'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
gsquid:CommentedOutCodeLine;"<This block of commented-out lines of code should be removed.(<28><>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106R"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
_squid:UselessImportCheck&"/Remove this unused import 'java.util.Optional'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
[ squid:S1854B"=Remove this useless assignment to local variable "localDate".(<28><><EFBFBD><EFBFBD>8<><38>ؗ<EFBFBD>,
hsquid:UselessImportCheck("8Remove this unused import 'java.util.stream.Collectors'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>,
L squid:S1481B".Remove this unused "localDate" local variable.(<28><><EFBFBD><EFBFBD>8<><38>ؗ<EFBFBD>,
ksquid:UselessImportCheck!"@Remove this unused import 'java.time.temporal.TemporalAccessor'.(щ<><D189>8<><38><EFBFBD><EFBFBD><EFBFBD>,
O
squid:S1067"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
[
squid:S106I"9Replace this use of System.out or System.err by a logger.(<28>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38>ҿ<EFBFBD>,

View File

@@ -1,35 +0,0 @@
Ssquid:UnusedPrivateMethod:"/Remove this unused private "question33" method.(ɺ<>@
T
squid:S106="9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
b squid:S1764H"KCorrect one of the identical sub-expressions on both sides of operator "&&"(<28><>΃
Q squid:S2209U"5Change this instance-reference to a static reference.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
T
squid:S106Q"9Replace this use of System.out or System.err by a logger.(<28><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>
[squid:UnusedPrivateMethod3"/Remove this unused private "question13" method.(<28><><EFBFBD><EFBFBD>8<><38>Ԧ<EFBFBD>,
gsquid:CommentedOutCodeLinew"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Tsquid:UnusedPrivateMethodE"/Remove this unused private "question39" method.(<28><><EFBFBD><EFBFBD>
D squid:S1172u"(Remove this unused method parameter "j".(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Msquid:UnusedPrivateMethodP"(Remove this unused private "add" method.(<28><><EFBFBD><EFBFBD>
Ysquid:UnusedPrivateMethod@"/Remove this unused private "question35" method.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
T
squid:S106I"9Replace this use of System.out or System.err by a logger.(樤<><E6A8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
T
squid:S106^"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
O
squid:S106M"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
? squid:S1481G"(Remove this unused "res" local variable.(<28><><EFBFBD><EFBFBD>
Q squid:S2209U"5Change this instance-reference to a static reference.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Zsquid:UnusedPrivateMethod+".Remove this unused private "question8" method.(<28><><EFBFBD><EFBFBD>8<><38>Ԧ<EFBFBD>,
N squid:S1854H"7Remove this useless assignment to local variable "res".(<28><>΃
O
squid:S106V"9Replace this use of System.out or System.err by a logger.(<28><>ƫ
T
squid:S106B"9Replace this use of System.out or System.err by a logger.(<28><>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD>
Q squid:S2209U"5Change this instance-reference to a static reference.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Rsquid:UnusedPrivateMethodL"(Remove this unused private "add" method.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Ysquid:UnusedPrivateMethodT"/Remove this unused private "question63" method.(<28>Ə<EFBFBD><C68F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
O
squid:S1067"9Replace this use of System.out or System.err by a logger.(<28>™<EFBFBD>
V
squid:S1060"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>8<><38>Ԧ<EFBFBD>,

View File

@@ -1,134 +0,0 @@
O
squid:S106:"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
csquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><>ʼ
Zsquid:UnusedPrivateMethod<18>"/Remove this unused private "question42" method.(<28>ߛ<EFBFBD><DF9B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question47" method.(<28><><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question39" method.(<28><><EFBFBD><EFBFBD>
? squid:S1172<18>"(Remove this unused method parameter "x".(<28><><EFBFBD>9
Ssquid:UnusedPrivateMethod=".Remove this unused private "question3" method.(<28><><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question50" method.(<28><><EFBFBD><EFBFBD>
Zsquid:UnusedPrivateMethod<18>"/Remove this unused private "question52" method.(<28><>˭<EFBFBD><CBAD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(㿢<><E3BFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question45" method.(<28><>lj
8 squid:S2129<18>" Remove this "String" constructor(<28><>ѷ
Zsquid:UnusedPrivateMethod<18>"/Remove this unused private "question53" method.(與<><E88887><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
= squid:S2129<18>" Remove this "String" constructor(˽<><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
= squid:S2129<18>" Remove this "String" constructor(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question26" method.(<28>ʵ<EFBFBD>
Zsquid:UnusedPrivateMethod<18>"/Remove this unused private "question43" method.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
c squid:S1192<18>"FDefine a constant instead of duplicating this literal "James" 5 times.(ٞ<><D99E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
_ squid:S00112<18>"FDefine and throw a dedicated exception instead of using a generic one.(<28>ѥ<EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question54" method.(<28><><EFBFBD><EFBFBD>
Xsquid:UnusedPrivateMethodG".Remove this unused private "question4" method.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
T
squid:S106c"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
hsquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
csquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question48" method.(<28>۟<EFBFBD>
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
H squid:S4524<18>"+Move this default to the end of the switch.(ݖҘ<DD96><D298><EFBFBD><EFBFBD><EFBFBD>
O
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD>k
Xsquid:UnusedPrivateMethod4".Remove this unused private "question1" method.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><>ܓ
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U squid:S1854<18>"8Remove this useless assignment to local variable "str1".(˽<><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Rsquid:UnusedPrivateMethod8".Remove this unused private "question2" method.(<28><><EFBFBD>Q
hsquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(ީ<><DEA9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
hsquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD>
8 squid:S2129<18>" Remove this "String" constructor(<28><><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><>ڋ<EFBFBD><DA8B><EFBFBD><EFBFBD><EFBFBD>
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question61" method.(<28><><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><>Ɋ<EFBFBD><C98A><EFBFBD><EFBFBD><EFBFBD>
T
squid:S106D"9Replace this use of System.out or System.err by a logger.(<28><>Ѫ<EFBFBD><D1AA><EFBFBD><EFBFBD><EFBFBD>
8 squid:S2129<18>" Remove this "String" constructor(<28><><EFBFBD><EFBFBD>
h
squid:S128<18>"LEnd this switch case with an unconditional break, return or throw statement.(ݖҘ<DD96><D298><EFBFBD><EFBFBD><EFBFBD>
F squid:S1481<18>")Remove this unused "obj2" local variable.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
R squid:S1610<18>"5Convert the abstract class "Super" into an interface.(<28><EFBFBD><E1908F><EFBFBD><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question28" method.(<28><><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Zsquid:UnusedPrivateMethod<18>"/Remove this unused private "question59" method.(<28><EFBFBD><EC87B2><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(㿢<><E3BFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><>ӛ
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><>ƫ
s squid:S2159<18>"VRemove this call to "equals"; comparisons between unrelated types always return false.(ީ<><DEA9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
H squid:S2201<18>"+The return value of "replace" must be used.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>%squid:RedundantThrowsDeclarationCheck<18>"lRemove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.(<28>ѥ<EFBFBD>
O
squid:S106o"9Replace this use of System.out or System.err by a logger.(<28>™<EFBFBD>
= squid:S2129^"!Remove this "Integer" constructor(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
E squid:S1172<18>"(Remove this unused method parameter "x".(<28><EFBFBD><EE9D84><EFBFBD><EFBFBD><EFBFBD>
= squid:S2129_"!Remove this "Integer" constructor(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
s squid:S2159<18>"VRemove this call to "equals"; comparisons between unrelated types always return false.(ީ<><DEA9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U squid:S1854<18>"8Remove this useless assignment to local variable "str1".(<28><>ڋ<EFBFBD><DA8B><EFBFBD><EFBFBD><EFBFBD>
7 squid:S2129`"!Remove this "Integer" constructor(<28><><EFBFBD>"
T
squid:S106W"9Replace this use of System.out or System.err by a logger.(›<><C29B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
T
squid:S106R"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Tsquid:UnusedPrivateMethod<18>"/Remove this unused private "question33" method.(ɺ<>@
h
squid:S128<18>"LEnd this switch case with an unconditional break, return or throw statement.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
csquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><>Ƚ
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD><EFBFBD>
Q squid:S1854h"5Remove this useless assignment to local variable "a".(<28>ݦ<EFBFBD><DDA6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
U
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
c
squid:S128<18>"LEnd this switch case with an unconditional break, return or throw statement.(<28><><EFBFBD><EFBFBD>
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question57" method.(<28><><EFBFBD><EFBFBD>
b squid:S1301<18>"KReplace this "switch" statement by "if" statements to increase readability.(<28><><EFBFBD>8
Usquid:UnusedPrivateMethod<18>"/Remove this unused private "question55" method.(<28><><EFBFBD><EFBFBD>
hsquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
d$squid:AssignmentInSubExpressionCheck<18>".Extract the assignment out of this expression.(<28><>ڋ<EFBFBD><DA8B><EFBFBD><EFBFBD><EFBFBD>
P
squid:S106<18>"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
csquid:CommentedOutCodeLine<18>"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD>
T
squid:S106h"9Replace this use of System.out or System.err by a logger.(<28>ݦ<EFBFBD><DDA6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Msquid:UnusedPrivateMethod<18>"'Remove this unused private "m1" method.(<28>ѥ<EFBFBD>
O
squid:S106Y"9Replace this use of System.out or System.err by a logger.(<28><>ٕ
O
squid:S106{"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD>
U squid:S1854<18>"8Remove this useless assignment to local variable "obj2".(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

View File

@@ -1,3 +0,0 @@
gsquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>"squid:ClassVariableVisibilityCheck "UMake treeCount a static final constant or non-public and provide accessors if needed.(<28><><EFBFBD><EFBFBD>

View File

@@ -1,3 +0,0 @@
T
squid:S106"9Replace this use of System.out or System.err by a logger.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

View File

@@ -1,7 +0,0 @@
E squid:S1444")Make this "public static wag" field final(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
L squid:S2696"6Make the enclosing method "static" or remove this set.(é<>_
<EFBFBD>"squid:ClassVariableVisibilityCheck"OMake wag a static final constant or non-public and provide accessors if needed.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
c squid:S1223"LRename this method to prevent any misunderstanding or make it a constructor.(<28><><EFBFBD><EFBFBD>
K squid:S2209"5Change this instance-reference to a static reference.(é<>_
f squid:S00100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD>

View File

@@ -1,23 +0,0 @@
Y
)src/com/oracle/associate/java8/Exam1.java,b/2/b2e05cb2c51a4c93f01c778125471c05ef79bde8
^
.src/com/oracle/associate/java8/test/Paper.java,5/4/5418fb02e2d91c8779a16a8c321acf459a888307
^
.src/com/oracle/associate/java8/test/Robot.java,f/5/f5d5ee0d986586d2c0518c976d48e7dd2fc3e30a
Y
)src/com/oracle/associate/java8/Exam2.java,a/e/aef560b35d7384699f32aef9d42c31ad9d3ced14
b
2src/com/oracle/associate/java8/test/NewsPaper.java,4/0/4001d9f1bf9963c71abd4d1038777af085aa8373
a
1src/com/oracle/associate/java8/test/DateTest.java,7/b/7b11771a186730063626106382669a47cd441c6b
g
7src/com/oracle/associate/java8/test/FunctionalTest.java,1/0/107b897f7854331a98a6a8581840149e42ff2115
^
.src/com/oracle/associate/java8/test/Puppy.java,f/d/fd87dd9510dd66f0eddb68bfcbff43d5bd517449
c
3src/com/oracle/associate/java8/test/RainForest.java,c/4/c46facfa080d31ea55afe2a9118bd91c13a8397e
W
'src/com/oracle/associate/java8/Dog.java,0/a/0aa1aa07115cd8e0632bccad058c6cac493b1f73
i
9src/com/oracle/associate/java8/test/DefaultInterface.java,7/1/7197bcb1839ba6daa7a69755da50301969ae183c

View File

@@ -0,0 +1,64 @@
package com.oracle.java8.associate;
import java.util.ArrayList;
import java.util.List;
public class Auto {
private static int conteggio;
private String marca;
static {
System.out.println("Blocco statico");
}
{
System.out.println("Blocco di inizializzazione");
}
public Auto() {
System.out.println("Costruttore");
this.marca = "";
conteggio++;
}
public Auto(String marca) {
this.marca = marca;
}
public String getMarca() {
return this.marca;
}
public void setMarca(String marca) {
this.marca = marca;
}
public static int getConteggio() {
return conteggio;
}
@Override
protected void finalize() throws Throwable {
--conteggio;
super.finalize();
}
public static void main(String[] args) {
List<Auto> autos = new ArrayList<>();
for (int i = 0; i < 5; i++) {
Auto a1 = new Auto();
autos.add(a1);
System.out.println(Auto.getConteggio());
}
autos.clear();
wait(0.1);
System.out.println(Auto.getConteggio());
}
private static void wait(double second) {
try {
System.gc();
Thread.sleep((long) (second * 1000));
} catch (Exception e) {}
}
}

View File

@@ -6,7 +6,7 @@ class Automobile {
} }
} }
class Car extends Automobile { class Car extends Auto {
protected String drive() { protected String drive() {
return "Driving car"; return "Driving car";
} }

View File

@@ -0,0 +1,92 @@
package com.oracle.java8.associate;
public class Eridarieta {
public static void main(String[] args) {
Animale[] animali = {
creaAnimale("Cane"),
creaAnimale("Coccodrillo"),
creaAnimale("Coccodrillo"),
creaAnimale("Cane")
};
for (Animale a : animali) {
if (a instanceof Animale) {
System.out.println(a.getClass().getSimpleName() + " sono un animale");
}
if (a instanceof Mammifero) {
System.out.println(a.getClass().getSimpleName() + " sono un mammifero");
}
if (a instanceof Rettile) {
System.out.println(a.getClass().getSimpleName() + " sono un rettile");
}
a.muove();
}
}
static Animale creaAnimale(String tipo) {
switch (tipo) {
case "Cane":
return new Cane();
case "Coccodrillo":
return new Coccodrillo();
default:
throw new RuntimeException("Tipo animale non esistente");
}
}
}
interface Animale {
void muove();
}
abstract class Mammifero implements Animale {
protected int gambe;
public int getGambe() {
return gambe;
}
public void setGambe(int gambe) {
this.gambe = gambe;
}
}
abstract class Rettile implements Animale {
protected int temperatura;
public int getTemperatura() {
return temperatura;
}
public void setTemperatura(int temperatura) {
this.temperatura = temperatura;
}
}
class Cane extends Mammifero {
public Cane() {
super();
this.gambe = 4;
}
@Override
public void muove() {
System.out.println(String.format("Corre sulle %d gambe", getGambe()));
}
}
class Coccodrillo extends Rettile {
public Coccodrillo() {
super();
this.temperatura = 30;
}
@Override
public void muove() {
System.out.println(String.format("Ha una temperatura di %d°C", temperatura));
}
}

View File

@@ -0,0 +1,51 @@
package com.oracle.java8.associate;
public class Overloading {
public static void main(String[] args) throws Exception {
X o = new X();
o.m(1.0, 2); // 2
o.m(1, 2); // 4
o.m(1, 0f); // 1
o.m(3., 8); // 2
o.m(0L, 9); // 3
o.m();
o = new Y();
o.m();
}
}
class X {
public void m(int x, double y) {
System.out.println("1");
}
public void m(double x, long y) {
System.out.println("2");
}
public void m(float x, int y) {
System.out.println("3");
}
public void m(int x, int y) {
System.out.println("4");
}
public Object m() throws Exception {
System.out.println("m() => X");
return null;
}
}
class Y extends X {
@Override
public String m() throws InstantiationException {
System.out.println("m() => Y");
return null;
}
}

View File

@@ -64,7 +64,7 @@ public class ArrayTest {
//String s = a6[-1]; ArrayIndexOutOfBoundsException //String s = a6[-1]; ArrayIndexOutOfBoundsException
//Field f = new int[0].getClass().getField("length"); java.lang.NoSuchFieldException: length //Field m = new int[0].getClass().getField("length"); java.lang.NoSuchFieldException: length
// non funziona // non funziona
int[] a7 = unmodifieble(new int[]{1, 2, 3, 4, 5}); int[] a7 = unmodifieble(new int[]{1, 2, 3, 4, 5});

View File

@@ -1,6 +1,8 @@
package com.oracle.java8.associate.test; package com.oracle.java8.associate.test;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
public class FunctionalTest { public class FunctionalTest {
@@ -14,6 +16,15 @@ public class FunctionalTest {
EmployeeFactory factory = Employee::new; EmployeeFactory factory = Employee::new;
Employee employee = factory.getEmployee("John Hammond", 25); Employee employee = factory.getEmployee("John Hammond", 25);
System.out.println(employee); System.out.println(employee);
Function<Object, String> convert = FunctionalTest::convert;
String ciao = convert.apply("Ciao");
System.out.println(ciao);
}
private static String convert(Object o) {
Function<Object, String> f = obj -> obj.toString();
return f.apply(o);
} }
} }

View File

@@ -20,5 +20,13 @@ public class StringTest {
System.out.println(sb.capacity()); System.out.println(sb.capacity());
System.out.println(sb.toString()); System.out.println(sb.toString());
System.out.println(s.substring(0, 4)); System.out.println(s.substring(0, 4));
String s1 = "Java";
String[] s2 = {"J", "a", "v", "a"};
String s3 = "";
for (String elem : s2) {
s3 = s3 + elem;
}
System.out.println(s1 == s3);
} }
} }