Project Information
Project:
<<unnamed project>>
FindBugs version: 1.3.5
Code analyzed:
- E:\build\root\Release\portalui\10.3.3.x\ptwebui\portaluiinfrastructure\build\x86\classes\java
Metrics
33054 lines of code analyzed,
in 475 classes,
in 71 packages.
High Priority Warnings |
9 |
0.27 |
Medium Priority Warnings |
31 |
0.94 |
Total Warnings
|
40
|
1.21
|
(* Defects per Thousand lines of non-commenting source statements)
Contents
Summary
Warnings
Click on a warning row to see full context information.
HE
|
com.plumtree.portaluiinfrastructure.navtype.NavAreaEnum defines equals and uses Object.hashCode() |
|
Bug type HE_EQUALS_USE_HASHCODE (click for details)
In class com.plumtree.portaluiinfrastructure.navtype.NavAreaEnum In method com.plumtree.portaluiinfrastructure.navtype.NavAreaEnum.equals(Object) At NavAreaEnum.java:[lines 125-134]
|
HE
|
com.plumtree.portaluiinfrastructure.navtype.NavFeatureEnum defines equals and uses Object.hashCode() |
|
Bug type HE_EQUALS_USE_HASHCODE (click for details)
In class com.plumtree.portaluiinfrastructure.navtype.NavFeatureEnum In method com.plumtree.portaluiinfrastructure.navtype.NavFeatureEnum.equals(Object) At NavFeatureEnum.java:[lines 63-72]
|
DMI
|
Invocation of toString on data in com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel.SaveRow(PTGrowableSortedArrayWrapper, int, XPHashtable) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel In method com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel.SaveRow(PTGrowableSortedArrayWrapper, int, XPHashtable) Local variable named data At ObjectSecurityModel.java:[line 1264] Another occurrence at ObjectSecurityModel.java:[line 1305]
|
DMI
|
Invocation of toString on navtypes in com.plumtree.portaluiinfrastructure.navtype.NavManager.InternalLoadClasses(String, String, boolean, boolean) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class com.plumtree.portaluiinfrastructure.navtype.NavManager In method com.plumtree.portaluiinfrastructure.navtype.NavManager.InternalLoadClasses(String, String, boolean, boolean) Local variable named navtypes At NavManager.java:[line 263]
|
DMI
|
Invocation of toString on data in com.plumtree.portaluiinfrastructure.securitymatrix.MultiObjectsSecurityModel.SaveRow(PTGrowableSortedArrayWrapper, int, XPHashtable) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class com.plumtree.portaluiinfrastructure.securitymatrix.MultiObjectsSecurityModel In method com.plumtree.portaluiinfrastructure.securitymatrix.MultiObjectsSecurityModel.SaveRow(PTGrowableSortedArrayWrapper, int, XPHashtable) Local variable named data At MultiObjectsSecurityModel.java:[line 911]
|
DMI
|
Invocation of toString on data in com.plumtree.portaluiinfrastructure.statichelpers.XUIHelperMethods.GetDataSourceIDFromQS(XPHashtable) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class com.plumtree.portaluiinfrastructure.statichelpers.XUIHelperMethods In method com.plumtree.portaluiinfrastructure.statichelpers.XUIHelperMethods.GetDataSourceIDFromQS(XPHashtable) Local variable named data At XUIHelperMethods.java:[line 84]
|
DMI
|
Invocation of toString on nIDs in com.plumtree.portaluiinfrastructure.tree.AdminTreeModel.SetClassIDsToDisplay(int[]) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class com.plumtree.portaluiinfrastructure.tree.AdminTreeModel In method com.plumtree.portaluiinfrastructure.tree.AdminTreeModel.SetClassIDsToDisplay(int[]) Local variable named nIDs At AdminTreeModel.java:[line 1086]
|
EC
|
Call to equals() with null argument in com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysRestAPIService.DoSearch(PathwaysQueryArguments) |
|
Bug type EC_NULL_ARG (click for details)
In class com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysRestAPIService In method com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysRestAPIService.DoSearch(PathwaysQueryArguments) At PathwaysRestAPIService.java:[line 327]
|
IL
|
There is an apparent infinite loop in com.plumtree.portaluiinfrastructure.navtype.NavManager.InternalLoadClasses(String, String, boolean, boolean) |
|
Bug type IL_INFINITE_LOOP (click for details)
In class com.plumtree.portaluiinfrastructure.navtype.NavManager In method com.plumtree.portaluiinfrastructure.navtype.NavManager.InternalLoadClasses(String, String, boolean, boolean) At NavManager.java:[line 309] Loop bottom at NavManager.java:[line 309] Local variable named minNavID Last changed at NavManager.java:[line 291] Local variable named maxNavID Last changed at NavManager.java:[line 293]
|
RpC
|
Repeated conditional test in com.plumtree.portaluiinfrastructure.tree.AdminTreeModel.SetQueryFilter(int, int, String[]) |
|
Bug type RpC_REPEATED_CONDITIONAL_TEST (click for details)
In class com.plumtree.portaluiinfrastructure.tree.AdminTreeModel In method com.plumtree.portaluiinfrastructure.tree.AdminTreeModel.SetQueryFilter(int, int, String[]) At AdminTreeModel.java:[line 1554] At AdminTreeModel.java:[line 1554]
|
MS
|
com.plumtree.portaluiinfrastructure.editor.saveobject.SaveObjectMainFrameDP.BOTTOM_SIZES should be package protected |
|
Bug type MS_PKGPROTECT (click for details)
In class com.plumtree.portaluiinfrastructure.editor.saveobject.SaveObjectMainFrameDP Field com.plumtree.portaluiinfrastructure.editor.saveobject.SaveObjectMainFrameDP.BOTTOM_SIZES At SaveObjectMainFrameDP.java:[line 25]
|
MS
|
com.plumtree.portaluiinfrastructure.failover.ReplicationCache.CLEANUP_MINUTES should be package protected |
|
Bug type MS_PKGPROTECT (click for details)
In class com.plumtree.portaluiinfrastructure.failover.ReplicationCache Field com.plumtree.portaluiinfrastructure.failover.ReplicationCache.CLEANUP_MINUTES At ReplicationCache.java:[line 29]
|
MS
|
com.plumtree.portaluiinfrastructure.navtype.NavAreaEnum.m_navAreaEnums should be package protected |
|
Bug type MS_PKGPROTECT (click for details)
In class com.plumtree.portaluiinfrastructure.navtype.NavAreaEnum Field com.plumtree.portaluiinfrastructure.navtype.NavAreaEnum.m_navAreaEnums At NavAreaEnum.java:[line 46]
|
MS
|
com.plumtree.portaluiinfrastructure.navtype.NavFeatureEnum.m_navFeatureEnums should be package protected |
|
Bug type MS_PKGPROTECT (click for details)
In class com.plumtree.portaluiinfrastructure.navtype.NavFeatureEnum Field com.plumtree.portaluiinfrastructure.navtype.NavFeatureEnum.m_navFeatureEnums At NavFeatureHelper.java:[line 21]
|
MS
|
com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysConstants.COLLAB_ITEMS is a mutable array |
|
Bug type MS_MUTABLE_ARRAY (click for details)
In class com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysConstants Field com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysConstants.COLLAB_ITEMS At PathwaysConstants.java:[line 143]
|
MS
|
com.plumtree.portaluiinfrastructure.search.pathways.PathwaysQueryArguments.opAND isn't final but should be |
|
Bug type MS_SHOULD_BE_FINAL (click for details)
In class com.plumtree.portaluiinfrastructure.search.pathways.PathwaysQueryArguments Field com.plumtree.portaluiinfrastructure.search.pathways.PathwaysQueryArguments.opAND At PathwaysQueryArguments.java:[line 42]
|
MS
|
com.plumtree.portaluiinfrastructure.search.pathways.PathwaysQueryArguments.opOR isn't final but should be |
|
Bug type MS_SHOULD_BE_FINAL (click for details)
In class com.plumtree.portaluiinfrastructure.search.pathways.PathwaysQueryArguments Field com.plumtree.portaluiinfrastructure.search.pathways.PathwaysQueryArguments.opOR At PathwaysQueryArguments.java:[line 43]
|
MS
|
public static com.plumtree.portaluiinfrastructure.search.SearchObjectTypes.GetOrderedSearchObjectTypes() may expose internal representation by returning SearchObjectTypes._searchObjectTypes |
|
Bug type MS_EXPOSE_REP (click for details)
In class com.plumtree.portaluiinfrastructure.search.SearchObjectTypes In method com.plumtree.portaluiinfrastructure.search.SearchObjectTypes.GetOrderedSearchObjectTypes() Field com.plumtree.portaluiinfrastructure.search.SearchObjectTypes._searchObjectTypes At SearchObjectTypes.java:[line 128]
|
MS
|
com.plumtree.portaluiinfrastructure.statichelpers.GatewayHelpers.GATEWAY_FRIENDLYURL_KEYWORD isn't final but should be |
|
Bug type MS_SHOULD_BE_FINAL (click for details)
In class com.plumtree.portaluiinfrastructure.statichelpers.GatewayHelpers Field com.plumtree.portaluiinfrastructure.statichelpers.GatewayHelpers.GATEWAY_FRIENDLYURL_KEYWORD At GatewayHelpers.java:[line 73]
|
MS
|
com.plumtree.portaluiinfrastructure.statichelpers.PlumtreeHelpers.s_strDefaultStyleSheet isn't final and can't be protected from malicious code |
|
Bug type MS_CANNOT_BE_FINAL (click for details)
In class com.plumtree.portaluiinfrastructure.statichelpers.PlumtreeHelpers Field com.plumtree.portaluiinfrastructure.statichelpers.PlumtreeHelpers.s_strDefaultStyleSheet In PlumtreeHelpers.java
|
MS
|
com.plumtree.portaluiinfrastructure.tags.helper.TagState.TEST_PORTLET_REQUEST_DATA should be package protected |
|
Bug type MS_PKGPROTECT (click for details)
In class com.plumtree.portaluiinfrastructure.tags.helper.TagState Field com.plumtree.portaluiinfrastructure.tags.helper.TagState.TEST_PORTLET_REQUEST_DATA In TagState.java
|
MS
|
public static com.plumtree.portaluiinfrastructure.tags.Scope.GetScopeSearchOrder() may expose internal representation by returning Scope.SCOPE_SEARCH_ORDER |
|
Bug type MS_EXPOSE_REP (click for details)
In class com.plumtree.portaluiinfrastructure.tags.Scope In method com.plumtree.portaluiinfrastructure.tags.Scope.GetScopeSearchOrder() Field com.plumtree.portaluiinfrastructure.tags.Scope.SCOPE_SEARCH_ORDER At Scope.java:[line 201]
|
MS
|
com.plumtree.portaluiinfrastructure.tags.tagdef.TagOutputDefinitionManager.m_testInstance should be package protected |
|
Bug type MS_PKGPROTECT (click for details)
In class com.plumtree.portaluiinfrastructure.tags.tagdef.TagOutputDefinitionManager Field com.plumtree.portaluiinfrastructure.tags.tagdef.TagOutputDefinitionManager.m_testInstance At TagOutputDefinitionManager.java:[line 39]
|
MS
|
com.plumtree.portaluiinfrastructure.tags.tagdef.TagOutputDefinitionManager.m_instance isn't final but should be |
|
Bug type MS_SHOULD_BE_FINAL (click for details)
In class com.plumtree.portaluiinfrastructure.tags.tagdef.TagOutputDefinitionManager Field com.plumtree.portaluiinfrastructure.tags.tagdef.TagOutputDefinitionManager.m_instance At TagOutputDefinitionManager.java:[line 44]
|
MS
|
com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel.m_ptClassTypeDescManager should be package protected |
|
Bug type MS_PKGPROTECT (click for details)
In class com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel Field com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel.m_ptClassTypeDescManager At AObjectTreeModel.java:[line 37]
|
SBSC
|
Method com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel.GetSelectedItems() concatenates strings using + in a loop |
|
Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details)
In class com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel In method com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel.GetSelectedItems() At ObjectSecurityModel.java:[line 661]
|
SBSC
|
Method com.plumtree.portaluiinfrastructure.editor.ObjEditorModel.CheckEditorAccessAndStart(XPHashtable) concatenates strings using + in a loop |
|
Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details)
In class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel In method com.plumtree.portaluiinfrastructure.editor.ObjEditorModel.CheckEditorAccessAndStart(XPHashtable) At ObjEditorModel.java:[line 195]
|
SBSC
|
Method com.plumtree.portaluiinfrastructure.editor.saveobject.SaveObjectModel.AddAdminFolderIDToCookie(IXPRequest, IWebData) concatenates strings using + in a loop |
|
Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details)
In class com.plumtree.portaluiinfrastructure.editor.saveobject.SaveObjectModel In method com.plumtree.portaluiinfrastructure.editor.saveobject.SaveObjectModel.AddAdminFolderIDToCookie(IXPRequest, IWebData) At SaveObjectModel.java:[line 179]
|
SBSC
|
Method com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel.GetObjectClassIDs() concatenates strings using + in a loop |
|
Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details)
In class com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel In method com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel.GetObjectClassIDs() At PTMultiColumnListModel.java:[line 700]
|
SBSC
|
Method com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel.GetSelectedItems() concatenates strings using + in a loop |
|
Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details)
In class com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel In method com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel.GetSelectedItems() At PTMultiColumnListModel.java:[line 751]
|
SBSC
|
Method com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysRestAPIService.DoSearch(PathwaysQueryArguments) concatenates strings using + in a loop |
|
Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details)
In class com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysRestAPIService In method com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysRestAPIService.DoSearch(PathwaysQueryArguments) At PathwaysRestAPIService.java:[line 423]
|
SBSC
|
Method com.plumtree.portaluiinfrastructure.search.SearchResultModel.ancestorKey(String, int) concatenates strings using + in a loop |
|
Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details)
In class com.plumtree.portaluiinfrastructure.search.SearchResultModel In method com.plumtree.portaluiinfrastructure.search.SearchResultModel.ancestorKey(String, int) At SearchResultModel.java:[line 5439]
|
SS
|
Unread field: com.plumtree.portaluiinfrastructure.application.PTGarbageCollectorRunnable.m_checkShutDown; should this field be static? |
|
Bug type SS_SHOULD_BE_STATIC (click for details)
In class com.plumtree.portaluiinfrastructure.application.PTGarbageCollectorRunnable Field com.plumtree.portaluiinfrastructure.application.PTGarbageCollectorRunnable.m_checkShutDown At PTGarbageCollectorRunnable.java:[line 34]
|
UrF
|
Unread field: com.plumtree.portaluiinfrastructure.subscribematrix.MultiObjectsSubscribeModel.m_bEditAdminFolderSecurity |
|
Bug type URF_UNREAD_FIELD (click for details)
In class com.plumtree.portaluiinfrastructure.subscribematrix.MultiObjectsSubscribeModel Field com.plumtree.portaluiinfrastructure.subscribematrix.MultiObjectsSubscribeModel.m_bEditAdminFolderSecurity At MultiObjectsSubscribeModel.java:[line 58]
|
UrF
|
Unread field: com.plumtree.portaluiinfrastructure.tags.manager.TagLibManager.m_TagLibraryMetaDataType |
|
Bug type URF_UNREAD_FIELD (click for details)
In class com.plumtree.portaluiinfrastructure.tags.manager.TagLibManager Field com.plumtree.portaluiinfrastructure.tags.manager.TagLibManager.m_TagLibraryMetaDataType At TagLibManager.java:[line 117]
|
DB
|
Method com.plumtree.portaluiinfrastructure.search.SearchResultModel.restoreState(String) uses the same code for two branches |
|
Bug type DB_DUPLICATE_BRANCHES (click for details)
In class com.plumtree.portaluiinfrastructure.search.SearchResultModel In method com.plumtree.portaluiinfrastructure.search.SearchResultModel.restoreState(String) At SearchResultModel.java:[lines 5132-5134] At SearchResultModel.java:[lines 5137-5138]
|
ICAST
|
Result of integer multiplication cast to long in com.plumtree.portaluiinfrastructure.failover.ReplicationCache.IsExpired(XPDateTime, int) |
|
Bug type ICAST_INTEGER_MULTIPLY_CAST_TO_LONG (click for details)
In class com.plumtree.portaluiinfrastructure.failover.ReplicationCache In method com.plumtree.portaluiinfrastructure.failover.ReplicationCache.IsExpired(XPDateTime, int) At ReplicationCache.java:[line 275]
|
ICAST
|
Result of integer multiplication cast to long in com.plumtree.portaluiinfrastructure.tags.helper.TagState.AddCacheEntry(String, Object, Scope, int) |
|
Bug type ICAST_INTEGER_MULTIPLY_CAST_TO_LONG (click for details)
In class com.plumtree.portaluiinfrastructure.tags.helper.TagState In method com.plumtree.portaluiinfrastructure.tags.helper.TagState.AddCacheEntry(String, Object, Scope, int) At TagState.java:[line 565]
|
SF
|
Switch statement found in com.plumtree.portaluiinfrastructure.login.PTLoginHelper.StaticInit(PTConfigVarPack) where one case falls through to the next case |
|
Bug type SF_SWITCH_FALLTHROUGH (click for details)
In class com.plumtree.portaluiinfrastructure.login.PTLoginHelper In method com.plumtree.portaluiinfrastructure.login.PTLoginHelper.StaticInit(PTConfigVarPack) At PTLoginHelper.java:[lines 1149-1152]
|
ST
|
Write to static field com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel.m_ptClassTypeDescManager from instance method com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel.Init(AActivitySpace) |
|
Bug type ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD (click for details)
In class com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel In method com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel.Init(AActivitySpace) Field com.plumtree.portaluiinfrastructure.tree.AObjectTreeModel.m_ptClassTypeDescManager At AObjectTreeModel.java:[line 182]
|
This method uses the same code to implement two branches of a conditional branch.
Check to ensure that this isn't a coding mistake.
The code invokes toString on an array, which will generate a fairly useless result
such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable
String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.
This method calls equals(Object), passing a null value as
the argument. According to the contract of the equals() method,
this call should always return false
.
This class overrides equals(Object)
, but does not
override hashCode()
, and inherits the implementation of
hashCode()
from java.lang.Object
(which returns
the identity hash code, an arbitrary value assigned to the object
by the VM). Therefore, the class is very likely to violate the
invariant that equal objects must have equal hashcodes.
If you don't think instances of this class will ever be inserted into a HashMap/HashTable,
the recommended hashCode
implementation to use is:
public int hashCode() {
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
This code performs integer multiply and then converts the result to a long,
as in:
long convertDaysToMilliseconds(int days) { return 1000*3600*24*days; }
If the multiplication is done using long arithmetic, you can avoid
the possibility that the result will overflow. For example, you
could fix the above code to:
long convertDaysToMilliseconds(int days) { return 1000L*3600*24*days; }
or
static final long MILLISECONDS_PER_DAY = 24L*3600*1000;
long convertDaysToMilliseconds(int days) { return days * MILLISECONDS_PER_DAY; }
This loop doesn't seem to have a way to terminate (other than by perhaps
throwing an exception).
A final static field references an array
and can be accessed by malicious code or
by accident from another package.
This code can freely modify the contents of the array.
A mutable static field could be changed by malicious code or
by accident from another package.
Unfortunately, the way the field is used doesn't allow
any easy fix to this problem.
A mutable static field could be changed by malicious code or
by accident from another package.
The field could be made final to avoid
this vulnerability.
A mutable static field could be changed by malicious code or
by accident.
The field could be made package protected to avoid
this vulnerability.
A public static method returns a reference to
an array that is part of the static state of the class.
Any code that calls this method can freely modify
the underlying array.
One fix is to return a copy of the array.
The code contains a conditional test is performed twice, one right after the other
(e.g., x == 0 || x == 0
). Perhaps the second occurrence is intended to be something else
(e.g., x == 0 || y == 0
).
The method seems to be building a String using concatenation in a loop.
In each iteration, the String is converted to a StringBuffer/StringBuilder,
appended to, and converted back to a String.
This can lead to a cost quadratic in the number of iterations,
as the growing string is recopied in each iteration.
Better performance can be obtained by using
a StringBuffer (or StringBuilder in Java 1.5) explicitly.
For example:
// This is bad
String s = "";
for (int i = 0; i < field.length; ++i) {
s = s + field[i];
}
// This is better
StringBuffer buf = new StringBuffer();
for (int i = 0; i < field.length; ++i) {
buf.append(field[i]);
}
String s = buf.toString();
This method contains a switch statement where one case branch will fall through to the next case.
Usually you need to end this case with a break or return.
This class contains an instance final field that
is initialized to a compile-time static value.
Consider making the field static.
This instance method writes to a static field. This is tricky to get
correct if multiple instances are being manipulated,
and generally bad practice.
This field is never read. Consider removing it from the class.