Skip to content

Commit b9aff05

Browse files
committed
fix java11 build javadoc
Signed-off-by: olivier lamy <olamy@apache.org>
1 parent 41150a4 commit b9aff05

File tree

5 files changed

+36
-15
lines changed

5 files changed

+36
-15
lines changed

modello-core/src/main/java/org/codehaus/modello/model/Model.java

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ public class Model
4141
{
4242
private String id;
4343

44-
private List<ModelClass> classes = new ArrayList<ModelClass>();
44+
private List<ModelClass> classes = new ArrayList<>();
4545

46-
private List<ModelDefault> defaults = new ArrayList<ModelDefault>();
46+
private List<ModelDefault> defaults = new ArrayList<>();
4747

48-
private List<ModelInterface> interfaces = new ArrayList<ModelInterface>();
48+
private List<ModelInterface> interfaces = new ArrayList<>();
4949

50-
private transient Map<String, List<ModelClass>> classMap = new HashMap<String, List<ModelClass>>();
50+
private transient Map<String, List<ModelClass>> classMap = new HashMap<>();
5151

52-
private transient Map<String, ModelDefault> defaultMap = new HashMap<String, ModelDefault>();
52+
private transient Map<String, ModelDefault> defaultMap = new HashMap<>();
5353

54-
private transient Map<String, List<ModelInterface>> interfaceMap = new HashMap<String, List<ModelInterface>>();
54+
private transient Map<String, List<ModelInterface>> interfaceMap = new HashMap<>();
5555

5656
private VersionDefinition versionDefinition;
5757

@@ -128,7 +128,12 @@ public String getRoot( Version version )
128128
/**
129129
* @deprecated This shouldn't be used, anything querying the model should read the
130130
* package of the class. Use getDefaultPackageName(..).
131+
* @param withVersion return the version
132+
* @param version the version
133+
* @return the package name
134+
*
131135
*/
136+
@Deprecated
132137
public String getPackageName( boolean withVersion, Version version )
133138
{
134139
return getDefaultPackageName( withVersion, version );
@@ -141,7 +146,7 @@ public List<ModelClass> getAllClasses()
141146

142147
public List<ModelClass> getClasses( Version version )
143148
{
144-
List<ModelClass> classList = new ArrayList<ModelClass>();
149+
List<ModelClass> classList = new ArrayList<>();
145150

146151
for ( ModelClass currentClass : classes )
147152
{
@@ -235,7 +240,7 @@ public void addClass( ModelClass modelClass )
235240
}
236241
else
237242
{
238-
List<ModelClass> classList = new ArrayList<ModelClass>();
243+
List<ModelClass> classList = new ArrayList<>();
239244

240245
classMap.put( modelClass.getName(), classList );
241246
}
@@ -308,7 +313,7 @@ public List<ModelInterface> getAllInterfaces()
308313

309314
public List<ModelInterface> getInterfaces( Version version )
310315
{
311-
List<ModelInterface> interfaceList = new ArrayList<ModelInterface>();
316+
List<ModelInterface> interfaceList = new ArrayList<>();
312317

313318
for ( ModelInterface currentInterface : interfaces )
314319
{
@@ -374,7 +379,7 @@ public void addInterface( ModelInterface modelInterface )
374379
}
375380
else
376381
{
377-
List<ModelInterface> interfaceList = new ArrayList<ModelInterface>();
382+
List<ModelInterface> interfaceList = new ArrayList<>();
378383

379384
interfaceMap.put( modelInterface.getName(), interfaceList );
380385
}

modello-core/src/main/java/org/codehaus/modello/plugin/AbstractModelloGenerator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ protected boolean isEmpty( String string )
241241

242242
/**
243243
* @deprecated Use {@link #getParameter(Properties, String)} instead
244+
* @param name parameter name
245+
* @param parameters the properties
246+
* @return the parameter value
244247
*/
248+
@Deprecated
245249
protected String getParameter( String name, Properties parameters )
246250
{
247251
return getParameter( parameters, name );

modello-maven-plugin/src/it/features/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,11 @@
125125
<plugins>
126126
<plugin>
127127
<artifactId>maven-javadoc-plugin</artifactId>
128-
<version>3.0.1</version>
128+
<version>3.2.0</version>
129129
<configuration>
130130
<show>private</show>
131131
<linksource>true</linksource>
132+
<detectJavaApiLink>false</detectJavaApiLink>
132133
</configuration>
133134
</plugin>
134135
<plugin>

modello-maven-plugin/src/it/javadoc/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333

3434
<build>
3535
<defaultGoal>test</defaultGoal>
36+
<pluginManagement>
37+
<plugins>
38+
<plugin>
39+
<artifactId>maven-javadoc-plugin</artifactId>
40+
<version>3.2.0</version>
41+
<configuration>
42+
<show>private</show>
43+
<linksource>true</linksource>
44+
<detectJavaApiLink>false</detectJavaApiLink>
45+
</configuration>
46+
</plugin>
47+
</plugins>
48+
</pluginManagement>
3649
<plugins>
3750
<plugin>
3851
<groupId>org.apache.maven.plugins</groupId>

pom.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,9 @@
448448
<plugin>
449449
<groupId>org.apache.maven.plugins</groupId>
450450
<artifactId>maven-javadoc-plugin</artifactId>
451-
<version>2.10.4</version>
451+
<version>3.2.0</version>
452452
<configuration>
453-
<links>
454-
<link>https://docs.oracle.com/javase/7/docs/api/</link>
455-
</links>
453+
<detectJavaApiLink>false</detectJavaApiLink>
456454
</configuration>
457455
</plugin>
458456
<plugin>

0 commit comments

Comments
 (0)