Пример #1
0
 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());
   }
 }
Пример #2
0
 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());
   }
 }