Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2254 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2254 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact
  • Date: Sat, 09 Apr 2005 12:15:49 -0400

Author: niclas AT hedhman.org
Date: Sat Apr 9 12:15:38 2005
New Revision: 2254

Modified:

development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
Log:
The URISyntaxException should not be possible, but we should perhaps add
character-by-character checks on each of the string arguments to make sure.

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
Sat Apr 9 12:15:38 2005
@@ -148,7 +148,7 @@
* <code>null</code>.
*/
public static Artifact createArtifact( String group, String name, String
version, String type )
- throws URISyntaxException, NullArgumentException
+ throws NullArgumentException
{
if( group == null )
throw new NullArgumentException( "group" );
@@ -159,8 +159,15 @@
if( version == null )
version = "";
String composite = "artifact:" + type + ":" + group + "/" + name +
"#" + version;
- URI uri = new URI( composite );
- return new Artifact( uri );
+ try
+ {
+ URI uri = new URI( composite );
+ return new Artifact( uri );
+ } catch( URISyntaxException e )
+ {
+ // Can not happen.
+ throw new InternalError( "An internal error has occurred. The
following URI could not be constructed: " + composite );
+ }
}

//
------------------------------------------------------------------------



  • svn commit: r2254 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact, niclas, 04/09/2005

Archive powered by MHonArc 2.6.24.

Top of Page