> This is small but interesting: > demos-server/src/org/apache/pivot/demos/rest/server/RESTDemoServlet.java:134 > org.apache.pivot.demos.rest.server.RESTDemoServlet.doDelete(QueryServlet$Path) > ignores exceptional return value of java.io.File.delete() > the method (from the interface) is void doDelete, so it couldn't return for > example a boolean value like the boolean doPut ...
Keep in mind that the return value of doPut() is not a status - it indicates whether a resource was created or not. Status codes (specifically errors) are returned by throwing an exception. It's not entirely clear to me what the return value of File#delete() means. Did an error occur, or did the file simply not exist to begin with? If the latter, I think the code is probably fine as-is. If the former, we should probably check the return value and throw a QueryException if false. > Others: > core/test/org/apache/pivot/json/test/BindTest.java:111 instanceof will > always return true, since all org.apache.pivot.json.test.SampleBean2 are > instances of org.apache.pivot.json.test.SampleBean2 It is probably OK to remove this check since I think we'll get a ClassCastException if the value is not a SampleBean2. > core/src/org/apache/pivot/beans/BXMLSerializer.java:319 Method > org.apache.pivot.beans.BXMLSerializer$1.putAll(Map) makes inefficient use of > keySet iterator instead of entrySet iterator > core/src/org/apache/pivot/text/CharSequenceCharacterIterator.java:127 Ignore. > org.apache.pivot.text.CharSequenceCharacterIterator.clone() does not call > super.clone() Call super.clone(). > wtk/src/org/apache/pivot/wtk/TextPane.java:114 Should > org.apache.pivot.wtk.TextPane$RangeRemovedEdit be a _static_ inner class? > wtk/src/org/apache/pivot/wtk/TextPane.java:134 Should > org.apache.pivot.wtk.TextPane$RangeInsertedEdit be a _static_ inner class? No. > wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java:145 > org.apache.pivot.wtk.DesktopApplicationContext$DesktopDisplayHost$3 stored > into non-transient field Ignore. > DesktopApplicationContext$DesktopDisplayHost.updateHostWindowTitleBarCallback > wtk/src/org/apache/pivot/wtk/TreeView.java:438 > org.apache.pivot.wtk.TreeView$BranchHandler doesn't override > org.apache.pivot.collections.ArrayList.equals(Object) Ignore. > wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java:73 > org.apache.pivot.wtk.DesktopApplicationContext$DesktopDisplayHost$1 stored > into non-transient field Ignore. > DesktopApplicationContext$DesktopDisplayHost.rootOwnerListener > wtk/src/org/apache/pivot/wtk/TreeView.java:415 > org.apache.pivot.wtk.TreeView$PathComparator implements Comparator but not > Serializable Ignore. This is an old one. > wtk/src/org/apache/pivot/wtk/content/TableViewDateCellRenderer.java:34 Found > static field of type java.text.DateFormat Why is this a problem? (FYI, as I recall, you made this change) > wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java:522 Exception is > caught when Exception is not thrown RuntimeExceptions can be thrown by this code. > And these (at the end of previous list): > wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraActivityIndicatorSkin.java:88 > Dead store to increment > -- maybe a static constant here could solve ... Ignore. This is an old one. > And last: > tests/src/org/apache/pivot/tests/ShutdownTest.java:55 Unchecked/unconfirmed > cast from org.apache.pivot.wtk.Dialog to org.apache.pivot.wtk.Alert > > wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java:108 > Unchecked/unconfirmed cast from org.apache.pivot.wtk.Window to > org.apache.pivot.wtk.Alert > wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java:307 > Unchecked/unconfirmed cast from org.apache.pivot.wtk.Window to > org.apache.pivot.wtk.SuggestionPopup > wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSheetSkin.java:273 > Unchecked/unconfirmed cast from org.apache.pivot.wtk.Sheet to > org.apache.pivot.wtk.FileBrowserSheet > wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPromptSkin.java:107 > Unchecked/unconfirmed cast from org.apache.pivot.wtk.Window to > org.apache.pivot.wtk.Prompt > wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java:225 > Unchecked/unconfirmed cast from org.apache.pivot.wtk.Window to > org.apache.pivot.wtk.MenuPopup Ignore all these. The casts are valid.
