File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,6 @@ protected Object nativeToJava(TransferData transferData) {
192192}
193193
194194boolean checkByteArray (Object object ) {
195- return (object != null && object instanceof byte [] && ((byte [])object ).length > 0 );
195+ return (object instanceof byte [] && ((byte [])object ).length > 0 );
196196}
197197}
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ protected String[] getTypeNames() {
122122}
123123
124124boolean checkHTML (Object object ) {
125- return (object != null && object instanceof String && ((String )object ).length () > 0 );
125+ return (object instanceof String && ! ((String )object ).isEmpty () );
126126}
127127
128128@ Override
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ protected String[] getTypeNames(){
171171}
172172
173173boolean checkImage (Object object ) {
174- if (object == null || !(object instanceof ImageData )) return false ;
174+ if (!(object instanceof ImageData )) return false ;
175175 return true ;
176176}
177177
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ protected String[] getTypeNames() {
118118}
119119
120120boolean checkRTF (Object object ) {
121- return (object != null && object instanceof String && ((String )object ).length () > 0 );
121+ return (object instanceof String && ! ((String )object ).isEmpty () );
122122}
123123
124124@ Override
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ protected String[] getTypeNames() {
161161}
162162
163163boolean checkText (Object object ) {
164- return (object != null && object instanceof String && ((String )object ).length () > 0 );
164+ return (object instanceof String && ! ((String )object ).isEmpty () );
165165}
166166
167167@ Override
You can’t perform that action at this time.
0 commit comments