@@ -112,11 +112,11 @@ public DefaultArtifact(String coords, Map<String, String> properties, ArtifactTy
112
112
throw new IllegalArgumentException ("Bad artifact coordinates " + coords
113
113
+ ", expected format is <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>" );
114
114
}
115
- groupId = m .group (1 ). intern () ;
116
- artifactId = m .group (2 ). intern () ;
117
- extension = get (m .group (4 ), type == null ? "jar" : type .getExtension ()). intern () ;
118
- classifier = get (m .group (6 ), type == null ? "" : type .getClassifier ()). intern () ;
119
- this .version = emptify (m .group (7 )). intern () ;
115
+ groupId = m .group (1 );
116
+ artifactId = m .group (2 );
117
+ extension = get (m .group (4 ), type == null ? "jar" : type .getExtension ());
118
+ classifier = get (m .group (6 ), type == null ? "" : type .getClassifier ());
119
+ this .version = emptify (m .group (7 ));
120
120
this .path = null ;
121
121
this .properties = mergeArtifactProperties (properties , (type != null ) ? type .getProperties () : null );
122
122
}
@@ -193,19 +193,19 @@ public DefaultArtifact(
193
193
String version ,
194
194
Map <String , String > properties ,
195
195
ArtifactType type ) {
196
- this .groupId = emptify (groupId ). intern () ;
197
- this .artifactId = emptify (artifactId ). intern () ;
196
+ this .groupId = emptify (groupId );
197
+ this .artifactId = emptify (artifactId );
198
198
if (classifier != null || type == null ) {
199
- this .classifier = emptify (classifier ). intern () ;
199
+ this .classifier = emptify (classifier );
200
200
} else {
201
- this .classifier = emptify (type .getClassifier ()). intern () ;
201
+ this .classifier = emptify (type .getClassifier ());
202
202
}
203
203
if (extension != null || type == null ) {
204
- this .extension = emptify (extension ). intern () ;
204
+ this .extension = emptify (extension );
205
205
} else {
206
- this .extension = emptify (type .getExtension ()). intern () ;
206
+ this .extension = emptify (type .getExtension ());
207
207
}
208
- this .version = emptify (version ). intern () ;
208
+ this .version = emptify (version );
209
209
this .path = null ;
210
210
this .properties = mergeArtifactProperties (properties , (type != null ) ? type .getProperties () : null );
211
211
}
@@ -255,11 +255,11 @@ public DefaultArtifact(
255
255
String version ,
256
256
Map <String , String > properties ,
257
257
File file ) {
258
- this .groupId = emptify (groupId ). intern () ;
259
- this .artifactId = emptify (artifactId ). intern () ;
260
- this .classifier = emptify (classifier ). intern () ;
261
- this .extension = emptify (extension ). intern () ;
262
- this .version = emptify (version ). intern () ;
258
+ this .groupId = emptify (groupId );
259
+ this .artifactId = emptify (artifactId );
260
+ this .classifier = emptify (classifier );
261
+ this .extension = emptify (extension );
262
+ this .version = emptify (version );
263
263
this .path = file != null ? file .toPath () : null ;
264
264
this .properties = copyProperties (properties );
265
265
}
@@ -284,11 +284,11 @@ public DefaultArtifact(
284
284
String version ,
285
285
Map <String , String > properties ,
286
286
Path path ) {
287
- this .groupId = emptify (groupId ). intern () ;
288
- this .artifactId = emptify (artifactId ). intern () ;
289
- this .classifier = emptify (classifier ). intern () ;
290
- this .extension = emptify (extension ). intern () ;
291
- this .version = emptify (version ). intern () ;
287
+ this .groupId = emptify (groupId );
288
+ this .artifactId = emptify (artifactId );
289
+ this .classifier = emptify (classifier );
290
+ this .extension = emptify (extension );
291
+ this .version = emptify (version );
292
292
this .path = path ;
293
293
this .properties = copyProperties (properties );
294
294
}
@@ -302,11 +302,11 @@ public DefaultArtifact(
302
302
Path path ,
303
303
Map <String , String > properties ) {
304
304
// NOTE: This constructor assumes immutability of the provided properties, for internal use only
305
- this .groupId = emptify (groupId ). intern () ;
306
- this .artifactId = emptify (artifactId ). intern () ;
307
- this .classifier = emptify (classifier ). intern () ;
308
- this .extension = emptify (extension ). intern () ;
309
- this .version = emptify (version ). intern () ;
305
+ this .groupId = emptify (groupId );
306
+ this .artifactId = emptify (artifactId );
307
+ this .classifier = emptify (classifier );
308
+ this .extension = emptify (extension );
309
+ this .version = emptify (version );
310
310
this .path = path ;
311
311
this .properties = properties ;
312
312
}
0 commit comments