Revision: 17924
          http://sourceforge.net/p/gate/code/17924
Author:   markagreenwood
Date:     2014-05-07 09:45:23 +0000 (Wed, 07 May 2014)
Log Message:
-----------
removed the classpath URL protocol again as it can't work (this time I've 
checked) because Java assumes all URL handlers are available via the system 
classpath and this one isn't. I've also 'fixed' an issue that silently 
swollowed malformed URL excpetions when creating resources, which could lead to 
weird things happening, like an empty doc if you got the protocol wrong

Modified Paths:
--------------
    gate/trunk/build.xml
    gate/trunk/src/main/gate/Gate.java
    gate/trunk/src/main/gate/creole/Parameter.java
    gate/trunk/src/main/gate/creole/ParameterException.java

Removed Paths:
-------------
    gate/trunk/src/main/gate/util/protocols/

Modified: gate/trunk/build.xml
===================================================================
--- gate/trunk/build.xml        2014-05-07 08:21:29 UTC (rev 17923)
+++ gate/trunk/build.xml        2014-05-07 09:45:23 UTC (rev 17924)
@@ -544,6 +544,9 @@
   </target>
        
   <target name="test.coverage" depends="test.gate" >
+       <!-- this isn't used by jenkins so class/package exclusions have to be 
done
+            via the jenkins web interface if as well if you want to keep the 
two
+            different report processes in sync with one another -->
        <jacoco:report>
          <executiondata>
            <file file="jacoco.exec"/>

Modified: gate/trunk/src/main/gate/Gate.java
===================================================================
--- gate/trunk/src/main/gate/Gate.java  2014-05-07 08:21:29 UTC (rev 17923)
+++ gate/trunk/src/main/gate/Gate.java  2014-05-07 09:45:23 UTC (rev 17924)
@@ -198,11 +198,6 @@
       }
     }
 
-    // register the URL handler for the "gate://" URLs
-    System.setProperty("java.protocol.handler.pkgs", System
-      .getProperty("java.protocol.handler.pkgs")
-      + "|" + "gate.util.protocols");
-
     // initialise the symbols generator
     lastSym = 0;
 

Modified: gate/trunk/src/main/gate/creole/Parameter.java
===================================================================
--- gate/trunk/src/main/gate/creole/Parameter.java      2014-05-07 08:21:29 UTC 
(rev 17923)
+++ gate/trunk/src/main/gate/creole/Parameter.java      2014-05-07 09:45:23 UTC 
(rev 17924)
@@ -284,7 +284,8 @@
             value = new URL(baseURL, stringValue);
           }
         }catch(MalformedURLException mue){
-          value = null;
+          //value = null;
+          throw new ParameterException("Malformed URL parameter value: 
"+stringValue,mue);
         }
       else{
         //try to construct a new value from the string using a constructor

Modified: gate/trunk/src/main/gate/creole/ParameterException.java
===================================================================
--- gate/trunk/src/main/gate/creole/ParameterException.java     2014-05-07 
08:21:29 UTC (rev 17923)
+++ gate/trunk/src/main/gate/creole/ParameterException.java     2014-05-07 
09:45:23 UTC (rev 17924)
@@ -33,6 +33,10 @@
   }
 
   public ParameterException(Exception e) {
-    super(e.toString());
+    super(e);
   }
+  
+  public ParameterException(String s, Exception e) {
+    super(s,e);
+  }
 } // ParameterException

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to