Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
The fix revision 712569 was aimed to remove an NPE bug on the value of "dependenciesInfo " in the method "getDependencies" of the file "/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructure.java" , but it is incomplete.
Since the value "dependenciesInfo " could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods.
The buggy code locations the same fix needs to be applied at are as bellows:
Line 389 of the method "registerTargetFileName";
public void registerTargetFileName( Artifact artifact, String targetFileName ) { [Line 389] final Iterator it = dependenciesInfo.iterator(); while ( it.hasNext() ) { DependencyInfo dependencyInfo = (DependencyInfo) it.next(); if ( WarUtils.isRelated( artifact, dependencyInfo.getDependency() ) ) { dependencyInfo.setTargetFileName( targetFileName ); } } }
Activity
Dennis Lundberg
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
The fix revision 712569 was aimed to remove an NPE bug on the value of "dependenciesInfo " in the method "getDependencies" of the file "/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructure.java" , but it is incomplete.
Since the value "dependenciesInfo " could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods. The buggy code locations the same fix needs to be applied at are as bellows: Line 389 of the method "registerTargetFileName"; public void registerTargetFileName( Artifact artifact, String targetFileName ) { [Line 389] final Iterator it = dependenciesInfo.iterator(); while ( it.hasNext() ) { DependencyInfo dependencyInfo = (DependencyInfo) it.next(); if ( WarUtils.isRelated( artifact, dependencyInfo.getDependency() ) ) { dependencyInfo.setTargetFileName( targetFileName ); } } } |
The fix revision 712569 was aimed to remove an NPE bug on the value of "dependenciesInfo " in the method "getDependencies" of the file "/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructure.java" , but it is incomplete.
Since the value "dependenciesInfo " could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods. The buggy code locations the same fix needs to be applied at are as bellows: Line 389 of the method "registerTargetFileName"; {code} public void registerTargetFileName( Artifact artifact, String targetFileName ) { [Line 389] final Iterator it = dependenciesInfo.iterator(); while ( it.hasNext() ) { DependencyInfo dependencyInfo = (DependencyInfo) it.next(); if ( WarUtils.isRelated( artifact, dependencyInfo.getDependency() ) ) { dependencyInfo.setTargetFileName( targetFileName ); } } } {code} |
Dennis Lundberg
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Dennis Lundberg [ dennislundberg ] | |
| Fix Version/s | 2.3 [ 18298 ] | |
| Resolution | Fixed [ 1 ] |
Fixed in r1390192.
Thanks for the detailed report!