File tree Expand file tree Collapse file tree 4 files changed +17
-6
lines changed
Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 5353 * This file is copied to Version.java by the build process, which also
5454 * fills in the right values of the date and time.
5555 *
56- * This javadoc corresponds to build drjava-20050413-0716 ;
56+ * This javadoc corresponds to build drjava-20050421-1237 ;
5757 *
5858 * @version $Id$
5959 */
@@ -62,7 +62,7 @@ public abstract class Version {
6262 * This string will be automatically expanded upon "ant commit".
6363 * Do not edit it by hand!
6464 */
65- private static final String BUILD_TIME_STRING = "20050413-0716 " ;
65+ private static final String BUILD_TIME_STRING = "20050421-1237 " ;
6666
6767 /** A {@link Date} version of the build time. */
6868 private static final Date BUILD_TIME = _getBuildDate ();
Original file line number Diff line number Diff line change @@ -103,6 +103,9 @@ protected void checkGenericReferenceType(ReferenceType node) {
103103 * @param node - the MethodDeclaration which may or may not contain variable arguments
104104 */
105105 protected void checkVarArgs (MethodDeclaration node ) {
106+ if (true ){
107+ throw new RuntimeException ("What the hell!!!" );
108+ }
106109 if (node .isVarArgs ())
107110 throw new WrongVersionException ("Methods with variable arguments are only allowed in Java 1.5 or higher" );
108111 }
Original file line number Diff line number Diff line change @@ -139,10 +139,18 @@ protected void checkGenericReferenceType(ReferenceType node) {
139139
140140 /**
141141 * Does nothing - Variable Arguments are allowed in 1.5
142+ * Variable Arguments are currently Not working with jsr14 in the interactionspane
143+ * This check here can be deleted when this is fixed.
144+ * This is temporarily included to ensure decent feedback to the users of our new beta.
142145 * @param node - unused
143146 */
144147 protected void checkVarArgs (MethodDeclaration node ) {
145-
148+ try {
149+ java .lang .reflect .Method .class .getMethod ("isVarArgs" , new Class <?>[]{});
150+ }
151+ catch (Throwable t ) {
152+ throw new WrongVersionException ("Variable Arguments are currently only supported in the InteractionsPane for Java Version 1.5 or better." );
153+ }
146154 }
147155
148156 /**
Original file line number Diff line number Diff line change @@ -110,8 +110,8 @@ public static void resetVersion() {
110110 try {
111111 //Class.forName("java.lang.Enum");
112112// Class.forName("com.sun.javadoc.ParameterizedType");
113-
114- java .lang .reflect .Method .class .getMethod ("isVarArgs" , new Class <?>[]{});
113+ Integer . valueOf ( 5 ); //This method only exists in jsr14 and java 1.5+ isVarArgs doesnt
114+ // java.lang.reflect.Method.class.getMethod("isVarArgs", new Class<?>[]{});
115115 _tigerEnabled = true ;
116116 }
117117 catch (Throwable t ) {
@@ -174,7 +174,7 @@ public static boolean isVarArgs(Constructor c) {
174174 * @return boolean that is true if tiger is enabled and <code>c.isEnum()</code>
175175 */
176176 public static boolean isEnum (Class <?> c ) {
177- System .out .println ("enabled: " +_tigerEnabled +", " +c +".super: " +c .getSuperclass ());
177+ // System.out.println("enabled: "+_tigerEnabled+", "+c+".super: "+c.getSuperclass());
178178 return _tigerEnabled && c .getSuperclass ()!=null && (c .getSuperclass ().getName ().equals ("java.lang.Enum" ));
179179
180180 // The following is what it should be. The reason why this commented is that
You can’t perform that action at this time.
0 commit comments