private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { try { packageId = new PackageIdentifier((String) in.readObject(), (PathFragment) in.readObject()); } catch (SyntaxException e) { throw new IOException("Error serializing package identifier: " + e.getMessage()); } }
public static PackageIdentifier createInDefaultRepo(PathFragment name) { try { return new PackageIdentifier(DEFAULT_REPOSITORY, name); } catch (SyntaxException e) { throw new IllegalArgumentException( "could not create package identifier for " + name + ": " + e.getMessage()); } }