File tree 2 files changed +35
-0
lines changed
testing-modules/testing-libraries-2
src/main/java/com/baeldung/spotbugs
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 156
156
</environmentVariables >
157
157
</configuration >
158
158
</plugin >
159
+ <plugin >
160
+ <groupId >com.github.spotbugs</groupId >
161
+ <artifactId >spotbugs-maven-plugin</artifactId >
162
+ <version >${spotbugs-maven-plugin.version} </version >
163
+ <dependencies >
164
+ <dependency >
165
+ <groupId >com.github.spotbugs</groupId >
166
+ <artifactId >spotbugs</artifactId >
167
+ <version >${spotbugs.version} </version >
168
+ </dependency >
169
+ </dependencies >
170
+ <configuration >
171
+ <htmlOutput >true</htmlOutput >
172
+ </configuration >
173
+ </plugin >
159
174
</plugins >
160
175
<resources >
161
176
<resource >
172
187
<system-stubs .version>2.1.3</system-stubs .version>
173
188
<testng .version>7.8.0</testng .version>
174
189
<junit .pioneer.version>2.1.0</junit .pioneer.version>
190
+ <spotbugs-maven-plugin .version>4.8.5.0</spotbugs-maven-plugin .version>
191
+ <spotbugs .version>4.8.5</spotbugs .version>
175
192
</properties >
176
193
177
194
</project >
Original file line number Diff line number Diff line change
1
+ package com .baeldung .spotbugs ;
2
+
3
+ import java .nio .charset .StandardCharsets ;
4
+ import java .util .Scanner ;
5
+
6
+ public class Application {
7
+
8
+ public static final String NAME = "Name: " ;
9
+
10
+ private Application () {
11
+ }
12
+
13
+ public static String readName () {
14
+ Scanner scanner = new Scanner (System .in , StandardCharsets .UTF_8 .displayName ());
15
+ String input = scanner .next ();
16
+ return NAME .concat (input );
17
+ }
18
+ }
You can’t perform that action at this time.
0 commit comments