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(','); |
55 |
|
<<<<<<< BlockId.java |
56 |
|
|
57 |
|
======= |
58 |
|
|
59 |
if(!uri.startsWith(PREFIX)) |
if(!uri.startsWith(PREFIX)) |
60 |
throw new IllegalArgumentException("Storm URN must start "+PREFIX); |
throw new IllegalArgumentException("Storm URN must start "+PREFIX); |
65 |
if(uri.length() - dot != 39 + 1) |
if(uri.length() - dot != 39 + 1) |
66 |
throw new IllegalArgumentException("2nd hash must be 39 chars"); |
throw new IllegalArgumentException("2nd hash must be 39 chars"); |
67 |
|
|
68 |
|
>>>>>>> 1.13 |
69 |
contentType = uri.substring(PREFIX_LEN, comma); |
contentType = uri.substring(PREFIX_LEN, comma); |
70 |
checkContentType(contentType); |
checkContentType(contentType); |
71 |
|
|