49 |
public BlockId(String uri) throws IllegalArgumentException { |
public BlockId(String uri) throws IllegalArgumentException { |
50 |
uri = uri.toLowerCase().intern(); |
uri = uri.toLowerCase().intern(); |
51 |
this.uri = uri; |
this.uri = uri; |
52 |
|
|
53 |
int dot = uri.lastIndexOf('.'); |
int dot = uri.lastIndexOf('.'); |
54 |
int comma = uri.lastIndexOf(','); |
int comma = uri.lastIndexOf(','); |
|
<<<<<<< BlockId.java |
|
|
|
|
|
======= |
|
55 |
|
|
56 |
if(!uri.startsWith(PREFIX)) |
if(!uri.startsWith(PREFIX)) |
57 |
throw new IllegalArgumentException("Storm URN must start "+PREFIX); |
throw new IllegalArgumentException("Storm URN must start "+PREFIX); |
61 |
throw new IllegalArgumentException("1st hash must be 32 chars"); |
throw new IllegalArgumentException("1st hash must be 32 chars"); |
62 |
if(uri.length() - dot != 39 + 1) |
if(uri.length() - dot != 39 + 1) |
63 |
throw new IllegalArgumentException("2nd hash must be 39 chars"); |
throw new IllegalArgumentException("2nd hash must be 39 chars"); |
64 |
|
|
|
>>>>>>> 1.13 |
|
65 |
contentType = uri.substring(PREFIX_LEN, comma); |
contentType = uri.substring(PREFIX_LEN, comma); |
66 |
checkContentType(contentType); |
checkContentType(contentType); |
67 |
|
|