diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-09-01 14:54:32 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-09-01 14:54:32 +0000 |
commit | b42079a4f1e4738c5ba9d30b4b9afb0f4bd3f2e3 (patch) | |
tree | 0094f22f24089f7a2ca609fd1063f7a6adb34044 /javax | |
parent | e38de7943810d933e6ea69b8a8a26f893399aa6b (diff) | |
download | classpath-b42079a4f1e4738c5ba9d30b4b9afb0f4bd3f2e3.tar.gz |
Fix FindBugs issues.
2008-09-01 Andrew John Hughes <gnu_andrew@member.fsf.org>
* gnu/java/util/regex/RETokenStart.java:
(getMaximumLength()): Add Override annotation.
(matchThis(CharIndexed, REMatch)): Likewise.
(returnsFixedLengthMatches()): Renamed from
returnsFixedLengthmatches and added Override
annotation.
(findFixedLengthMatches(CharIndexed,REMatch,int)):
Add Override annotation.
(dump(CPStringBuilder)): Likewise.
* gnu/javax/print/ipp/IppRequest.java:
(RequestWriter.writeOperationAttributes(AttributeSet)):
Throw exception, don't just create and drop it.
* javax/management/MBeanServerPermission.java:
(MBeanServerPermissionCollection.add(Permission)): Compare
against individual Strings not the entire array, and
store the result of replace.
* javax/swing/text/html/StyleSheet.java:
(setBaseFontSize(size)): Store result of trim().
Diffstat (limited to 'javax')
-rw-r--r-- | javax/management/MBeanServerPermission.java | 9 | ||||
-rw-r--r-- | javax/swing/text/html/StyleSheet.java | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/javax/management/MBeanServerPermission.java b/javax/management/MBeanServerPermission.java index 55070ef9b..045573aba 100644 --- a/javax/management/MBeanServerPermission.java +++ b/javax/management/MBeanServerPermission.java @@ -306,13 +306,14 @@ public class MBeanServerPermission String cps = cp[b].trim(); if (cps.equals(nps)) found = true; - if (np.equals("newMBeanServer") + if (nps.equals("newMBeanServer") && createms != -1) found = true; - if (np.equals("createMBeanServer") + if (nps.equals("createMBeanServer") && newms != -1) - finalString.replace("newMBeanServer", - "createMBeanServer"); + finalString = + finalString.replace("newMBeanServer", + "createMBeanServer"); } if (!found) finalString += "," + nps; diff --git a/javax/swing/text/html/StyleSheet.java b/javax/swing/text/html/StyleSheet.java index fb17442b4..08578c80f 100644 --- a/javax/swing/text/html/StyleSheet.java +++ b/javax/swing/text/html/StyleSheet.java @@ -1071,7 +1071,7 @@ public class StyleSheet extends StyleContext */ public void setBaseFontSize(String size) { - size.trim(); + size = size.trim(); int temp = 0; try { |