Anonymous avatar Anonymous committed 61b8a05

Various updates.

Comments (0)

Files changed (8)

Add a comment to this file

lib/org-openide-util.jar

Binary file modified.

src/META-INF/upgrade/array-to-collection.hint

 for ($type $var : $arr) {
-     $coll.add($var);
+    $coll.add($var);
 } :: $arr instanceof java.lang.Object[] && $coll instanceof java.util.Collection
 =>
 $coll.addAll(java.util.Arrays.asList($arr));

src/META-INF/upgrade/assignment.to.itself.hint

 $var = $var
 ;;
 
-// :: !matchesAny($var, "$a[$i]")
-// :: elementKindMatches($var, ElementKind.FIELD)
+// :: elementKindMatches($var, ElementKind.FIELD)
+//, ElementKind.PARAMETER, ElementKind.LOCAL_VARIALBE, ElementKind.EXCEPTION_PARAMETER

src/META-INF/upgrade/j.l.String.hint

 => $str.isEmpty()     :: sourceVersionGE(SourceVersion.RELEASE_6)
 => $str.length() == 0 :: otherwise
 ;;
+
+
+
+
+/*
+   $str.equals("")    :: $str instanceof java.lang.String && !parentMatches("!$_")
+=> $str.isEmpty()     :: sourceVersionGE(SourceVersion.RELEASE_6)
+=> $str.length() == 0 :: otherwise
+;;
+
+
+   !$str.equals("")   :: $str instanceof java.lang.String
+=> !$str.isEmpty()    :: sourceVersionGE(SourceVersion.RELEASE_6)
+=> $str.length() != 0 :: otherwise
+;;
+*/

src/META-INF/upgrade/j.s.ImageIcon.hint

-Xnew javax.swing.ImageIcon($image)
+new javax.swing.ImageIcon($image)
 =>
 org.openide.util.ImageUtilities.image2Icon($image)
 ;;

src/META-INF/upgrade/o.o.u.Utilities.hint

-Xorg.openide.util.Utilities.loadImage($loc)
+org.openide.util.Utilities.loadImage($resource)
 =>
-org.openide.util.ImageUtilities.loadImage($loc)
+org.openide.util.ImageUtilities.loadImage($resource)
 ;;

src/demo/Assignment2Itself.java

         this.value = this.value;
     }
     
-    public void shift(String[] array) {
+    public void strange(String[] array) {
         int i = 0;
         array[i++] = array[i++];
         array = array;

src/demo/StringEquals.java

 
 public class StringEquals {
 
-    public boolean stringEqualsEmpty(String str) {
+    public boolean stringEqualsEmpty1(String str) {
         return str.equals("");
     }
     
+    public boolean stringEqualsEmptyJDK6(String str) {
+        return str.isEmpty();
+    }
+    
+    public boolean stringEqualsEmptyPreJDK6(String str) {
+        return str.length() == 0;
+    }
+    
+    public boolean stringNotEqualsEmpty(String str) {
+        return !str.equals("");
+    }
+    
     public boolean stringEqualsValue(String str) {
         return str.equals("value");
     }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.