equal
deleted
inserted
replaced
126 if (uri.getRawFragment() != null) |
126 if (uri.getRawFragment() != null) |
127 throw new IllegalArgumentException("URI has a fragment component"); |
127 throw new IllegalArgumentException("URI has a fragment component"); |
128 if (uri.getRawQuery() != null) |
128 if (uri.getRawQuery() != null) |
129 throw new IllegalArgumentException("URI has a query component"); |
129 throw new IllegalArgumentException("URI has a query component"); |
130 String path = uri.getPath(); |
130 String path = uri.getPath(); |
131 if (path.equals("")) |
131 if (path.isEmpty()) |
132 throw new IllegalArgumentException("URI path component is empty"); |
132 throw new IllegalArgumentException("URI path component is empty"); |
133 |
133 |
134 // UNC |
134 // UNC |
135 String auth = uri.getRawAuthority(); |
135 String auth = uri.getRawAuthority(); |
136 if (auth != null && !auth.equals("")) { |
136 if (auth != null && !auth.isEmpty()) { |
137 String host = uri.getHost(); |
137 String host = uri.getHost(); |
138 if (host == null) |
138 if (host == null) |
139 throw new IllegalArgumentException("URI authority component has undefined host"); |
139 throw new IllegalArgumentException("URI authority component has undefined host"); |
140 if (uri.getUserInfo() != null) |
140 if (uri.getUserInfo() != null) |
141 throw new IllegalArgumentException("URI authority component has user-info"); |
141 throw new IllegalArgumentException("URI authority component has user-info"); |